diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2008-12-09 21:27:04 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2008-12-09 21:27:04 -0500 |
commit | 973b420608ee303ad9d68b068121a46a8cffee42 (patch) | |
tree | 2370d6169f5257ee0859c103727bff16e49f66ae /pages/poll.php | |
parent | 9107fce738865f27908f2c4ae9f8f913b3a32c0e (diff) | |
download | fourisland-973b420608ee303ad9d68b068121a46a8cffee42.tar.gz fourisland-973b420608ee303ad9d68b068121a46a8cffee42.tar.bz2 fourisland-973b420608ee303ad9d68b068121a46a8cffee42.zip |
Fixed long-time poll glitch
After you voted on the POTW, the resulting page used to be very strange and hideous. This has finally, after being like this since the beginning of the third layout, been fixed.
Diffstat (limited to 'pages/poll.php')
-rwxr-xr-x | pages/poll.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/pages/poll.php b/pages/poll.php index 67f51a8..d871a7d 100755 --- a/pages/poll.php +++ b/pages/poll.php | |||
@@ -24,7 +24,22 @@ require('headerproc.php'); | |||
24 | 24 | ||
25 | $pageCategory = 'poll'; | 25 | $pageCategory = 'poll'; |
26 | 26 | ||
27 | if (!isset($_GET['id'])) | 27 | if (isset($_GET['submit'])) |
28 | { | ||
29 | $setip = "INSERT INTO didpollalready SET ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; | ||
30 | $setip2 = mysql_query($setip); | ||
31 | $getpoll = "SELECT * FROM polloftheweek ORDER BY id DESC LIMIT 0,1"; | ||
32 | $getpoll2 = mysql_query($getpoll); | ||
33 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
34 | $setpoll = "UPDATE polloftheweek SET clicks" . $_POST['options'] . " = " . ($getpoll3['clicks' . $_POST['options']]+1) . " WHERE id = " . $getpoll3['id']; | ||
35 | $setpoll2 = mysql_query($setpoll); | ||
36 | |||
37 | $template = new FITemplate('msg'); | ||
38 | |||
39 | $template->add('MSG','<H2>' . $getpoll3['question'] . '</H2><P>Thank you for voting on the Poll of the Week!<BR><A HREF="poll.php?id=' . $getpoll3['id'] . '">Click here to visit the page for this poll.'); | ||
40 | |||
41 | $template->display(); | ||
42 | } else if (!isset($_GET['id'])) | ||
28 | { | 43 | { |
29 | $template = new FITemplate('pollIndex'); | 44 | $template = new FITemplate('pollIndex'); |
30 | 45 | ||