-
Notifications
You must be signed in to change notification settings - Fork 1
/
poll.php
278 lines (247 loc) · 16.7 KB
/
poll.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<?
### poll.php.inc specific settings:
# Use cookie:
# (1 = enabled, 0 = disabled)
$cookieUse = 1; // 1 = Enabled 0=Disabled
# When should cookie expire:
// $cookieExpire = 604800; // Expires in a week
$cookieExpire = 60; // Expires in a week
# Bar image we should use:
$barImage = "./images/poll.gif"; // Image to use
# Bar height:
$barHeight = "15"; // Image height
/*
CREATE TABLE poll (
id int(11) DEFAULT '0' NOT NULL auto_increment,
question varchar(150),
answer1 varchar(100),
answer2 varchar(100),
answer3 varchar(100),
answer4 varchar(100),
answer5 varchar(100),
answer6 varchar(100),
votes1 tinyint(4),
votes2 tinyint(4),
votes3 tinyint(4),
votes4 tinyint(4),
votes5 tinyint(4),
votes6 tinyint(4),
status tinyint(4) DEFAULT '0',
PRIMARY KEY (id)
);
*/
function deletePoll($id) {
dbconnect();
$query = "DELETE FROM poll WHERE id = $id";
$result = mysql_query($query);
}
function enablePoll($id) {
dbconnect();
$query = "UPDATE poll SET status = 0 WHERE status = 1";
$result = mysql_query($query);
$query = "UPDATE poll SET status = 1 WHERE id = $id";
$result = mysql_query($query);
}
function disablePoll($id) {
dbconnect();
$query = "UPDATE poll SET status = 0 WHERE id = $id";
$result = mysql_query($query);
}
function castVote($vote) {
dbconnect();
$query = "SELECT * FROM poll WHERE status = 1";
$result = mysql_query($query);
if ($poll = mysql_fetch_object($result)) {
$vote = "votes$vote";
$result = $poll->$vote + 1;
$query = "UPDATE poll SET $vote = '$result' WHERE id = $poll->id";
$result = mysql_query($query);
}
}
function addPoll($question, $answer1, $answer2, $answer3 = "", $answer4 = "", $answer5 = "", $answer6 = "") {
dbconnect();
$query = "INSERT INTO poll (question, answer1, answer2, answer3, answer4, answer5, answer6) VALUES ('$question', '$answer1', '$answer2', '$answer3', '$answer4', '$answer5', '$answer6')";
$result = mysql_query($query);
}
function updatePoll($id, $question, $answer1, $answer2, $answer3 = "", $answer4 = "", $answer5 = "", $answer6 = "") {
dbconnect();
$query = "UPDATE poll SET question = '$question', answer1 = '$answer1', answer2 = '$answer2', answer3 = '$answer3', answer4 = '$answer4', answer5 = '$answer5', answer6 = '$answer6' WHERE id = $id";
$result = mysql_query($query);
}
function getPoll($id) {
dbconnect();
$query = "SELECT * FROM poll WHERE id = $id";
$result = mysql_query($query);
if ($poll = mysql_fetch_object($result)) return $poll;
}
function getActivePoll() {
dbconnect();
$query = "SELECT * FROM poll WHERE status = 1";
$result = mysql_query($query);
if ($poll = mysql_fetch_object($result)) return $poll->id;
}
function getPollArray() {
dbconnect();
$query = "SELECT * FROM poll";
$result = mysql_query($query);
$index = 0;
while ($poll = mysql_fetch_object($result)) {
$rval[$index] = $poll;
$index++;
}
return $rval;
}
function displayForm() {
global $PHP_SELF;
if ($poll = getPoll(getActivePoll())) {
$rval = "<P ALIGN=\"center\"><B>$poll->question</B></P>\n";
$rval .= "<FORM METHOD=\"post\" ACTION=\"$PHP_SELF?section=poll&method=vote\">\n";
if ($poll->answer1) $rval .= " <INPUT TYPE=\"radio\" NAME=\"answer\" VALUE=\"1\"> $poll->answer1<BR>\n";
if ($poll->answer2) $rval .= " <INPUT TYPE=\"radio\" NAME=\"answer\" VALUE=\"2\"> $poll->answer2<BR>\n";
if ($poll->answer3) $rval .= " <INPUT TYPE=\"radio\" NAME=\"answer\" VALUE=\"3\"> $poll->answer3<BR>\n";
if ($poll->answer4) $rval .= " <INPUT TYPE=\"radio\" NAME=\"answer\" VALUE=\"4\"> $poll->answer4<BR>\n";
if ($poll->answer5) $rval .= " <INPUT TYPE=\"radio\" NAME=\"answer\" VALUE=\"5\"> $poll->answer5<BR>\n";
if ($poll->answer6) $rval .= " <INPUT TYPE=\"radio\" NAME=\"answer\" VALUE=\"6\"> $poll->answer6<BR>\n";
$rval .= " <BR><CENTER><INPUT TYPE=\"submit\" NAME=\"vote\" VALUE=\"Vote\"></CENTER>\n";
$rval .= "</FORM>";
}
else {
$rval = "There is currently no poll available.";
}
return $rval;
}
function displayResult($id) {
global $PHP_SELF, $barImage;
if ($poll = getPoll($id)) {
# total number of votes:
$total = $poll->votes1 + $poll->votes2 + $poll->votes3 + $poll->votes4 + $poll->votes5 + $poll->votes6;
$rval = "<P ALIGN=\"center\"><B>$poll->question</B></P>\n";
if ($total) {
# percentage:
if ($poll->answer1) {
$per1 = round($poll->votes1 / $total * 100);
$wid1 = ($per1) ? $per1 : 1;
$rval .= "<P>$poll->answer1<BR><IMG SRC=\"$barImage\" HEIGHT=\"8\" WIDTH=\"$wid1\"> $poll->votes1 ($per1 %)</P>";
}
if ($poll->answer2) {
$per2 = round($poll->votes2 / $total * 100);
$wid2 = ($per2) ? $per2 : 1;
$rval .= "<P>$poll->answer2<BR><IMG SRC=\"$barImage\" HEIGHT=\"8\" WIDTH=\"$wid2\"> $poll->votes2 ($per2 %)</P>";
}
if ($poll->answer3) {
$per3 = round($poll->votes3 / $total * 100);
$wid3 = ($per3) ? $per3 : 1;
$rval .= "<P>$poll->answer3<BR><IMG SRC=\"$barImage\" HEIGHT=\"8\" WIDTH=\"$wid3\"> $poll->votes3 ($per3 %)</P>";
}
if ($poll->answer4) {
$per4 = round($poll->votes4 / $total * 100);
$wid4 = ($per4) ? $per4 : 1;
$rval .= "<P>$poll->answer4<BR><IMG SRC=\"$barImage\" HEIGHT=\"8\" WIDTH=\"$wid4\"> $poll->votes4 ($per4 %)</P>";
}
if ($poll->answer5) {
$per5 = round($poll->votes5 / $total * 100);
$wid5 = ($per5) ? $per5 : 1;
$rval .= "<P>$poll->answer5<BR><IMG SRC=\"$barImage\" HEIGHT=\"8\" WIDTH=\"$wid5\"> $poll->votes5 ($per5 %)</P>";
}
if ($poll->answer6) {
$per6 = round($poll->votes6 / $total * 100);
$wid6 = ($per6) ? $per6 : 1;
$rval .= "<P>$poll->answer6<BR><IMG SRC=\"$barImage\" HEIGHT=\"8\" WIDTH=\"$wid6\"> $poll->votes6 ($per6 %)</P>";
}
}
$rval .= "<BR><P>Total votes: $total</P>";
}
else {
$rval = "There is currently no poll available.";
}
return $rval;
}
function adminPolls() {
global $PHP_SELF;
$polls = getPollArray();
$rval = "<TABLE WIDTH=\"100%\">\n";
for (reset($polls); $poll = current($polls); next($polls)) {
$status = ($poll->status) ? "<TD WIDTH=\"20\"><FONT COLOR=\"blue\" SIZE=\"+2\">*</FONT></TD><TD WIDTH=\"40\"><A HREF=\"$PHP_SELF?section=poll&method=disable&id=$poll->id\">disable</A></TD>" : "<TD WIDTH=\"20\"><FONT COLOR=\"yellow\" SIZE=\"+2\">*</FONT></TD><TD WIDTH=\"40\" ><A HREF=\"$PHP_SELF?section=poll&method=enable&id=$poll->id\">enable</A></TD>";
$rval .= " <TR><TD WIDTH=\"50%\" >$poll->question</TD>$status<TD WIDTH=\"40\"><A HREF=\"$PHP_SELF?section=poll&method=result&id=$poll->id\">view</A></TD><TD WIDTH=\"40\"><A HREF=\"$PHP_SELF?section=poll&method=edit&id=$poll->id\">edit</A></TD><TD WIDTH=\"40\"><A HREF=\"$PHP_SELF?section=poll&method=delete&id=$poll->id\">delete</A></TD></TR>\n";
}
$rval .= "</TABLE>";
return $rval;
}
if (!$box) {
include "functions.inc";
include "theme.inc";
$theme->header();
}
if ($section == "poll") {
include "authentication.inc";
if ($method == "add") {
if ($admin) {
addPoll($question, $answer1, $answer2, $answer3, $answer4, $answer5, $answer6);
$theme->box("Poll manager", "<P><B><U>Status:</U></B> new poll added.</P>\n<P><B><U>Overview:</U></B></P>\n". adminPolls() ."<P><B><U>Add poll:</U></B></P>\n<FORM METHOD=\"post\" ACTION=\"$PHP_SELF?section=poll&method=add\">\n<TABLE>\n <TR><TD>Question:</TD><TD><INPUT TYPE=\"text\" NAME=\"question\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 1:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer1\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 2:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer2\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 3:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer3\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 4:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer4\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 5:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer5\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 6:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer6\" SIZE=\"35\"></TD></TR>\n <TR><TD ALIGN=\"center\" COLSPAN=\"2\"><INPUT TYPE=\"submit\" VALUE=\"Add poll\" NAME=\"add\"> <INPUT TYPE=\"reset\" VALUE=\"Reset\"></TD></TR>\n</TABLE>\n</FORM>");
}
else $theme->box("Failed", "You don't have permission to access this section.<P ALIGN=\"right\">[ <A HREF=\"javascript: history.back()\">back</A> ]</P>");
}
else if ($method == "edit") {
if ($admin) {
$poll = getPoll($id);
$theme->box("Poll manager", "<P><B><U>Edit poll:</U></B></P>\n<FORM METHOD=\"post\" ACTION=\"$PHP_SELF?section=poll&method=update&id=$poll->id\">\n<TABLE>\n <TR><TD>Question:</TD><TD><INPUT TYPE=\"text\" NAME=\"question\" SIZE=\"35\" VALUE=\"$poll->question\"></TD></TR>\n <TR><TD>Answer 1:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer1\" SIZE=\"35\" VALUE=\"$poll->answer1\"></TD></TR>\n <TR><TD>Answer 2:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer2\" SIZE=\"35\" VALUE=\"$poll->answer2\"></TD></TR>\n <TR><TD>Answer 3:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer3\" SIZE=\"35\" VALUE=\"$poll->answer3\"></TD></TR>\n <TR><TD>Answer 4:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer4\" SIZE=\"35\" VALUE=\"$poll->answer4\"></TD></TR>\n <TR><TD>Answer 5:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer5\" SIZE=\"35\" VALUE=\"$poll->answer5\"></TD></TR>\n <TR><TD>Answer 6:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer6\" SIZE=\"35\" VALUE=\"$poll->answer6\"></TD></TR>\n <TR><TD ALIGN=\"center\" COLSPAN=\"2\"><INPUT TYPE=\"submit\" VALUE=\"Update poll\" NAME=\"add\"> <INPUT TYPE=\"reset\" VALUE=\"Reset\"></TD></TR>\n</TABLE>\n</FORM>");
}
else $theme->box("Failed", "You don't have permission to access this section.<P ALIGN=\"right\">[ <A HREF=\"javascript: history.back()\">back</A> ]</P>");
}
else if ($method == "enable") {
if ($admin) {
enablePoll($id);
$theme->box("Poll manager", "<P><B><U>Status:</U></B> poll enabled.</P>\n<P><B><U>Overview:</U></B></P>\n". adminPolls() ."<P><B><U>Add poll:</U></B></P>\n<FORM METHOD=\"post\" ACTION=\"$PHP_SELF?section=poll&method=add\">\n<TABLE>\n <TR><TD>Question:</TD><TD><INPUT TYPE=\"text\" NAME=\"question\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 1:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer1\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 2:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer2\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 3:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer3\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 4:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer4\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 5:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer5\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 6:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer6\" SIZE=\"35\"></TD></TR>\n <TR><TD ALIGN=\"center\" COLSPAN=\"2\"><INPUT TYPE=\"submit\" VALUE=\"Add poll\" NAME=\"add\"> <INPUT TYPE=\"reset\" VALUE=\"Reset\"></TD></TR>\n</TABLE>\n</FORM>");
}
else $theme->box("Failed", "You don't have permission to access this section.<P ALIGN=\"right\">[ <A HREF=\"javascript: history.back()\">back</A> ]</P>");
}
else if ($method == "delete") {
if ($admin) {
deletePoll($id);
$theme->box("Poll manager", "<P><B><U>Status:</U></B> poll deleted.</P>\n<P><B><U>Overview:</U></B></P>\n". adminPolls() ."<P><B><U>Add poll:</U></B></P>\n<FORM METHOD=\"post\" ACTION=\"$PHP_SELF?section=poll&method=add\">\n<TABLE>\n <TR><TD>Question:</TD><TD><INPUT TYPE=\"text\" NAME=\"question\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 1:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer1\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 2:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer2\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 3:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer3\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 4:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer4\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 5:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer5\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 6:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer6\" SIZE=\"35\"></TD></TR>\n <TR><TD ALIGN=\"center\" COLSPAN=\"2\"><INPUT TYPE=\"submit\" VALUE=\"Add poll\" NAME=\"add\"> <INPUT TYPE=\"reset\" VALUE=\"Reset\"></TD></TR>\n</TABLE>\n</FORM>");
}
else $theme->box("Failed", "You don't have permission to access this section.<P ALIGN=\"right\">[ <A HREF=\"javascript: history.back()\">back</A> ]</P>");
}
else if ($method == "disable") {
if ($admin) {
disablePoll($id);
$theme->box("Poll manager", "<P><B><U>Status:</U></B> poll disabled.</P>\n<P><B><U>Overview:</U></B></P>\n". adminPolls() ."<P><B><U>Add poll:</U></B></P>\n<FORM METHOD=\"post\" ACTION=\"$PHP_SELF?section=poll&method=add\">\n<TABLE>\n <TR><TD>Question:</TD><TD><INPUT TYPE=\"text\" NAME=\"question\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 1:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer1\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 2:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer2\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 3:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer3\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 4:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer4\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 5:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer5\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 6:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer6\" SIZE=\"35\"></TD></TR>\n <TR><TD ALIGN=\"center\" COLSPAN=\"2\"><INPUT TYPE=\"submit\" VALUE=\"Add poll\" NAME=\"add\"> <INPUT TYPE=\"reset\" VALUE=\"Reset\"></TD></TR>\n</TABLE>\n</FORM>");
}
else $theme->box("Failed", "You don't have permission to access this section.<P ALIGN=\"right\">[ <A HREF=\"javascript: history.back()\">back</A> ]</P>"); }
else if ($method == "update") {
if ($admin) {
updatePoll($id, $question, $answer1, $answer2, $answer3, $answer4, $answer5, $answer6);
$theme->box("Poll manager", "<P><B><U>Status:</U></B> poll updated.</P>\n<P><B><U>Overview:</U></B></P>\n". adminPolls() ."<P><B><U>Add poll:</U></B></P>\n<FORM METHOD=\"post\" ACTION=\"$PHP_SELF?section=poll&method=add\">\n<TABLE>\n <TR><TD>Question:</TD><TD><INPUT TYPE=\"text\" NAME=\"question\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 1:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer1\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 2:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer2\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 3:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer3\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 4:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer4\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 5:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer5\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 6:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer6\" SIZE=\"35\"></TD></TR>\n <TR><TD ALIGN=\"center\" COLSPAN=\"2\"><INPUT TYPE=\"submit\" VALUE=\"Add poll\" NAME=\"add\"> <INPUT TYPE=\"reset\" VALUE=\"Reset\"></TD></TR>\n</TABLE>\n</FORM>");
}
else $theme->box("Failed", "You don't have permission to access this section.<P ALIGN=\"right\">[ <A HREF=\"javascript: history.back()\">back</A> ]</P>");
}
else if ($method == "result") {
if ($id) $theme->box("Voting poll", displayResult($id));
else $theme->box("Voting poll", displayResult(getActivePoll()));
}
else if ($method == "vote") {
if ($poll) {
$theme->box("Voting poll", displayResult(getActivePoll()) ."<P><B>Note:</B> you have voted already recently.</P>");
}
else {
castVote($answer);
$theme->box("Voting poll", displayResult(getActivePoll()));
}
}
else {
if ($admin) {
$theme->box("Poll manager", "<P><B><U>Overview:</U></B></P>\n". adminPolls() ."<P><B><U>Add poll:</U></B></P>\n<FORM METHOD=\"post\" ACTION=\"$PHP_SELF?section=poll&method=add\">\n<TABLE>\n <TR><TD>Question:</TD><TD><INPUT TYPE=\"text\" NAME=\"question\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 1:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer1\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 2:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer2\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 3:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer3\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 4:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer4\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 5:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer5\" SIZE=\"35\"></TD></TR>\n <TR><TD>Answer 6:</TD><TD><INPUT TYPE=\"text\" NAME=\"answer6\" SIZE=\"35\"></TD></TR>\n <TR><TD ALIGN=\"center\" COLSPAN=\"2\"><INPUT TYPE=\"submit\" VALUE=\"Add poll\" NAME=\"add\"> <INPUT TYPE=\"reset\" VALUE=\"Reset\"></TD></TR>\n</TABLE>\n</FORM>");
}
else $theme->box("Failed", "You don't have permission to access this section.<P ALIGN=\"right\">[ <A HREF=\"javascript: history.back()\">back</A> ]</P>");
}
}
else {
if ($poll) {
$theme->box("Voting poll", displayResult(getActivePoll()) ."<P><B>Note:</B> you have voted already recently.</P>");
}
else {
$theme->box("Voting poll", displayForm() ."<P ALIGN=\"right\">[ <A HREF=\"$PHP_SELF?section=poll&method=result\"><FONT COLOR=\"$theme->hlcolor2\">results</FONT></A> ]</P>");
}
}
if (!$box) $theme->footer();
?>