summary refs log tree commit diff stats
path: root/pages/poll.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/poll.php')
-rwxr-xr-xpages/poll.php17
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
27if (!isset($_GET['id'])) 27if (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