summary refs log tree commit diff stats
path: root/pages/vote.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/vote.php')
-rw-r--r--pages/vote.php115
1 files changed, 115 insertions, 0 deletions
diff --git a/pages/vote.php b/pages/vote.php new file mode 100644 index 0000000..890b379 --- /dev/null +++ b/pages/vote.php
@@ -0,0 +1,115 @@
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/vote.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 = 'home';
26$pageAID = 'archive';
27
28if (!isset($_GET['mode']))
29{
30 $getpost = "SELECT * FROM updates WHERE id = " . $_GET['id'];
31 $getpost2 = mysql_query($getpost);
32 $getpost3 = mysql_fetch_array($getpost2);
33
34 if ($getpost3['id'] == $_GET['id'])
35 {
36 $template = new FITemplate('msg2');
37 $template->add('BACK','Back to ' . stripslashes($getpost3['title']));
38 $template->add('LINK','/blog/' . $getpost3['slug'] . '/');
39
40 if ($_GET['dir'] == 'plus')
41 {
42 if (updatePop($_GET['id'],'rating'))
43 {
44 $template->add('MSG','Thank you for voting!');
45 } else {
46 $template->add('MSG','I\'m sorry, but you\'ve already voted on this post.');
47 }
48 } else if ($_GET['dir'] == 'minus')
49 {
50 if (updatePop($_GET['id'],'rating',-1))
51 {
52 $template->add('MSG','Thank you for voting!');
53 } else {
54 $template->add('MSG','I\'m sorry, but you\'ve already voted on this post.');
55 }
56 } else {
57 $template = new FITemplate('msg');
58 $template->add('BACK','the previous page');
59 $template->add('MSG','Um, what on earth are you doing?');
60 }
61 } else {
62 $template = new FITemplate('msg');
63 $template->add('BACK','the previous page');
64 $template->add('MSG','Um, what on earth are you doing?');
65 }
66} else if ($_GET['mode'] == 'comment')
67{
68 $getcomment = "SELECT * FROM comments WHERE id = " . $_GET['id'];
69 $getcomment2 = mysql_query($getcomment);
70 $getcomment3 = mysql_fetch_array($getcomment2);
71
72 if ($getcomment3['id'] == $_GET['id'])
73 {
74 $page_id = $getcomment3['page_id'];
75 $comID = substr($page_id,strpos($page_id,'-')+1);
76
77 $getpost = "SELECT * FROM updates WHERE id = " . $comID;
78 $getpost2 = mysql_query($getpost);
79 $getpost3 = mysql_fetch_array($getpost2);
80
81 $template = new FITemplate('msg2');
82 $template->add('BACK','Back to ' . stripslashes($getpost3['title']));
83 $template->add('LINK','/blog/' . $getpost3['slug'] . '/');
84
85 if ($_GET['dir'] == 'plus')
86 {
87 if (updateCommentPop($_GET['id']))
88 {
89 $template->add('MSG','Thank you for voting!');
90 } else {
91 $template->add('MSG','I\'m sorry, but you\'ve already voted on this comment.');
92 }
93 } else if ($_GET['dir'] == 'minus')
94 {
95 if (updateCommentPop($_GET['id'],-1))
96 {
97 $template->add('MSG','Thank you for voting!');
98 } else {
99 $template->add('MSG','I\'m sorry, but you\'ve already voted on this comment.');
100 }
101 } else {
102 $template = new FITemplate('msg');
103 $template->add('BACK','the previous page');
104 $template->add('MSG','Um, what on earth are you doing?');
105 }
106 } else {
107 $template = new FITemplate('msg');
108 $template->add('BACK','the previous page');
109 $template->add('MSG','Um, what on earth are you doing?');
110 }
111}
112
113$template->display();
114
115?>