diff options
author | Starla Insigna <starla4444@gmail.com> | 2011-01-30 14:10:39 -0500 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2011-01-30 14:10:39 -0500 |
commit | a4976f966f0de5abc11235e8decb760ad79ecad1 (patch) | |
tree | 1c1ec1c5fd31a66b543bd9f092a1295de5bbdd42 | |
parent | 74db7a24d9c2230b104979f4e4981c57ff73de71 (diff) | |
download | fourisland-a4976f966f0de5abc11235e8decb760ad79ecad1.tar.gz fourisland-a4976f966f0de5abc11235e8decb760ad79ecad1.tar.bz2 fourisland-a4976f966f0de5abc11235e8decb760ad79ecad1.zip |
Removed deleted files from previous commit
Wow, that took a long time to notice.
-rwxr-xr-x | admin/editPoll.php | 118 | ||||
-rwxr-xr-x | admin/newPoll.php | 114 | ||||
-rwxr-xr-x | admin/polls.php | 98 | ||||
-rwxr-xr-x | pages/poll-results.php | 49 | ||||
-rwxr-xr-x | pages/poll.php | 104 | ||||
-rwxr-xr-x | pages/polloftheweek.php | 56 | ||||
-rwxr-xr-x | theme/admin/polls.tpl | 94 | ||||
-rwxr-xr-x | theme/admin/writePoll.tpl | 76 | ||||
-rwxr-xr-x | theme/poll.tpl | 24 | ||||
-rwxr-xr-x | theme/pollIndex.tpl | 10 | ||||
-rwxr-xr-x | theme/polloftheweek.tpl | 59 | ||||
-rwxr-xr-x | theme/related.tpl | 9 |
12 files changed, 0 insertions, 811 deletions
diff --git a/admin/editPoll.php b/admin/editPoll.php deleted file mode 100755 index 425f33c..0000000 --- a/admin/editPoll.php +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
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 | ||
10 | 4::::444444::::444 | ||
11 | 4::::::::::::::::4 admin/editPoll.php | ||
12 | 4444444444:::::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 | |||
21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
22 | |||
23 | require('headerproc.php'); | ||
24 | |||
25 | $category = 'polls'; | ||
26 | $pageaid = 'quotes'; | ||
27 | |||
28 | $template = new FITemplate('admin/writePoll'); | ||
29 | $template->add('TITLE', 'Edit Poll'); | ||
30 | $template->add('ACTION', '/admin/editPoll.php?id=' . $_GET['id'] . '&submit='); | ||
31 | |||
32 | if (isset($_GET['submit'])) | ||
33 | { | ||
34 | if (empty($_POST['question'])) | ||
35 | { | ||
36 | $errors[] = array( 'field' => 'question', | ||
37 | 'text' => 'Question is a required field'); | ||
38 | } | ||
39 | |||
40 | if (empty($_POST['option1'])) | ||
41 | { | ||
42 | $errors[] = array( 'field' => 'option1', | ||
43 | 'text' => 'Option 1 is a required field'); | ||
44 | } | ||
45 | |||
46 | if (empty($_POST['option2'])) | ||
47 | { | ||
48 | $errors[] = array( 'field' => 'option2', | ||
49 | 'text' => 'Option 2 is a required field'); | ||
50 | } | ||
51 | |||
52 | if (empty($_POST['option3'])) | ||
53 | { | ||
54 | $errors[] = array( 'field' => 'option3', | ||
55 | 'text' => 'Option 3 is a required field'); | ||
56 | } | ||
57 | |||
58 | if (empty($_POST['option4'])) | ||
59 | { | ||
60 | $errors[] = array( 'field' => 'option4', | ||
61 | 'text' => 'Option 4 is a required field'); | ||
62 | } | ||
63 | |||
64 | if (isset($errors)) | ||
65 | { | ||
66 | $template->adds_block('ISERROR',array('exi'=>1)); | ||
67 | |||
68 | $eid = 0; | ||
69 | foreach ($errors as $error) | ||
70 | { | ||
71 | $template->adds_block('ERROR', array( 'ID' => $eid, | ||
72 | 'TEXT' => $error['text'])); | ||
73 | $template->add('IS' . strtoupper($error['field']) . 'ERROR', ' error'); | ||
74 | $template->adds_block(strtoupper($error['field']) . 'ERROR', array( 'ID' => $eid, | ||
75 | 'TEXT' => $error['text'])); | ||
76 | |||
77 | $eid++; | ||
78 | } | ||
79 | |||
80 | $getpoll = "SELECT * FROM polloftheweek WHERE id = " . $_GET['id']; | ||
81 | $getpoll2 = mysql_query($getpoll); | ||
82 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
83 | |||
84 | $template->add('QUESTIONVALUE', htmlentities($_POST['question'])); | ||
85 | $template->add('OPTION1VALUE', htmlentities($_POST['option1'])); | ||
86 | $template->add('OPTION2VALUE', htmlentities($_POST['option2'])); | ||
87 | $template->add('OPTION3VALUE', htmlentities($_POST['option3'])); | ||
88 | $template->add('OPTION4VALUE', htmlentities($_POST['option4'])); | ||
89 | $template->add('TEXTVALUE', $_POST['text']); | ||
90 | } else { | ||
91 | $inspoll = "UPDATE polloftheweek SET question = \"" . mysql_real_escape_string($_POST['question']) . "\", option1 = \"" . mysql_real_escape_string($_POST['option1']) . "\", option2 = \"" . mysql_real_escape_string($_POST['option2']) . "\", option3 = \"" . mysql_real_escape_string($_POST['option3']) . "\", option4 = \"" . mysql_real_escape_string($_POST['option4']) . "\", text = \"" . mysql_real_escape_string($_POST['text']) . "\" WHERE id = " . $_GET['id']; | ||
92 | $inspoll2 = mysql_query($inspoll); | ||
93 | |||
94 | $template->add('QUESTIONVALUE', htmlentities($_POST['question'])); | ||
95 | $template->add('OPTION1VALUE', htmlentities($_POST['option1'])); | ||
96 | $template->add('OPTION2VALUE', htmlentities($_POST['option2'])); | ||
97 | $template->add('OPTION3VALUE', htmlentities($_POST['option3'])); | ||
98 | $template->add('OPTION4VALUE', htmlentities($_POST['option4'])); | ||
99 | $template->add('TEXTVALUE', $_POST['text']); | ||
100 | |||
101 | $template->adds_block('FLASH', array('TEXT' => 'Your poll has been sucessfully edited. <a href="/poll/' . $_GET['id'] . '.php">View poll</a>.')); | ||
102 | } | ||
103 | } else { | ||
104 | $getpoll = "SELECT * FROM polloftheweek WHERE id = " . $_GET['id']; | ||
105 | $getpoll2 = mysql_query($getpoll); | ||
106 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
107 | |||
108 | $template->add('QUESTIONVALUE', htmlentities($getpoll3['question'])); | ||
109 | $template->add('OPTION1VALUE', htmlentities($getpoll3['option1'])); | ||
110 | $template->add('OPTION2VALUE', htmlentities($getpoll3['option2'])); | ||
111 | $template->add('OPTION3VALUE', htmlentities($getpoll3['option3'])); | ||
112 | $template->add('OPTION4VALUE', htmlentities($getpoll3['option4'])); | ||
113 | $template->add('TEXTVALUE', $getpoll3['text']); | ||
114 | } | ||
115 | |||
116 | $template->display(); | ||
117 | |||
118 | ?> | ||
diff --git a/admin/newPoll.php b/admin/newPoll.php deleted file mode 100755 index d105f45..0000000 --- a/admin/newPoll.php +++ /dev/null | |||
@@ -1,114 +0,0 @@ | |||
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 | ||
10 | 4::::444444::::444 | ||
11 | 4::::::::::::::::4 admin/newPoll.php | ||
12 | 4444444444:::::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 | |||
21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
22 | |||
23 | require('headerproc.php'); | ||
24 | |||
25 | $category = 'polls'; | ||
26 | $pageaid = 'newpoll'; | ||
27 | |||
28 | $template = new FITemplate('admin/writePoll'); | ||
29 | |||
30 | if (isset($_GET['submit'])) | ||
31 | { | ||
32 | if (empty($_POST['question'])) | ||
33 | { | ||
34 | $errors[] = array( 'field' => 'question', | ||
35 | 'text' => 'Question is a required field'); | ||
36 | } | ||
37 | |||
38 | if (empty($_POST['option1'])) | ||
39 | { | ||
40 | $errors[] = array( 'field' => 'option1', | ||
41 | 'text' => 'Option 1 is a required field'); | ||
42 | } | ||
43 | |||
44 | if (empty($_POST['option2'])) | ||
45 | { | ||
46 | $errors[] = array( 'field' => 'option2', | ||
47 | 'text' => 'Option 2 is a required field'); | ||
48 | } | ||
49 | |||
50 | if (empty($_POST['option3'])) | ||
51 | { | ||
52 | $errors[] = array( 'field' => 'option3', | ||
53 | 'text' => 'Option 3 is a required field'); | ||
54 | } | ||
55 | |||
56 | if (empty($_POST['option4'])) | ||
57 | { | ||
58 | $errors[] = array( 'field' => 'option4', | ||
59 | 'text' => 'Option 4 is a required field'); | ||
60 | } | ||
61 | |||
62 | if (isset($errors)) | ||
63 | { | ||
64 | $template->adds_block('ISERROR',array('exi'=>1)); | ||
65 | |||
66 | $eid = 0; | ||
67 | foreach ($errors as $error) | ||
68 | { | ||
69 | $template->adds_block('ERROR', array( 'ID' => $eid, | ||
70 | 'TEXT' => $error['text'])); | ||
71 | $template->add('IS' . strtoupper($error['field']) . 'ERROR', ' error'); | ||
72 | $template->adds_block(strtoupper($error['field']) . 'ERROR', array( 'ID' => $eid, | ||
73 | 'TEXT' => $error['text'])); | ||
74 | |||
75 | $eid++; | ||
76 | } | ||
77 | |||
78 | $template->add('TITLE', 'New Poll'); | ||
79 | $template->add('ACTION', '/admin/newPoll.php?submit='); | ||
80 | |||
81 | $template->add('QUESTIONVALUE', htmlentities($_POST['question'])); | ||
82 | $template->add('OPTION1VALUE', htmlentities($_POST['option1'])); | ||
83 | $template->add('OPTION2VALUE', htmlentities($_POST['option2'])); | ||
84 | $template->add('OPTION3VALUE', htmlentities($_POST['option3'])); | ||
85 | $template->add('OPTION4VALUE', htmlentities($_POST['option4'])); | ||
86 | $template->add('TEXTVALUE', htmlentities($_POST['text'])); | ||
87 | } else { | ||
88 | $inspoll = "INSERT INTO polloftheweek (question,option1,option2,option3,option4,text) VALUES (\"" . mysql_real_escape_string($_POST['question']) . "\",\"" . mysql_real_escape_string($_POST['option1']) . "\",\"" . mysql_real_escape_string($_POST['option2']) . "\",\"" . mysql_real_escape_string($_POST['option3']) . "\",\"" . mysql_real_escape_string($_POST['option4']) . "\",\"" . mysql_real_escape_string($_POST['text']) . "\")"; | ||
89 | $inspoll2 = mysql_query($inspoll); | ||
90 | |||
91 | $id = mysql_insert_id(); | ||
92 | |||
93 | $cleardid = "TRUNCATE TABLE didpollalready"; | ||
94 | $cleardid2 = mysql_query($cleardid); | ||
95 | |||
96 | $template->add('QUESTIONVALUE', htmlentities($_POST['question'])); | ||
97 | $template->add('OPTION1VALUE', htmlentities($_POST['option1'])); | ||
98 | $template->add('OPTION2VALUE', htmlentities($_POST['option2'])); | ||
99 | $template->add('OPTION3VALUE', htmlentities($_POST['option3'])); | ||
100 | $template->add('OPTION4VALUE', htmlentities($_POST['option4'])); | ||
101 | $template->add('TEXTVALUE', htmlentities($_POST['text'])); | ||
102 | |||
103 | $template->add('TITLE', 'Edit Poll'); | ||
104 | $template->add('ACTION', '/admin/editPoll.php?id=' . $id . '&submit='); | ||
105 | $template->adds_block('FLASH', array('TEXT' => 'Your poll has been sucessfully created. <a href="/poll/' . $id . '.php">View poll</a>.')); | ||
106 | } | ||
107 | } else { | ||
108 | $template->add('TITLE', 'New Poll'); | ||
109 | $template->add('ACTION', '/admin/newPoll.php?submit='); | ||
110 | } | ||
111 | |||
112 | $template->display(); | ||
113 | |||
114 | ?> | ||
diff --git a/admin/polls.php b/admin/polls.php deleted file mode 100755 index e4239fa..0000000 --- a/admin/polls.php +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
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 | ||
10 | 4::::444444::::444 | ||
11 | 4::::::::::::::::4 admin/polls.php | ||
12 | 4444444444:::::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 | |||
21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
22 | |||
23 | require('headerproc.php'); | ||
24 | require_once('Pager.php'); | ||
25 | |||
26 | $category = 'polls'; | ||
27 | $pageaid = 'polls'; | ||
28 | |||
29 | if (isset($_GET['action'])) | ||
30 | { | ||
31 | if ($_GET['action'] == 'delete') | ||
32 | { | ||
33 | if (is_numeric($_POST['id'])) | ||
34 | { | ||
35 | $delpoll = "DELETE FROM polloftheweek WHERE id = " . $_POST['id']; | ||
36 | $delpoll2 = mysql_query($delpoll); | ||
37 | |||
38 | $flashmsg = 'The selected poll has been deleted.'; | ||
39 | } | ||
40 | } else if ($_GET['action'] == 'deletes') | ||
41 | { | ||
42 | $ids = explode(',', $_POST['ids']); | ||
43 | |||
44 | if (is_array($ids) && !empty($ids)) | ||
45 | { | ||
46 | foreach ($ids as $id) | ||
47 | { | ||
48 | $delpoll = "DELETE FROM polloftheweek WHERE id = " . $id; | ||
49 | $delpoll2 = mysql_query($delpoll); | ||
50 | } | ||
51 | |||
52 | $flashmsg = 'The selected polls have been deleted.'; | ||
53 | } | ||
54 | } | ||
55 | } | ||
56 | |||
57 | $template = new FITemplate('admin/polls'); | ||
58 | |||
59 | $getposts = "SELECT * FROM polloftheweek ORDER BY id DESC"; | ||
60 | $getposts2 = mysql_query($getposts); | ||
61 | $i=0; | ||
62 | while ($getposts3[$i] = mysql_fetch_array($getposts2)) | ||
63 | { | ||
64 | $i++; | ||
65 | } | ||
66 | |||
67 | if ($i != 0) | ||
68 | { | ||
69 | $template->adds_block('AVAIL',array('exi'=>1)); | ||
70 | } else { | ||
71 | $template->adds_block('NOTAVAIL',array('exi'=>1)); | ||
72 | } | ||
73 | |||
74 | $pager = &Pager::factory(array( 'mode' => 'Sliding', | ||
75 | 'perPage' => 20, | ||
76 | 'delta' => 2, | ||
77 | 'itemData' => $getposts3)); | ||
78 | |||
79 | $j=0; | ||
80 | |||
81 | foreach ($pager->getPageData() as $post) | ||
82 | { | ||
83 | if (!empty($post)) | ||
84 | { | ||
85 | $template->adds_block('POST', array( 'TITLE' => htmlentities($post['question']), | ||
86 | 'ID' => $post['id'], | ||
87 | 'ODD' => ($j % 2 ? '' : ' class="odd"'))); | ||
88 | } | ||
89 | |||
90 | $j++; | ||
91 | } | ||
92 | |||
93 | $template->add('PAGEID', $pager->getCurrentPageID()); | ||
94 | $template->add('PAGINATION', $pager->links); | ||
95 | |||
96 | $template->display(); | ||
97 | |||
98 | ?> | ||
diff --git a/pages/poll-results.php b/pages/poll-results.php deleted file mode 100755 index e2fe154..0000000 --- a/pages/poll-results.php +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
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 | ||
10 | 4::::444444::::444 | ||
11 | 4::::::::::::::::4 pages/poll-results.php | ||
12 | 4444444444:::::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 | |||
21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
22 | |||
23 | require('headerproc.php'); | ||
24 | |||
25 | if ((isset($_GET['id'])) && (is_numeric($_GET['id'])) && ($_GET['id'] >= 1) && ($_GET['id'] <= 4)) | ||
26 | { | ||
27 | $getip = "SELECT * FROM didpollalready WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; | ||
28 | $getip2 = mysql_query($getip); | ||
29 | $getip3 = mysql_fetch_array($getip2); | ||
30 | |||
31 | if ($getip3['ip'] != $_SERVER['REMOTE_ADDR']) | ||
32 | { | ||
33 | $setip = "INSERT INTO didpollalready SET ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; | ||
34 | $setip2 = mysql_query($setip); | ||
35 | $getpoll = "SELECT * FROM polloftheweek ORDER BY id DESC LIMIT 0,1"; | ||
36 | $getpoll2 = mysql_query($getpoll); | ||
37 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
38 | $setpoll = "UPDATE polloftheweek SET clicks" . $_GET['id'] . " = " . ($getpoll3['clicks' . $_GET['id']]+1) . " WHERE id = " . $getpoll3['id']; | ||
39 | $setpoll2 = mysql_query($setpoll); | ||
40 | |||
41 | die(getPollOfTheWeek()); | ||
42 | } else { | ||
43 | generateError('404'); | ||
44 | } | ||
45 | } else { | ||
46 | generateError('404'); | ||
47 | } | ||
48 | |||
49 | ?> | ||
diff --git a/pages/poll.php b/pages/poll.php deleted file mode 100755 index c7cc909..0000000 --- a/pages/poll.php +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
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 | ||
10 | 4::::444444::::444 | ||
11 | 4::::::::::::::::4 pages/poll.php | ||
12 | 4444444444:::::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 | |||
21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
22 | |||
23 | require('headerproc.php'); | ||
24 | |||
25 | $pageCategory = 'poll'; | ||
26 | |||
27 | if (!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 | $question = strip_tags($getpolls3[$i]['question']); | ||
37 | if (strlen($question) > 50) | ||
38 | { | ||
39 | $question = substr($question, 0, 50); | ||
40 | while (substr($question, strlen($question)-1) != ' ') | ||
41 | { | ||
42 | $question = substr($question, 0, strlen($question)-1); | ||
43 | } | ||
44 | |||
45 | $question = substr($question, 0, strlen($question)-1); | ||
46 | $question .= '....'; | ||
47 | } | ||
48 | $template->adds_block('POLL', array( 'ID' => $getpolls3[$i]['id'], | ||
49 | 'QUESTION' => doAprilFoolsDay(htmlentities(stripslashes($question))), | ||
50 | 'WEEK' => date('F jS Y', strtotime($getpolls3[$i]['week'])), | ||
51 | 'EVEN' => (($i % 2 == 1) ? ' class="even"' : ''))); | ||
52 | $i++; | ||
53 | } | ||
54 | |||
55 | $cntpolls = "SELECT COUNT(*) FROM polloftheweek"; | ||
56 | $cntpolls2 = mysql_query($cntpolls); | ||
57 | $cntpolls3 = mysql_fetch_array($cntpolls2); | ||
58 | if ($start < floor($cntpolls3['COUNT(*)'] / 10)) | ||
59 | { | ||
60 | $template->adds_block('NEXT', array('ID' => ($start+1))); | ||
61 | } | ||
62 | |||
63 | $template->display(); | ||
64 | } else { | ||
65 | $template = new FITemplate('poll'); | ||
66 | |||
67 | $getpoll = "SELECT * FROM polloftheweek WHERE id = " . $_GET['id']; | ||
68 | $getpoll2 = mysql_query($getpoll); | ||
69 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
70 | |||
71 | if ($getpoll3['id'] == $_GET['id']) | ||
72 | { | ||
73 | $template->add('QUESTION', htmlentities(stripslashes($getpoll3['question']))); | ||
74 | |||
75 | if ($getpoll3['text'] != '') | ||
76 | { | ||
77 | $template->adds_block('COMPLETE', array( 'RSS' => parseText(stripslashes($getpoll3['text'])), | ||
78 | 'AUTHOR' => $getrss3['author'], | ||
79 | 'DATE' => date("F jS Y \a\\t g:i:s a",strtotime($getpoll3['week'])), | ||
80 | 'OPTION1' => doAprilFoolsDay(stripslashes($getpoll3['option1'])), | ||
81 | 'OPTION2' => doAprilFoolsDay(stripslashes($getpoll3['option2'])), | ||
82 | 'OPTION3' => doAprilFoolsDay(stripslashes($getpoll3['option3'])), | ||
83 | 'OPTION4' => doAprilFoolsDay(stripslashes($getpoll3['option4'])), | ||
84 | 'CLICKS1' => $getpoll3['clicks1'], | ||
85 | 'CLICKS2' => $getpoll3['clicks2'], | ||
86 | 'CLICKS3' => $getpoll3['clicks3'], | ||
87 | 'CLICKS4' => $getpoll3['clicks4'])); | ||
88 | } else { | ||
89 | $template->adds_block('INCOMPLETE', array('exi'=>1)); | ||
90 | } | ||
91 | |||
92 | $template->add('POTW', getPollOfTheWeek($_GET['id'])); | ||
93 | $template->display(); | ||
94 | |||
95 | $page_id = 'polloftheweek-' . $getpoll3['id']; | ||
96 | include('includes/comments.php'); | ||
97 | |||
98 | displayRelated($getpoll3['question']); | ||
99 | } else { | ||
100 | generateError('404'); | ||
101 | } | ||
102 | } | ||
103 | |||
104 | ?> | ||
diff --git a/pages/polloftheweek.php b/pages/polloftheweek.php deleted file mode 100755 index 0410151..0000000 --- a/pages/polloftheweek.php +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
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 | ||
10 | 4::::444444::::444 | ||
11 | 4::::::::::::::::4 pages/polloftheweek.php | ||
12 | 4444444444:::::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 | |||
21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
22 | |||
23 | require('headerproc.php'); | ||
24 | |||
25 | if (!isset($forceDisplay)) | ||
26 | { | ||
27 | $getpoll = "SELECT * FROM polloftheweek ORDER BY id DESC LIMIT 0,1"; | ||
28 | } else { | ||
29 | $getpoll = "SELECT * FROM polloftheweek WHERE id = " . $forceDisplay; | ||
30 | } | ||
31 | $getpoll2 = mysql_query($getpoll); | ||
32 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
33 | |||
34 | $template->add('QUESTION', $getpoll3['question']); | ||
35 | $template->add('OPTION1', $getpoll3['option1']); | ||
36 | $template->add('OPTION2', $getpoll3['option2']); | ||
37 | $template->add('OPTION3', $getpoll3['option3']); | ||
38 | $template->add('OPTION4', $getpoll3['option4']); | ||
39 | |||
40 | $getip = "SELECT * FROM didpollalready WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; | ||
41 | $getip2 = mysql_query($getip); | ||
42 | $getip3 = mysql_fetch_array($getip2); | ||
43 | |||
44 | if (($getip3['ip'] != $_SERVER['REMOTE_ADDR']) && (!isset($forceDisplay))) | ||
45 | { | ||
46 | $template->adds_block('FORM',array('exi'=>1)); | ||
47 | } else { | ||
48 | $template->adds_block('DISPLAY',array('exi'=>1)); | ||
49 | |||
50 | $template->add('PERCENT1', getpercent($getpoll3,'1')); | ||
51 | $template->add('PERCENT2', getpercent($getpoll3,'2')); | ||
52 | $template->add('PERCENT3', getpercent($getpoll3,'3')); | ||
53 | $template->add('PERCENT4', getpercent($getpoll3,'4')); | ||
54 | } | ||
55 | |||
56 | ?> | ||
diff --git a/theme/admin/polls.tpl b/theme/admin/polls.tpl deleted file mode 100755 index 81613a9..0000000 --- a/theme/admin/polls.tpl +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | <h2>Manage Polls</h2> | ||
2 | |||
3 | <div class="clear"></div> | ||
4 | |||
5 | <script type="text/javascript"> | ||
6 | function deletePoll(id) | ||
7 | { | ||
8 | if (confirm("Are you sure you would like to delete this poll?")) | ||
9 | { | ||
10 | postwith("/admin/polls.php?pageID=<!--PAGEID-->&action=delete",{id:id}); | ||
11 | } | ||
12 | } | ||
13 | |||
14 | // following function taken from http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/ | ||
15 | function postwith (to,p) { | ||
16 | var myForm = document.createElement("form"); | ||
17 | myForm.method="post" ; | ||
18 | myForm.action = to ; | ||
19 | for (var k in p) { | ||
20 | var myInput = document.createElement("input") ; | ||
21 | myInput.setAttribute("name", k) ; | ||
22 | myInput.setAttribute("value", p[k]); | ||
23 | myForm.appendChild(myInput) ; | ||
24 | } | ||
25 | document.body.appendChild(myForm) ; | ||
26 | myForm.submit() ; | ||
27 | document.body.removeChild(myForm) ; | ||
28 | } | ||
29 | |||
30 | function bulkAction() | ||
31 | { | ||
32 | var bulk=new Array(); | ||
33 | $(".the-check:checked").each(function() { | ||
34 | bulk.push($(this).val()); | ||
35 | }); | ||
36 | var ids = bulk.join(",") | ||
37 | |||
38 | if (ids != "") | ||
39 | { | ||
40 | if ($('#manage-bulk select').val() == "delete") | ||
41 | { | ||
42 | if (confirm("Are you sure you would like to delete the selected polls?")) | ||
43 | { | ||
44 | postwith("/admin/polls.php?pageID=<!--PAGEID-->&action=deletes",{ids:ids}); | ||
45 | } | ||
46 | } | ||
47 | } | ||
48 | } | ||
49 | |||
50 | $(document).ready(function() { | ||
51 | $("input#all-check").click(function() { | ||
52 | var what = this.checked; | ||
53 | $("input.the-check").each(function() { | ||
54 | this.checked = what; | ||
55 | }); | ||
56 | }); | ||
57 | }); | ||
58 | </script> | ||
59 | |||
60 | <!--BEGIN AVAIL--> | ||
61 | <div id="manage-options"> | ||
62 | <div id="manage-bulk"> | ||
63 | <select name="bulk-type"> | ||
64 | <option value="delete">Delete</option> | ||
65 | </select> | ||
66 | |||
67 | <button id="bulk" type="button" onclick="bulkAction()">Bulk</button> | ||
68 | </div> | ||
69 | </div> | ||
70 | |||
71 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
72 | |||
73 | <table> | ||
74 | <tr class="table-header"> | ||
75 | <td class="table-checkbox"><input type="checkbox" id="all-check" /></td> | ||
76 | <td>Question</td> | ||
77 | <td colspan="3">Actions</td> | ||
78 | </tr> | ||
79 | <!--BEGIN POST--> | ||
80 | <tr<!--POST.ODD-->> | ||
81 | <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--POST.ID-->" /></td> | ||
82 | <td><!--POST.TITLE--></td> | ||
83 | <td class="table-img"><a href="/admin/editPoll.php?id=<!--POST.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a></td> | ||
84 | <td class="table-img"><a href="#" onclick="deletePoll(<!--POST.ID-->)"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a></td> | ||
85 | <td class="table-img"><a href="/poll/<!--POST.ID-->.php"><img src="/theme/images/icons/page_go.png" alt="View" /></a></td> | ||
86 | </tr> | ||
87 | <!--END POST--> | ||
88 | </table> | ||
89 | |||
90 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
91 | <!--END AVAIL--> | ||
92 | <!--BEGIN NOTAVAIL--> | ||
93 | <div class="manage-pagination">There are no polls.</div> | ||
94 | <!--END NOTAVAIL--> | ||
diff --git a/theme/admin/writePoll.tpl b/theme/admin/writePoll.tpl deleted file mode 100755 index a40eb5e..0000000 --- a/theme/admin/writePoll.tpl +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | <h2><!--TITLE--></h2> | ||
2 | |||
3 | <form action="<!--ACTION-->" method="post" class="uniForm"> | ||
4 | <!--BEGIN ISERROR--> | ||
5 | <div id="errorMsg"> | ||
6 | <h3>Oops! There was an error!</h3> | ||
7 | |||
8 | <ol> | ||
9 | <!--BEGIN ERROR--> | ||
10 | <li><a href="#error<!--ERROR.ID-->" title="Jump to error"><!--ERROR.TEXT--></a></li> | ||
11 | <!--END ERROR--> | ||
12 | </ol> | ||
13 | </div> | ||
14 | <!--END ISERROR--> | ||
15 | |||
16 | <!--BEGIN FLASH--> | ||
17 | <div id="OKMsg"><p><!--FLASH.TEXT--></p></div> | ||
18 | <!--END FLASH--> | ||
19 | |||
20 | <fieldset class="inlineLabels"> | ||
21 | <div class="ctrlHolder<!--ISQUESTIONERROR-->"> | ||
22 | <!--BEGIN QUESTIONERROR--> | ||
23 | <p id="error<!--QUESTIONERROR.ID-->" class="errorField"><strong><!--QUESTIONERROR.TEXT--></strong></p> | ||
24 | <!--END QUESTIONERROR--> | ||
25 | <label for="question"><em>*</em> Question</label> | ||
26 | <input name="question" id="question" value="<!--QUESTIONVALUE-->" type="text" class="textInput" /> | ||
27 | </div> | ||
28 | |||
29 | <div class="ctrlHolder<!--ISOPTION1ERROR-->"> | ||
30 | <!--BEGIN OPTION1ERROR--> | ||
31 | <p id="error<!--OPTION1ERROR.ID-->" class="errorField"><strong><!--OPTION1ERROR.ID--></strong></p> | ||
32 | <!--END OPTION1ERROR--> | ||
33 | <label for="option1"><em>*</em> Option 1</label> | ||
34 | <input name="option1" id="option1" value="<!--OPTION1VALUE-->" type="text" class="textInput" /> | ||
35 | </div> | ||
36 | |||
37 | <div class="ctrlHolder<!--ISOPTION2ERROR-->"> | ||
38 | <!--BEGIN OPTION2ERROR--> | ||
39 | <p id="error<!--OPTION2ERROR.ID-->" class="errorField"><strong><!--OPTION2ERROR.ID--></strong></p> | ||
40 | <!--END OPTION2ERROR--> | ||
41 | <label for="option2"><em>*</em> Option 2</label> | ||
42 | <input name="option2" id="option2" value="<!--OPTION2VALUE-->" type="text" class="textInput" /> | ||
43 | </div> | ||
44 | |||
45 | <div class="ctrlHolder<!--ISOPTION3ERROR-->"> | ||
46 | <!--BEGIN OPTION3ERROR--> | ||
47 | <p id="error<!--OPTION3ERROR.ID-->" class="errorField"><strong><!--OPTION3ERROR.ID--></strong></p> | ||
48 | <!--END OPTION3ERROR--> | ||
49 | <label for="option3"><em>*</em> Option 3</label> | ||
50 | <input name="option3" id="option3" value="<!--OPTION3VALUE-->" type="text" class="textInput" /> | ||
51 | </div> | ||
52 | |||
53 | <div class="ctrlHolder<!--ISOPTION4ERROR-->"> | ||
54 | <!--BEGIN OPTION4ERROR--> | ||
55 | <p id="error<!--OPTION4ERROR.ID-->" class="errorField"><strong><!--OPTION4ERROR.ID--></strong></p> | ||
56 | <!--END OPTION4ERROR--> | ||
57 | <label for="option4"><em>*</em> Option 4</label> | ||
58 | <input name="option4" id="option4" value="<!--OPTION4VALUE-->" type="text" class="textInput" /> | ||
59 | </div> | ||
60 | </fieldset> | ||
61 | |||
62 | <fieldset class="blockLabels"> | ||
63 | <div class="ctrlHolder<!--ISTEXTERROR-->"> | ||
64 | <!--BEGIN TEXTERROR--> | ||
65 | <p id="error<!--TEXTERROR.ID-->" class="errorField"><strong><!--TEXTERROR.TEXT--></strong></p> | ||
66 | <!--END TEXTERROR--> | ||
67 | <label for="text">Text</label> | ||
68 | <textarea name="text" id="text"><!--TEXTVALUE--></textarea> | ||
69 | </div> | ||
70 | </fieldset> | ||
71 | |||
72 | <div class="buttonHolder"> | ||
73 | <button type="reset" class="resetButton">Reset</button> | ||
74 | <button type="submit" class="primaryAction">Submit</button> | ||
75 | </div> | ||
76 | </form> | ||
diff --git a/theme/poll.tpl b/theme/poll.tpl deleted file mode 100755 index 9547214..0000000 --- a/theme/poll.tpl +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | <h2 class="light-at-night"><!--QUESTION--></h2> | ||
2 | |||
3 | <div class="module rounded center sidebar"> | ||
4 | <!--POTW--> | ||
5 | </div> | ||
6 | |||
7 | <div class="module rounded"> | ||
8 | <!--BEGIN COMPLETE--> | ||
9 | <!--COMPLETE.RSS--> | ||
10 | |||
11 | <p> | ||
12 | <!--COMPLETE.OPTION1--> - <!--COMPLETE.CLICKS1--> vote(s)!<br /> | ||
13 | <!--COMPLETE.OPTION2--> - <!--COMPLETE.CLICKS2--> vote(s)!<br /> | ||
14 | <!--COMPLETE.OPTION3--> - <!--COMPLETE.CLICKS3--> vote(s)!<br /> | ||
15 | <!--COMPLETE.OPTION4--> - <!--COMPLETE.CLICKS4--> vote(s)! | ||
16 | </p> | ||
17 | </div> | ||
18 | |||
19 | <cite class="rounded"><!--COMPLETE.DATE--></cite> | ||
20 | <!--END COMPLETE--> | ||
21 | <!--BEGIN INCOMPLETE--> | ||
22 | The results of this poll of the week are pending. Meanwhile, if you haven't voted yet, why not do so? | ||
23 | </div> | ||
24 | <!--END INCOMPLETE--> | ||
diff --git a/theme/pollIndex.tpl b/theme/pollIndex.tpl deleted file mode 100755 index d3788db..0000000 --- a/theme/pollIndex.tpl +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | <h2 class="light-at-night">Poll of the Week</h2> | ||
2 | |||
3 | <p class="light-at-night">Welcome to the Poll of the Week! Feel free to vote on these! You can review old ones and also comment on them if you're logged in using the links below!</p> | ||
4 | |||
5 | <table class="webmail"> | ||
6 | <tr><th>Question</th><th>Week</th></tr> | ||
7 | <!--BEGIN POLL--> | ||
8 | <tr<!--POLL.EVEN-->><td><a href="/poll/<!--POLL.ID-->.php"><!--POLL.QUESTION--></a></td><td class="nobr"><!--POLL.WEEK--></td></tr> | ||
9 | <!--END POLL--> | ||
10 | </table> | ||
diff --git a/theme/polloftheweek.tpl b/theme/polloftheweek.tpl deleted file mode 100755 index dfbc772..0000000 --- a/theme/polloftheweek.tpl +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | <!--BEGIN FORM--> | ||
2 | <div id="potw-ajax"> | ||
3 | <span style="font-size: 16px; text-align: center"> | ||
4 | <a href="/poll/<!--ID-->.php"><!--QUESTION--></a> | ||
5 | </span> | ||
6 | |||
7 | <br /> | ||
8 | |||
9 | <input type="radio" name="options" value="1" class="option1" /> | ||
10 | <!--OPTION1--> | ||
11 | |||
12 | <br /> | ||
13 | |||
14 | <input type="radio" name="options" value="2" class="option2" /> | ||
15 | <!--OPTION2--> | ||
16 | |||
17 | <br /> | ||
18 | |||
19 | <input type="radio" name="options" value="3" class="option3" /> | ||
20 | <!--OPTION3--> | ||
21 | |||
22 | <br /> | ||
23 | |||
24 | <input type="radio" name="options" value="4" class="option4" /> | ||
25 | <!--OPTION4--> | ||
26 | |||
27 | <p align="center"> | ||
28 | <button type="button" onclick="jQuery('#potw-ajax').slideUp().load('/poll-results.php?id='+jQuery('#potw-ajax input:radio[name=options]:checked').val()).slideDown();">Vote!</button> | ||
29 | </p> | ||
30 | </div> | ||
31 | <!--END FORM--> | ||
32 | |||
33 | <!--BEGIN DISPLAY--> | ||
34 | <span style="font-size: 16px; text-align: center"> | ||
35 | <a href="/poll/<!--ID-->.php"><!--QUESTION--></a> | ||
36 | </span> | ||
37 | |||
38 | <table width="100%" border="0" style="font-size: 12px"> | ||
39 | <tr> | ||
40 | <td>%<!--PERCENT1--></td> | ||
41 | <td><!--OPTION1--></td> | ||
42 | </tr> | ||
43 | |||
44 | <tr> | ||
45 | <td>%<!--PERCENT2--></td> | ||
46 | <td><!--OPTION2--></td> | ||
47 | </tr> | ||
48 | |||
49 | <tr> | ||
50 | <td>%<!--PERCENT3--></td> | ||
51 | <td><!--OPTION3--></td> | ||
52 | </tr> | ||
53 | |||
54 | <tr> | ||
55 | <td>%<!--PERCENT4--></td> | ||
56 | <td><!--OPTION4--></td> | ||
57 | </tr> | ||
58 | </table> | ||
59 | <!--END DISPLAY--> | ||
diff --git a/theme/related.tpl b/theme/related.tpl deleted file mode 100755 index 783b253..0000000 --- a/theme/related.tpl +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | <div class="cleardiv"></div> | ||
2 | |||
3 | <div class="module rounded"> | ||
4 | <!--BEGIN POST--> | ||
5 | <a href="/blog/<!--POST.CODED-->/"><!--POST.TITLE--></a> by <a href="/blog/author/<!--POST.AUTHOR-->.php"><!--POST.AUTHOR--></a> on <!--POST.DATE--><br /> | ||
6 | <!--END POST--> | ||
7 | </div> | ||
8 | |||
9 | <cite class="rounded light-at-night"><strong>Theoretically Related Posts</strong></cite> | ||