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.php53
1 files changed, 27 insertions, 26 deletions
diff --git a/pages/poll.php b/pages/poll.php index 6582d90..6a87207 100755 --- a/pages/poll.php +++ b/pages/poll.php
@@ -88,36 +88,37 @@ if (!isset($_GET['id']))
88 $getpoll2 = mysql_query($getpoll); 88 $getpoll2 = mysql_query($getpoll);
89 $getpoll3 = mysql_fetch_array($getpoll2); 89 $getpoll3 = mysql_fetch_array($getpoll2);
90 90
91 $template->add('QUESTION', $getpoll3['question']); 91 if ($getpoll3['id'] == $_GET['id'])
92
93 $getrss = "SELECT * FROM pollrss WHERE id = " . $_GET['id'];
94 $getrss2 = mysql_query($getrss);
95 $getrss3 = mysql_fetch_array($getrss2);
96
97 if ($getrss3['id'] == $_GET['id'])
98 { 92 {
99 $template->adds_block('COMPLETE', array( 'RSS' => parseText($getrss3['rss']), 93 $template->add('QUESTION', $getpoll3['question']);
100 'AUTHOR' => $getrss3['author'],
101 'DATE' => date("F jS Y \a\\t g:i:s a",strtotime($getrss3['date'])),
102 'OPTION1' => $getpoll3['option1'],
103 'OPTION2' => $getpoll3['option2'],
104 'OPTION3' => $getpoll3['option3'],
105 'OPTION4' => $getpoll3['option4'],
106 'CLICKS1' => $getpoll3['clicks1'],
107 'CLICKS2' => $getpoll3['clicks2'],
108 'CLICKS3' => $getpoll3['clicks3'],
109 'CLICKS4' => $getpoll3['clicks4']));
110 } else {
111 $template->adds_block('INCOMPLETE', array('exi'=>1));
112 }
113 94
114 $template->add('POTW', getPollOfTheWeek($_GET['id'])); 95 if ($getpoll3['text'] != '')
115 $template->display(); 96 {
97 $template->adds_block('COMPLETE', array( 'RSS' => parseText($getpoll3['text']),
98 'AUTHOR' => $getrss3['author'],
99 'DATE' => date("F jS Y \a\\t g:i:s a",strtotime($getpoll3['week'])),
100 'OPTION1' => $getpoll3['option1'],
101 'OPTION2' => $getpoll3['option2'],
102 'OPTION3' => $getpoll3['option3'],
103 'OPTION4' => $getpoll3['option4'],
104 'CLICKS1' => $getpoll3['clicks1'],
105 'CLICKS2' => $getpoll3['clicks2'],
106 'CLICKS3' => $getpoll3['clicks3'],
107 'CLICKS4' => $getpoll3['clicks4']));
108 } else {
109 $template->adds_block('INCOMPLETE', array('exi'=>1));
110 }
111
112 $template->add('POTW', getPollOfTheWeek($_GET['id']));
113 $template->display();
116 114
117 $page_id = 'polloftheweek-' . $getpoll3['id']; 115 $page_id = 'polloftheweek-' . $getpoll3['id'];
118 include('includes/comments.php'); 116 include('includes/comments.php');
119 117
120 displayRelated($getpoll3['question']); 118 displayRelated($getpoll3['question']);
119 } else {
120 generateError('404');
121 }
121} 122}
122 123
123?> 124?>