summary refs log tree commit diff stats
path: root/pages/poll.php
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2008-11-19 17:27:03 -0500
committerStarla Insigna <hatkirby@fourisland.com>2008-11-19 17:27:03 -0500
commit24503e3abe705acde2df159aeae61be0d009f92e (patch)
tree8debbd53dcd0db2f5934c5e2af4e697e3787781d /pages/poll.php
downloadfourisland-24503e3abe705acde2df159aeae61be0d009f92e.tar.gz
fourisland-24503e3abe705acde2df159aeae61be0d009f92e.tar.bz2
fourisland-24503e3abe705acde2df159aeae61be0d009f92e.zip
Imported sources
Diffstat (limited to 'pages/poll.php')
-rw-r--r--pages/poll.php85
1 files changed, 85 insertions, 0 deletions
diff --git a/pages/poll.php b/pages/poll.php new file mode 100644 index 0000000..67f51a8 --- /dev/null +++ b/pages/poll.php
@@ -0,0 +1,85 @@
1<?php
2/*
3 444444444
4 4::::::::4
5 4:::::::::4
6 4::::44::::4
7 4::::4 4::::4 Four Island
8 4::::4 4::::4
9 4::::4 4::::4 Written and maintained by Starla Insigna
104::::444444::::444
114::::::::::::::::4 pages/poll.php
124444444444:::::444
13 4::::4 Please do not use, reproduce or steal the
14 4::::4 contents of this file without explicit
15 4::::4 permission from Hatkirby.
16 44::::::44
17 4::::::::4
18 4444444444
19*/
20
21if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);}
22
23require('headerproc.php');
24
25$pageCategory = 'poll';
26
27if (!isset($_GET['id']))
28{
29 $template = new FITemplate('pollIndex');
30
31 $getpolls = "SELECT * FROM polloftheweek ORDER BY id DESC";
32 $getpolls2 = mysql_query($getpolls);
33 $i=0;
34 while ($getpolls3[$i] = mysql_fetch_array($getpolls2))
35 {
36 $template->adds_block('POLL', array( 'ID' => $getpolls3[$i]['id'],
37 'QUESTION' => $getpolls3[$i]['question'],
38 'WEEK' => date('F jS Y', strtotime($getpolls3[$i]['week']))));
39 $i++;
40 }
41
42 include('pages/polloftheweek.php');
43
44 $template->display();
45} else {
46 $template = new FITemplate('poll');
47
48 $getpoll = "SELECT * FROM polloftheweek WHERE id = " . $_GET['id'];
49 $getpoll2 = mysql_query($getpoll);
50 $getpoll3 = mysql_fetch_array($getpoll2);
51
52 $template->add('QUESTION', $getpoll3['question']);
53
54 $getrss = "SELECT * FROM pollrss WHERE id = " . $_GET['id'];
55 $getrss2 = mysql_query($getrss);
56 $getrss3 = mysql_fetch_array($getrss2);
57
58 if ($getrss3['id'] == $_GET['id'])
59 {
60 $template->adds_block('COMPLETE', array( 'RSS' => parseBBCode($getrss3['rss']),
61 'AUTHOR' => $getrss3['author'],
62 'DATE' => date("F dS Y \a\\t g:i:s a",strtotime($getrss3['date'])),
63 'OPTION1' => $getpoll3['option1'],
64 'OPTION2' => $getpoll3['option2'],
65 'OPTION3' => $getpoll3['option3'],
66 'OPTION4' => $getpoll3['option4'],
67 'CLICKS1' => $getpoll3['clicks1'],
68 'CLICKS2' => $getpoll3['clicks2'],
69 'CLICKS3' => $getpoll3['clicks3'],
70 'CLICKS4' => $getpoll3['clicks4']));
71 } else {
72 $template->adds_block('INCOMPLETE', array('exi'=>1));
73 }
74
75 $forceDisplay = $_GET['id'];
76 include('pages/polloftheweek.php');
77 unset($forceDisplay);
78
79 $template->display();
80
81 $page_id = 'polloftheweek-' . $getpoll3['id'];
82 include('includes/comments.php');
83}
84
85?>