diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2008-11-19 17:27:03 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2008-11-19 17:27:03 -0500 |
commit | 24503e3abe705acde2df159aeae61be0d009f92e (patch) | |
tree | 8debbd53dcd0db2f5934c5e2af4e697e3787781d /pages | |
download | fourisland-24503e3abe705acde2df159aeae61be0d009f92e.tar.gz fourisland-24503e3abe705acde2df159aeae61be0d009f92e.tar.bz2 fourisland-24503e3abe705acde2df159aeae61be0d009f92e.zip |
Imported sources
Diffstat (limited to 'pages')
-rw-r--r-- | pages/addresses.php | 74 | ||||
-rw-r--r-- | pages/admin.php | 661 | ||||
-rw-r--r-- | pages/blog.php | 197 | ||||
-rw-r--r-- | pages/comic.php | 177 | ||||
-rw-r--r-- | pages/error.php | 84 | ||||
-rw-r--r-- | pages/fourm.php | 27 | ||||
-rw-r--r-- | pages/holidates.php | 10 | ||||
-rw-r--r-- | pages/login.php | 64 | ||||
-rw-r--r-- | pages/logout.php | 28 | ||||
-rw-r--r-- | pages/poll.php | 85 | ||||
-rw-r--r-- | pages/polloftheweek.php | 73 | ||||
-rw-r--r-- | pages/post.php | 107 | ||||
-rw-r--r-- | pages/projects.php | 94 | ||||
-rw-r--r-- | pages/quotes.php | 166 | ||||
-rw-r--r-- | pages/splash.php | 28 | ||||
-rw-r--r-- | pages/vote.php | 115 | ||||
-rw-r--r-- | pages/welcome.php | 81 | ||||
-rw-r--r-- | pages/wiki.php | 179 |
18 files changed, 2250 insertions, 0 deletions
diff --git a/pages/addresses.php b/pages/addresses.php new file mode 100644 index 0000000..c97dfad --- /dev/null +++ b/pages/addresses.php | |||
@@ -0,0 +1,74 @@ | |||
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 includes/addresses.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 | $title = 'A Gift for our Robot Friends'; | ||
26 | |||
27 | $template = new FITemplate('addresses'); | ||
28 | |||
29 | $acceptable = array( 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', | ||
30 | 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'); | ||
31 | $numAcceptable = count($acceptable) - 1; | ||
32 | |||
33 | $longerTopDomains = array( 'com', 'net', 'gov', 'org', 'info', 'biz', | ||
34 | 'edu', 'pro', 'name','co'); | ||
35 | $numTops = count($longerTopDomains) - 1; | ||
36 | |||
37 | $maxLettersBefore = 20; | ||
38 | $maxDomainLength = 20; | ||
39 | |||
40 | for ($i = 0; $i < 1000; $i++) | ||
41 | { | ||
42 | $addy = ''; | ||
43 | |||
44 | $numLetters = mt_rand(1, $maxLettersBefore); | ||
45 | |||
46 | for ($b = 0; $b < $numLetters; $b++) | ||
47 | { | ||
48 | $addy .= $acceptable[mt_rand(0, $numAcceptable)]; | ||
49 | } | ||
50 | |||
51 | $addy .= '@'; | ||
52 | |||
53 | $numLetters = mt_rand(1, $maxDomainLength); | ||
54 | |||
55 | for ($b = 0; $b < $numLetters; $b++) | ||
56 | { | ||
57 | $addy .= $acceptable[mt_rand(0, $numAcceptable)]; | ||
58 | } | ||
59 | |||
60 | $addy .= '.'; | ||
61 | |||
62 | if (mt_rand(1, 2) == 1) | ||
63 | { | ||
64 | $addy .= $longerTopDomains[mt_rand(0, $numTops)] . '.' . $acceptable[mt_rand(0, $numAcceptable)] . $acceptable[mt_rand(0, $numAcceptable)]; | ||
65 | } else { | ||
66 | $addy .= $longerTopDomains[mt_rand(0, $numTops)]; | ||
67 | } | ||
68 | |||
69 | $template->adds_block('ADDRESS', array('ADDY' => $addy)); | ||
70 | } | ||
71 | |||
72 | $template->display(); | ||
73 | |||
74 | ?> | ||
diff --git a/pages/admin.php b/pages/admin.php new file mode 100644 index 0000000..ca7a7fa --- /dev/null +++ b/pages/admin.php | |||
@@ -0,0 +1,661 @@ | |||
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/admin.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 = 'panel'; | ||
26 | |||
27 | if (isLoggedIn()) | ||
28 | { | ||
29 | if (getUserlevel() == 1) | ||
30 | { | ||
31 | if (!isset($_GET['page'])) | ||
32 | { | ||
33 | $template = new FITemplate('admin/index'); | ||
34 | } else if ($_GET['page'] == 'writePost') | ||
35 | { | ||
36 | if (!isset($_GET['submit'])) | ||
37 | { | ||
38 | $template = new FITemplate('admin/write'); | ||
39 | } else { | ||
40 | if ($_POST['type'] == 'draft') | ||
41 | { | ||
42 | $insdraft = "INSERT INTO drafts (title,author,text,tag1,tag2,tag3,slug) VALUES (\"" . addslashes($_POST['title']) . "\",\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\",\"" . $_POST['tag1'] . "\",\"" . $_POST['tag2'] . "\",\"" . $_POST['tag3'] . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; | ||
43 | $insdraft2 = mysql_query($insdraft); | ||
44 | |||
45 | $getdraft = "SELECT * FROM drafts ORDER BY id DESC LIMIT 0,1"; | ||
46 | $getdraft2 = mysql_query($getdraft); | ||
47 | $getdraft3 = mysql_fetch_array($getdraft2); | ||
48 | |||
49 | $template = new FITemplate('admin/draftSuccess'); | ||
50 | $template->add('ID', $getdraft3['id']); | ||
51 | } else if ($_POST['type'] == 'instant') | ||
52 | { | ||
53 | postBlogPost($_POST['title'], sess_get('uname'), $_POST['tag1'], $_POST['tag2'], $_POST['tag3'], $_POST['text']); | ||
54 | |||
55 | $getpost = "SELECT * FROM updates ORDER BY id DESC LIMIT 0,1"; | ||
56 | $getpost2 = mysql_query($getpost); | ||
57 | $getpost3 = mysql_fetch_array($getpost2); | ||
58 | |||
59 | $template = new FITemplate('admin/postSuccess'); | ||
60 | $template->add('ID', $getpost3['id']); | ||
61 | $template->add('CODED', $getpost3['slug']); | ||
62 | } else { | ||
63 | if ($_POST['type'] == 'normal') | ||
64 | { | ||
65 | $getpending = "SELECT * FROM pending ORDER BY id DESC LIMIT 0,1"; | ||
66 | $getpending2 = mysql_query($getpending); | ||
67 | $getpending3 = mysql_fetch_array($getpending2); | ||
68 | if (isset($getpending3['id']) === FALSE) | ||
69 | { | ||
70 | $id = 50; | ||
71 | } else { | ||
72 | $id = $getpending3['id']+1; | ||
73 | } | ||
74 | } else if ($_POST['type'] == 'priority') | ||
75 | { | ||
76 | $getpending = "SELECT * FROM pending ORDER BY id ASC LIMIT 0,1"; | ||
77 | $getpending2 = mysql_query($getpending); | ||
78 | $getpending3 = mysql_fetch_array($getpending2); | ||
79 | if (isset($getpending3['id']) === FALSE) | ||
80 | { | ||
81 | $id = 50; | ||
82 | } else { | ||
83 | $id = $getpending3['id']-1; | ||
84 | } | ||
85 | } else { | ||
86 | generateError(404); | ||
87 | } | ||
88 | |||
89 | $inspending = "INSERT INTO pending (id,title,author,text,tag1,tag2,tag3,slug) VALUES (" . $id . ",\"" . addslashes($_POST['title']) . "\",\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\",\"" . $_POST['tag1'] . "\",\"" . $_POST['tag2'] . "\",\"" . $_POST['tag3'] . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; | ||
90 | $inspending2 = mysql_query($inspending); | ||
91 | |||
92 | $template = new FITemplate('admin/pendingSuccess'); | ||
93 | $template->add('ID', $id); | ||
94 | } | ||
95 | } | ||
96 | } else if ($_GET['page'] == 'manageDrafts') | ||
97 | { | ||
98 | $template = new FITemplate('admin/manageDrafts'); | ||
99 | |||
100 | $getdrafts = "SELECT * FROM drafts ORDER BY id ASC"; | ||
101 | $getdrafts2 = mysql_query($getdrafts); | ||
102 | $i=0; | ||
103 | while ($getdrafts3[$i] = mysql_fetch_array($getdrafts2)) | ||
104 | { | ||
105 | $template->adds_block('DRAFT', array( 'TITLE' => $getdrafts3[$i]['title'], | ||
106 | 'AUTHOR' => $getdrafts3[$i]['author'], | ||
107 | 'ID' => $getdrafts3[$i]['id'])); | ||
108 | $i++; | ||
109 | } | ||
110 | } else if ($_GET['page'] == 'editDraft') | ||
111 | { | ||
112 | $getdraft = "SELECT * FROM drafts WHERE id = " . $_GET['id']; | ||
113 | $getdraft2 = mysql_query($getdraft); | ||
114 | $getdraft3 = mysql_fetch_array($getdraft2); | ||
115 | |||
116 | if ($getdraft3['id'] == $_GET['id']) | ||
117 | { | ||
118 | if (!isset($_GET['submit'])) | ||
119 | { | ||
120 | $template = new FITemplate('admin/editDraft'); | ||
121 | $template->add('ID', $_GET['id']); | ||
122 | $template->add('TEXT', $getdraft3['text']); | ||
123 | $template->add('TAG1', $getdraft3['tag1']); | ||
124 | $template->add('TAG2', $getdraft3['tag2']); | ||
125 | $template->add('TAG3', $getdraft3['tag3']); | ||
126 | $template->add('TITLE', $getdraft3['title']); | ||
127 | } else { | ||
128 | if ($_POST['type'] == 'draft') | ||
129 | { | ||
130 | $setdraft = "UPDATE drafts SET title = \"" . addslashes($_POST['title']) . "\", text = \"" . addslashes($_POST['text']) . "\", tag1 = \"" . $_POST['tag1'] . "\", tag2 = \"" . $_POST['tag2'] . "\", tag3 = \"" . $_POST['tag3'] . "\" WHERE id = " . $_GET['id']; | ||
131 | $setdraft2 = mysql_query($setdraft); | ||
132 | |||
133 | $template = new FITemplate('admin/draftSuccess'); | ||
134 | $template->add('ID', $_GET['id']); | ||
135 | } else if ($_POST['type'] == 'instant') | ||
136 | { | ||
137 | postBlogPost($_POST['title'], sess_get('uname'), $_POST['tag1'], $_POST['tag2'], $_POST['tag3'], $_POST['text']); | ||
138 | |||
139 | $deldraft = "DELETE FROM drafts WHERE id = " . $_GET['id']; | ||
140 | $deldraft2 = mysql_query($deldraft); | ||
141 | |||
142 | $getpost = "SELECT * FROM updates ORDER BY id DESC LIMIT 0,1"; | ||
143 | $getpost2 = mysql_query($getpost); | ||
144 | $getpost3 = mysql_fetch_array($getpost2); | ||
145 | |||
146 | $template = new FITemplate('admin/postSuccess'); | ||
147 | $template->add('ID', $getpost3['id']); | ||
148 | $template->add('CODED', $getpost3['slug']); | ||
149 | } else { | ||
150 | if ($_POST['type'] == 'normal') | ||
151 | { | ||
152 | $getpending = "SELECT * FROM pending ORDER BY id DESC LIMIT 0,1"; | ||
153 | $getpending2 = mysql_query($getpending); | ||
154 | $getpending3 = mysql_fetch_array($getpending2); | ||
155 | if (isset($getpending3['id']) === FALSE) | ||
156 | { | ||
157 | $id = 50; | ||
158 | } else { | ||
159 | $id = $getpending3['id']+1; | ||
160 | } | ||
161 | } else if ($_POST['type'] == 'priority') | ||
162 | { | ||
163 | $getpending = "SELECT * FROM pending ORDER BY id ASC LIMIT 0,1"; | ||
164 | $getpending2 = mysql_query($getpending); | ||
165 | $getpending3 = mysql_fetch_array($getpending2); | ||
166 | if (isset($getpending3['id']) === FALSE) | ||
167 | { | ||
168 | $id = 50; | ||
169 | } else { | ||
170 | $id = $getpending3['id']-1; | ||
171 | } | ||
172 | } else { | ||
173 | generateError(404); | ||
174 | } | ||
175 | |||
176 | $inspending = "INSERT INTO pending (id,title,author,text,tag1,tag2,tag3,slug) VALUES (" . $id . ",\"" . addslashes($_POST['title']) . "\",\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\",\"" . $_POST['tag1'] . "\",\"" . $_POST['tag2'] . "\",\"" . $_POST['tag3'] . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; | ||
177 | $inspending2 = mysql_query($inspending); | ||
178 | |||
179 | $deldraft = "DELETE FROM drafts WHERE id = " . $_GET['id']; | ||
180 | $deldraft2 = mysql_query($deldraft); | ||
181 | |||
182 | $template = new FITemplate('admin/pendingSuccess'); | ||
183 | $template->add('ID', $id); | ||
184 | } | ||
185 | } | ||
186 | } else { | ||
187 | $template = new FITemplate('msg'); | ||
188 | $template->add('BACK', 'the previous page'); | ||
189 | $template->add('MSG', 'I\'m sorry, that draft doesn\'t exist.'); | ||
190 | } | ||
191 | } else if ($_GET['page'] == 'deleteDraft') | ||
192 | { | ||
193 | $getdraft = "SELECT * FROM drafts WHERE id = " . $_GET['id']; | ||
194 | $getdraft2 = mysql_query($getdraft); | ||
195 | $getdraft3 = mysql_fetch_array($getdraft2); | ||
196 | |||
197 | if ($getdraft3['id'] == $_GET['id']) | ||
198 | { | ||
199 | if (!isset($_GET['submit'])) | ||
200 | { | ||
201 | $template = new FITemplate('admin/deleteDraft'); | ||
202 | $template->add('ID', $_GET['id']); | ||
203 | } else { | ||
204 | $deldraft = "DELETE FROM drafts WHERE id = " . $_GET['id']; | ||
205 | $deldraft2 = mysql_query($deldraft); | ||
206 | |||
207 | $template = new FITemplate('admin/deletedDraft'); | ||
208 | } | ||
209 | } else { | ||
210 | $template = new FITemplate('msg'); | ||
211 | $template->add('BACK', 'the previous page'); | ||
212 | $template->add('MSG', 'I\'m sorry, that draft doesn\'t exist.'); | ||
213 | } | ||
214 | } else if ($_GET['page'] == 'viewDraft') | ||
215 | { | ||
216 | $getdraft = "SELECT * FROM drafts WHERE id = " . $_GET['id']; | ||
217 | $getdraft2 = mysql_query($getdraft); | ||
218 | $getdraft3 = mysql_fetch_array($getdraft2); | ||
219 | |||
220 | if ($getdraft3['id'] == $_GET['id']) | ||
221 | { | ||
222 | $template = new FITemplate('post'); | ||
223 | $template->adds_block('INTERNAL',array('exi'=>1)); | ||
224 | $template->adds_block('POST', array( 'ID' => $getdraft3['id'], | ||
225 | 'YEARID' => ((date('Y')-2006) % 4), | ||
226 | 'DATE' => date('F dS Y \a\\t g:i:s a'), | ||
227 | 'MONTH' => date('M'), | ||
228 | 'DAY' => date('d'), | ||
229 | 'CODED' => $getdraft3['slug'], | ||
230 | 'TITLE' => $getdraft3['title'], | ||
231 | 'AUTHOR' => $getdraft3['author'], | ||
232 | 'TAG1' => $getdraft3['tag1'], | ||
233 | 'TAG2' => $getdraft3['tag2'], | ||
234 | 'TAG3' => $getdraft3['tag3'], | ||
235 | 'RATING' => 0, | ||
236 | 'TEXT' => parseBBCode($getdraft3['text']))); | ||
237 | } else { | ||
238 | $template = new FITemplate('msg'); | ||
239 | $template->add('BACK', 'the previous page'); | ||
240 | $template->add('MSG', 'I\'m sorry, that draft doesn\'t exist.'); | ||
241 | } | ||
242 | } else if ($_GET['page'] == 'managePending') | ||
243 | { | ||
244 | $template = new FITemplate('admin/managePending'); | ||
245 | |||
246 | $getpending = "SELECT * FROM pending ORDER BY id ASC"; | ||
247 | $getpending2 = mysql_query($getpending); | ||
248 | $i=0; | ||
249 | while ($getpending3[$i] = mysql_fetch_array($getpending2)) | ||
250 | { | ||
251 | $template->adds_block('PENDING', array( 'TITLE' => $getpending3[$i]['title'], | ||
252 | 'AUTHOR' => $getpending3[$i]['author'], | ||
253 | 'ID' => $getpending3[$i]['id'])); | ||
254 | $i++; | ||
255 | } | ||
256 | } else if ($_GET['page'] == 'editPending') | ||
257 | { | ||
258 | $getpending = "SELECT * FROM pending WHERE id = " . $_GET['id']; | ||
259 | $getpending2 = mysql_query($getpending); | ||
260 | $getpending3 = mysql_fetch_array($getpending2); | ||
261 | |||
262 | if ($getpending3['id'] == $_GET['id']) | ||
263 | { | ||
264 | if (!isset($_GET['submit'])) | ||
265 | { | ||
266 | $template = new FITemplate('admin/editPending'); | ||
267 | $template->add('ID', $_GET['id']); | ||
268 | $template->add('TEXT', $getpending3['text']); | ||
269 | $template->add('TAG1', $getpending3['tag1']); | ||
270 | $template->add('TAG2', $getpending3['tag2']); | ||
271 | $template->add('TAG3', $getpending3['tag3']); | ||
272 | $template->add('TITLE', $getpending3['title']); | ||
273 | } else { | ||
274 | $setpending = "UPDATE pending SET title = \"" . addslashes($_POST['title']) . "\", text = \"" . addslashes($_POST['text']) . "\", tag1 = \"" . $_POST['tag1'] . "\", tag2 = \"" . $_POST['tag2'] . "\", tag3 = \"" . $_POST['tag3'] . "\" WHERE id = " . $_GET['id']; | ||
275 | $setpending2 = mysql_query($setpending); | ||
276 | |||
277 | $template = new FITemplate('admin/pendingSuccess'); | ||
278 | $template->add('ID', $_GET['id']); | ||
279 | } | ||
280 | } else { | ||
281 | $template = new FITemplate('msg'); | ||
282 | $template->add('BACK', 'the previous page'); | ||
283 | $template->add('MSG', 'I\'m sorry, that pending post doesn\'t exist.'); | ||
284 | } | ||
285 | } else if ($_GET['page'] == 'deletePending') | ||
286 | { | ||
287 | $getpending = "SELECT * FROM pending WHERE id = " . $_GET['id']; | ||
288 | $getpending2 = mysql_query($getpending); | ||
289 | $getpending3 = mysql_fetch_array($getpending2); | ||
290 | |||
291 | if ($getpending3['id'] == $_GET['id']) | ||
292 | { | ||
293 | if (!isset($_GET['submit'])) | ||
294 | { | ||
295 | $template = new FITemplate('admin/deletePending'); | ||
296 | $template->add('ID', $_GET['id']); | ||
297 | } else { | ||
298 | $delpending = "DELETE FROM pending WHERE id = " . $_GET['id']; | ||
299 | $delpending2 = mysql_query($delpending); | ||
300 | |||
301 | $template = new FITemplate('admin/deletedPending'); | ||
302 | } | ||
303 | } else { | ||
304 | $template = new FITemplate('msg'); | ||
305 | $template->add('BACK', 'the previous page'); | ||
306 | $template->add('MSG', 'I\'m sorry, that pending post doesn\'t exist.'); | ||
307 | } | ||
308 | } else if ($_GET['page'] == 'viewPending') | ||
309 | { | ||
310 | $getpending = "SELECT * FROM pending WHERE id = " . $_GET['id']; | ||
311 | $getpending2 = mysql_query($getpending); | ||
312 | $getpending3 = mysql_fetch_array($getpending2); | ||
313 | |||
314 | if ($getpending3['id'] == $_GET['id']) | ||
315 | { | ||
316 | $template = new FITemplate('post'); | ||
317 | $template->adds_block('INTERNAL',array('exi'=>1)); | ||
318 | $template->adds_block('POST', array( 'ID' => $getpending3['id'], | ||
319 | 'YEARID' => ((date('Y')-2006) % 4), | ||
320 | 'DATE' => date('F dS Y \a\\t g:i:s a'), | ||
321 | 'MONTH' => date('M'), | ||
322 | 'DAY' => date('d'), | ||
323 | 'CODED' => $getpending3['slug'], | ||
324 | 'TITLE' => $getpending3['title'], | ||
325 | 'AUTHOR' => $getpending3['author'], | ||
326 | 'TAG1' => $getpending3['tag1'], | ||
327 | 'TAG2' => $getpending3['tag2'], | ||
328 | 'TAG3' => $getpending3['tag3'], | ||
329 | 'RATING' => 0, | ||
330 | 'TEXT' => parseBBCode($getpending3['text']))); | ||
331 | } else { | ||
332 | $template = new FITemplate('msg'); | ||
333 | $template->add('BACK', 'the previous page'); | ||
334 | $template->add('MSG', 'I\'m sorry, that pending post doesn\'t exist.'); | ||
335 | } | ||
336 | } else if ($_GET['page'] == 'managePosts') | ||
337 | { | ||
338 | $template = new FITemplate('admin/managePosts'); | ||
339 | |||
340 | $getposts = "SELECT * FROM updates ORDER BY id ASC"; | ||
341 | $getposts2 = mysql_query($getposts); | ||
342 | $i=0; | ||
343 | while ($getposts3[$i] = mysql_fetch_array($getposts2)) | ||
344 | { | ||
345 | $template->adds_block('POST', array( 'TITLE' => $getposts3[$i]['title'], | ||
346 | 'AUTHOR' => $getposts3[$i]['author'], | ||
347 | 'ID' => $getposts3[$i]['id'], | ||
348 | 'CODED' => $getposts3[$i]['slug'])); | ||
349 | $i++; | ||
350 | } | ||
351 | } else if ($_GET['page'] == 'editPost') | ||
352 | { | ||
353 | $getpost = "SELECT * FROM updates WHERE id = " . $_GET['id']; | ||
354 | $getpost2 = mysql_query($getpost); | ||
355 | $getpost3 = mysql_fetch_array($getpost2); | ||
356 | |||
357 | if ($getpost3['id'] == $_GET['id']) | ||
358 | { | ||
359 | if (!isset($_GET['submit'])) | ||
360 | { | ||
361 | $template = new FITemplate('admin/editPost'); | ||
362 | $template->add('ID', $_GET['id']); | ||
363 | $template->add('TEXT', $getpost3['text']); | ||
364 | $template->add('TAG1', $getpost3['tag1']); | ||
365 | $template->add('TAG2', $getpost3['tag2']); | ||
366 | $template->add('TAG3', $getpost3['tag3']); | ||
367 | $template->add('TITLE', $getpost3['title']); | ||
368 | } else { | ||
369 | $setpost = "UPDATE updates SET title = \"" . addslashes($_POST['title']) . "\", text = \"" . addslashes($_POST['text']) . "\", tag1 = \"" . $_POST['tag1'] . "\", tag2 = \"" . $_POST['tag2'] . "\", tag3 = \"" . $_POST['tag3'] . "\" WHERE id = " . $_GET['id']; | ||
370 | $setpost2 = mysql_query($setpost); | ||
371 | |||
372 | $template = new FITemplate('admin/postSuccess'); | ||
373 | $template->add('ID', $_GET['id']); | ||
374 | $template->add('CODED', $getpost3['slug']); | ||
375 | } | ||
376 | } else { | ||
377 | $template = new FITemplate('msg'); | ||
378 | $template->add('BACK', 'the previous page'); | ||
379 | $template->add('MSG', 'I\'m sorry, that post doesn\'t exist.'); | ||
380 | } | ||
381 | } else if ($_GET['page'] == 'deletePost') | ||
382 | { | ||
383 | $getpost = "SELECT * FROM updates WHERE id = " . $_GET['id']; | ||
384 | $getpost2 = mysql_query($getpost); | ||
385 | $getpost3 = mysql_fetch_array($getpost2); | ||
386 | |||
387 | if ($getpost3['id'] == $_GET['id']) | ||
388 | { | ||
389 | if (!isset($_GET['submit'])) | ||
390 | { | ||
391 | $template = new FITemplate('admin/deletePost'); | ||
392 | $template->add('ID', $_GET['id']); | ||
393 | } else { | ||
394 | $delpost = "DELETE FROM updates WHERE id = " . $_GET['id']; | ||
395 | $delpost2 = mysql_query($delpost); | ||
396 | |||
397 | $template = new FITemplate('admin/deletedPost'); | ||
398 | } | ||
399 | } else { | ||
400 | $template = new FITemplate('msg'); | ||
401 | $template->add('BACK', 'the previous page'); | ||
402 | $template->add('MSG', 'I\'m sorry, that post doesn\'t exist.'); | ||
403 | } | ||
404 | } else if ($_GET['page'] == 'moderateComments') | ||
405 | { | ||
406 | $template = new FITemplate('admin/moderateComments'); | ||
407 | |||
408 | $getcomments = "SELECT * FROM moderation ORDER BY id ASC"; | ||
409 | $getcomments2 = mysql_query($getcomments); | ||
410 | $i=0; | ||
411 | while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) | ||
412 | { | ||
413 | $comType = substr($getcomments3[$i]['page_id'],0,strpos($getcomments3[$i]['page_id'],'-')); | ||
414 | $comID = substr($getcomments3[$i]['page_id'],strpos($getcomments3[$i]['page_id'],'-')+1); | ||
415 | |||
416 | if ($comType == 'updates') | ||
417 | { | ||
418 | $getpost = "SELECT * FROM updates WHERE id = " . $comID; | ||
419 | $getpost2 = mysql_query($getpost); | ||
420 | $getpost3 = mysql_fetch_array($getpost2); | ||
421 | $title = $getpost3['title']; | ||
422 | } else if ($comType = 'polloftheweek') | ||
423 | { | ||
424 | $getpoll = "SELECT * FROM polloftheweek WHERE id = " . $comID; | ||
425 | $getpoll2 = mysql_query($getpoll); | ||
426 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
427 | $title = $getpoll3['question']; | ||
428 | } else if ($comType = 'quotes') | ||
429 | { | ||
430 | $getquote = "SELECT * FROM rash_quotes WHERE id = " . $comID; | ||
431 | $getquote2 = mysql_query($getquote); | ||
432 | $getquote3 = mysql_fetch_array($getquote2); | ||
433 | $title = '#' . $getquote3['id']; | ||
434 | } | ||
435 | |||
436 | $template->adds_block('COMMENT', array( 'TITLE' => $title, | ||
437 | 'AUTHOR' => $getcomments3[$i]['author'], | ||
438 | 'ID' => $getcomments3[$i]['id'])); | ||
439 | $i++; | ||
440 | } | ||
441 | } else if ($_GET['page'] == 'viewComment') | ||
442 | { | ||
443 | $getcomment = "SELECT * FROM moderation WHERE id = " . $_GET['id']; | ||
444 | $getcomment2 = mysql_query($getcomment); | ||
445 | $getcomment3 = mysql_fetch_array($getcomment2); | ||
446 | |||
447 | if ($getcomment3['id'] == $_GET['id']) | ||
448 | { | ||
449 | $getuser = "SELECT * FROM users WHERE username = \"" . $getcomment3['author'] . "\""; | ||
450 | $getuser2 = mysql_query($getuser); | ||
451 | $getuser3 = mysql_fetch_array($getuser2); | ||
452 | |||
453 | $template = new FITemplate('admin/viewComment'); | ||
454 | $template->add('ID', $_GET['id']); | ||
455 | $template->add('USERNAME', $getcomment3['author']); | ||
456 | $template->add('CODEDEMAIL', md5(strtolower($getuser3['email']))); | ||
457 | $template->add('TEXT', parseBBCode($getcomment3['comment'])); | ||
458 | $template->add('DATE', date("F dS Y \a\\t g:i:s a",strtotime($getcomment3['pubDate']))); | ||
459 | $template->add('CODEDDEF',urlencode('http://www.fourisland.com/images/error404.png')); | ||
460 | } else { | ||
461 | $template = new FITemplate('msg'); | ||
462 | $template->add('BACK', 'the previous page'); | ||
463 | $template->add('MSG', 'I\'m sorry, that comment doesn\'t exist.'); | ||
464 | } | ||
465 | } else if ($_GET['page'] == 'actionComment') | ||
466 | { | ||
467 | $getcomment = "SELECT * FROM moderation WHERE id = " . $_GET['id']; | ||
468 | $getcomment2 = mysql_query($getcomment); | ||
469 | $getcomment3 = mysql_fetch_array($getcomment2); | ||
470 | |||
471 | if ($getcomment3['id'] == $_GET['id']) | ||
472 | { | ||
473 | if (isset($_GET['approve'])) | ||
474 | { | ||
475 | $insanon = "INSERT INTO anon_commenters (username,email,website) VALUES (\"" . $getcomment3['author'] . "\",\"" . $getcomment3['email'] . "\",\"" . $getcomment3['website'] . "\")"; | ||
476 | $insanon2 = mysql_query($insanon); | ||
477 | |||
478 | $inscomment = "INSERT INTO comments (page_id,username,comment) VALUES (\"" . $getcomment3['page_id'] . "\",\"" . $getcomment3['author'] . "\",\"" . $getcomment3['comment'] . "\")"; | ||
479 | $inscomment2 = mysql_query($inscomment); | ||
480 | |||
481 | $delcomment = "DELETE FROM moderation WHERE id = " . $getcomment3['id']; | ||
482 | $delcomment2 = mysql_query($delcomment); | ||
483 | |||
484 | $template = new FITemplate('msg'); | ||
485 | $template->add('BACK', 'Comment Moderation'); | ||
486 | $template->add('MSG', 'You\'ve successfully approved this comment.'); | ||
487 | } else if (isset($_GET['deny'])) | ||
488 | { | ||
489 | $delcomment = "DELETE FROM moderation WHERE id = " . $getcomment3['id']; | ||
490 | $delcomment2 = mysql_query($delcomment); | ||
491 | |||
492 | $template = new FITemplate('msg'); | ||
493 | $template->add('BACK', 'Comment Moderation'); | ||
494 | $template->add('MSG', 'You\'ve successfully denied this comment.'); | ||
495 | } else { | ||
496 | $template = new FITemplate('msg'); | ||
497 | $template->add('BACK', 'the previous page'); | ||
498 | $template->add('MSG', "Um, what on earth are you doing?"); | ||
499 | } | ||
500 | } else { | ||
501 | $template = new FITemplate('msg'); | ||
502 | $template->add('BACK', 'the previous page'); | ||
503 | $template->add('MSG', 'I\'m sorry, that comment doesn\'t exist.'); | ||
504 | } | ||
505 | } else if ($_GET['page'] == 'managePages') | ||
506 | { | ||
507 | $template = new FITemplate('admin/managePages'); | ||
508 | |||
509 | $getpages = "SELECT wiki_pages.*, wiki_revisions.author FROM wiki_pages, wiki_revisions WHERE wiki_revisions.id = wiki_pages.revision ORDER BY id ASC"; | ||
510 | $getpages2 = mysql_query($getpages); | ||
511 | $i=0; $template = new FITemplate('msg'); | ||
512 | $template->add('BACK', 'the previous page'); | ||
513 | $template->add('MSG', 'I\'m sorry, but this page doesn\'t exist.'); | ||
514 | while ($getpages3[$i] = mysql_fetch_array($getpages2)) | ||
515 | { | ||
516 | $template->adds_block('PAGE', array( 'TITLE' => $getpages3[$i]['title'], | ||
517 | 'AUTHOR' => $getpages3[$i]['author'], | ||
518 | 'ID' => $getpages3[$i]['id'], | ||
519 | 'CODED' => $getpages3[$i]['slug'])); | ||
520 | $i++; | ||
521 | } | ||
522 | } else if ($_GET['page'] == 'pageHistory') | ||
523 | { | ||
524 | $getpage = "SELECT * FROM wiki_pages WHERE id = " . $_GET['id'] . " ORDER BY id ASC"; | ||
525 | $getpage2 = mysql_query($getpage); | ||
526 | $getpage3 = mysql_fetch_array($getpage2); | ||
527 | |||
528 | if ($getpage3['id'] == $_GET['id']) | ||
529 | { | ||
530 | $template = new FITemplate('admin/pageHistory'); | ||
531 | |||
532 | $getrev = "SELECT * FROM wiki_revisions WHERE id = " . $getpage3['revision']; | ||
533 | $getrev2 = mysql_query($getrev); | ||
534 | $getrev3 = mysql_fetch_array($getrev2); | ||
535 | |||
536 | $template->adds_block('REV', array( 'AUTHOR' => $getrev3['author'], | ||
537 | 'DATE' => date("F dS Y \a\\t g:i:s a",strtotime($getrev3['pubDate'])), | ||
538 | 'ID' => $getrev3['id'])); | ||
539 | |||
540 | while ($getrev3['previous'] != 0) | ||
541 | { | ||
542 | $getrev = "SELECT * FROM wiki_revisions WHERE id = " . $getrev3['previous']; | ||
543 | $getrev2 = mysql_query($getrev); | ||
544 | $getrev3 = mysql_fetch_array($getrev2); | ||
545 | |||
546 | $template->adds_block('REV', array( 'AUTHOR' => $getrev3['author'], | ||
547 | 'DATE' => date("F dS Y \a\\t g:i:s a",strtotime($getrev3['pubDate'])), | ||
548 | 'ID' => $getrev3['id'])); | ||
549 | } | ||
550 | } else { | ||
551 | $template = new FITemplate('msg'); | ||
552 | $template->add('BACK', 'the previous page'); | ||
553 | $template->add('MSG', 'I\'m sorry, but this page doesn\'t exist.'); | ||
554 | } | ||
555 | } else if ($_GET['page'] == 'viewRevision') | ||
556 | { | ||
557 | $getrev = "SELECT * FROM wiki_revisions WHERE id = " . $_GET['id']; | ||
558 | $getrev2 = mysql_query($getrev); | ||
559 | $getrev3 = mysql_fetch_array($getrev2); | ||
560 | |||
561 | if ($getrev3['id'] == $_GET['id']) | ||
562 | { | ||
563 | $template = new FITemplate('admin/viewRevision'); | ||
564 | $template->add('TEXT', $getrev3['text']); | ||
565 | } else { | ||
566 | $template = new FITemplate('msg'); | ||
567 | $template->add('BACK', 'the previous page'); | ||
568 | $template->add('MSG', 'I\'m sorry, but this revision doesn\'t exist.'); | ||
569 | } | ||
570 | } else if ($_GET['page'] == 'pollProcess') | ||
571 | { | ||
572 | if (!isset($_GET['step'])) | ||
573 | { | ||
574 | $template = new FITemplate('admin/pollrss'); | ||
575 | } else if ($_GET['step'] == 2) | ||
576 | { | ||
577 | $insrss = "INSERT INTO pollrss (author,rss) VALUES (\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\")"; | ||
578 | $insrss2 = mysql_query($insrss); | ||
579 | |||
580 | $template = new FITemplate('admin/newPoll'); | ||
581 | } else if ($_GET['step'] == 3) | ||
582 | { | ||
583 | $inspoll = "INSERT INTO polloftheweek (question,option1,option2,option3,option4) VALUES (\"" . addslashes($_POST['question']) . "\",\"" . $_POST['option1'] . "\",\"" . $_POST['option2'] . "\",\"" . $_POST['option3'] . "\",\"" . $_POST['option4'] . "\")"; | ||
584 | $inspoll2 = mysql_query($inspoll); | ||
585 | |||
586 | $cleardid = "TRUNCATE TABLE didpollalready"; | ||
587 | $cleardid2 = mysql_query($cleardid); | ||
588 | |||
589 | $template = new FITemplate('msg2'); | ||
590 | $template->add('BACK', 'Back to the Admin Panel'); | ||
591 | $template->add('LINK', '/admin/'); | ||
592 | $template->add('MSG', "You've successfully created a poll!"); | ||
593 | } else { | ||
594 | $template = new FITemplate('msg'); | ||
595 | $template->add('BACK', 'the previous page'); | ||
596 | $template->add('MSG', "Um, what on earth are you doing?"); | ||
597 | } | ||
598 | } else if ($_GET['page'] == 'managePendingQuotes') | ||
599 | { | ||
600 | $template = new FITemplate('admin/managePendingQuotes'); | ||
601 | |||
602 | $getpending = "SELECT * FROM rash_queue ORDER BY id ASC"; | ||
603 | $getpending2 = mysql_query($getpending); | ||
604 | $i=0; | ||
605 | while ($getpending3[$i] = mysql_fetch_array($getpending2)) | ||
606 | { | ||
607 | $template->adds_block('QUOTE', array( 'ID' => $getpending3[$i]['id'], | ||
608 | 'TEXT' => $getpending3[$i]['quote'])); | ||
609 | $i++; | ||
610 | } | ||
611 | } else if ($_GET['page'] == 'actionPendingQuotes') | ||
612 | { | ||
613 | $getpending = "SELECT * FROM rash_queue WHERE id = " . $_GET['id']; | ||
614 | $getpending2 = mysql_query($getpending); | ||
615 | $getpending3 = mysql_fetch_array($getpending2); | ||
616 | |||
617 | if ($getpending3['id'] == $_GET['id']) | ||
618 | { | ||
619 | if (isset($_GET['approve'])) | ||
620 | { | ||
621 | $insquote = "INSERT INTO rash_quotes (quote) VALUES (\"" . addslashes($getpending3['quote']) . "\")"; | ||
622 | $insquote2 = mysql_query($insquote); | ||
623 | |||
624 | $delpending = "DELETE FROM rash_queue WHERE id = " . $_GET['id']; | ||
625 | $delpending2 = mysql_query($delpending); | ||
626 | |||
627 | $template = new FITemplate('msg2'); | ||
628 | $template->add('BACK', 'Back to the Admin Panel'); | ||
629 | $template->add('LINK', '/admin/'); | ||
630 | $template->add('MSG', "You've successfully approved this quote."); | ||
631 | } else if (isset($_GET['deny'])) | ||
632 | { | ||
633 | $delpending = "DELETE FROM rash_queue WHERE id = " . $_GET['id']; | ||
634 | $delpending2 = mysql_query($delpending); | ||
635 | |||
636 | $template = new FITemplate('msg2'); | ||
637 | $template->add('BACK', 'Back to the Admin Panel'); | ||
638 | $template->add('LINK', '/admin/'); | ||
639 | $template->add('MSG', "You've successfully denied this quote."); | ||
640 | } else { | ||
641 | $template = new FITemplate('msg'); | ||
642 | $template->add('BACK', 'the previous page'); | ||
643 | $template->add('MSG', "Um, what on earth are you doing?"); | ||
644 | } | ||
645 | } else { | ||
646 | $template = new FITemplate('msg'); | ||
647 | $template->add('BACK', 'the previous page'); | ||
648 | $template->add('MSG', 'I\'m sorry, but this pending quote doesn\'t exist.'); | ||
649 | } | ||
650 | } else { | ||
651 | generateError(404); | ||
652 | } | ||
653 | @$template->display(); | ||
654 | } else { | ||
655 | generateError(404); | ||
656 | } | ||
657 | } else { | ||
658 | generateError(404); | ||
659 | } | ||
660 | |||
661 | ?> | ||
diff --git a/pages/blog.php b/pages/blog.php new file mode 100644 index 0000000..93d5dc6 --- /dev/null +++ b/pages/blog.php | |||
@@ -0,0 +1,197 @@ | |||
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/blog.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 = 'home'; | ||
26 | $pageAID = 'archive'; | ||
27 | |||
28 | if (isset($_GET['post'])) | ||
29 | { | ||
30 | $template = new FITemplate('post'); | ||
31 | $template->adds_block('INTERNAL',array('exi'=>1)); | ||
32 | |||
33 | $getpost = "SELECT * FROM updates WHERE slug = \"" . urldecode($_GET['post']) . "\""; | ||
34 | $getpost2 = mysql_query($getpost); | ||
35 | $getpost3 = mysql_fetch_array($getpost2); | ||
36 | |||
37 | if ($getpost3['slug'] == urldecode($_GET['post'])) | ||
38 | { | ||
39 | updatePop($getpost3['id'],'views'); | ||
40 | |||
41 | $title = stripslashes($getpost3['title']) . ' - Blog Archive'; | ||
42 | |||
43 | $getback = "SELECT * FROM updates WHERE id = " . ($getpost3['id']-1); | ||
44 | $getback2 = mysql_query($getback); | ||
45 | $getback3 = mysql_fetch_array($getback2); | ||
46 | if (isset($getback3['title'])) | ||
47 | { | ||
48 | $template->adds_block('BACK', array( 'CODED' => $getback3['slug'], | ||
49 | 'TITLE' => $getback3['title'])); | ||
50 | } | ||
51 | |||
52 | $getnext = "SELECT * FROM updates WHERE id = " . ($getpost3['id']+1); | ||
53 | $getnext2 = mysql_query($getnext); | ||
54 | $getnext3 = mysql_fetch_array($getnext2); | ||
55 | if (isset($getnext3['title'])) | ||
56 | { | ||
57 | $template->adds_block('NEXT', array( 'CODED' => $getnext3['slug'], | ||
58 | 'TITLE' => $getnext3['title'])); | ||
59 | } | ||
60 | |||
61 | $template->adds_block('POST', array( 'ID' => $getpost3['id'], | ||
62 | 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), | ||
63 | 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), | ||
64 | 'MONTH' => date('M',strtotime($getpost3['pubDate'])), | ||
65 | 'DAY' => date('d',strtotime($getpost3['pubDate'])), | ||
66 | 'CODED' => $getpost3['slug'], | ||
67 | 'TITLE' => $getpost3['title'], | ||
68 | 'AUTHOR' => $getpost3['author'], | ||
69 | 'TAG1' => $getpost3['tag1'], | ||
70 | 'TAG2' => $getpost3['tag2'], | ||
71 | 'TAG3' => $getpost3['tag3'], | ||
72 | 'RATING' => $getpost3['rating'], | ||
73 | 'TEXT' => parseBBCode($getpost3['text']))); | ||
74 | |||
75 | $template->display(); | ||
76 | $page_id = 'updates-' . $getpost3['id']; | ||
77 | include('includes/comments.php'); | ||
78 | |||
79 | $getrelated = "SELECT *, MATCH (title, text) AGAINST (\"" . addslashes($getpost3['title']) . "\") AS score FROM updates WHERE MATCH (title, text) AGAINST (\"" . addslashes($getpost3['title']) . "\") AND id <> " . $getpost3['id'] . " LIMIT 0,5"; | ||
80 | $getrelated2 = mysql_query($getrelated); | ||
81 | $i=0; | ||
82 | while ($getrelated3[$i] = mysql_fetch_array($getrelated2)) | ||
83 | { | ||
84 | if ($i==0) | ||
85 | { | ||
86 | $template = new FITemplate('related'); | ||
87 | } | ||
88 | |||
89 | $template->adds_block('POST', array( 'TITLE' => $getrelated3[$i]['title'], | ||
90 | 'CODED' => $getrelated3[$i]['slug'], | ||
91 | 'AUTHOR' => $getrelated3[$i]['author'], | ||
92 | 'DATE' => date('F d<\S\U\P>S</\S\U\P> Y',strtotime($getrelated3[$i]['pubDate'])))); | ||
93 | $i++; | ||
94 | } | ||
95 | |||
96 | if ($i > 0) | ||
97 | { | ||
98 | $template->display(); | ||
99 | } | ||
100 | } else { | ||
101 | generateError('404'); | ||
102 | } | ||
103 | } else { | ||
104 | $template = new FITemplate('archive'); | ||
105 | if (isset($_GET['author'])) | ||
106 | { | ||
107 | $title = 'Author: ' . $_GET['author'] . ' - Blog Archive'; | ||
108 | $getposts = "SELECT * FROM updates WHERE author = \"" . $_GET['author'] . "\" ORDER BY id DESC"; | ||
109 | $getbio = "SELECT * FROM bio WHERE username = \"" . $_GET['author'] . "\""; | ||
110 | $getbio2 = mysql_query($getbio); | ||
111 | $getbio3 = mysql_fetch_array($getbio2); | ||
112 | if ($getbio3['username'] == $_GET['author']) | ||
113 | { | ||
114 | $template->adds_block('BIO', array( 'TEXT' => $getbio3['text'], | ||
115 | 'USERNAME' => $getbio3['username'], | ||
116 | 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getbio3['lastUpdated'])))); | ||
117 | } | ||
118 | } elseif (isset($_GET['tag'])) | ||
119 | { | ||
120 | $title = 'Tag: ' . $_GET['tag'] . ' - Blog Archive'; | ||
121 | $getposts = "SELECT * FROM updates WHERE tag1 = \"" . $_GET['tag'] . "\" OR tag2 = \"" . $_GET['tag'] . "\" OR tag3 = \"" . $_GET['tag'] . "\" ORDER BY id DESC"; | ||
122 | } else { | ||
123 | $title = 'Blog Archive'; | ||
124 | $getposts = "SELECT * FROM updates ORDER BY id DESC"; | ||
125 | } | ||
126 | $getposts2 = mysql_query($getposts); | ||
127 | $i=0; | ||
128 | while ($getposts3[$i] = mysql_fetch_array($getposts2)) | ||
129 | { | ||
130 | if ((!isset($lastmonth)) || ($lastmonth != date('m-Y',strtotime($getposts3[$i]['pubDate'])))) | ||
131 | { | ||
132 | if (!isset($curID)) | ||
133 | { | ||
134 | $curID = 0; | ||
135 | } else { | ||
136 | $curID++; | ||
137 | } | ||
138 | $template->add_ref($curID, 'MONTH', array('TITLE' => date('F Y',strtotime($getposts3[$i]['pubDate'])))); | ||
139 | if ($curID == 0) | ||
140 | { | ||
141 | $template->adds_ref_sub($curID, 'BIGEND',array('exi'=>1)); | ||
142 | } | ||
143 | $lastmonth = date('m-Y',strtotime($getposts3[$i]['pubDate'])); | ||
144 | } | ||
145 | |||
146 | $page_id = 'updates-' . $getposts3[$i]['id']; | ||
147 | $getcomments = "SELECT * FROM comments WHERE page_id = \"" . $page_id . "\" ORDER BY posttime"; | ||
148 | $getcomments2 = mysql_query($getcomments); | ||
149 | $total_post=0; | ||
150 | while ($getcomments3[$total_post] = mysql_fetch_array($getcomments2)) | ||
151 | { | ||
152 | $total_post++; | ||
153 | } | ||
154 | if ($total_post >= 2) | ||
155 | { | ||
156 | $plural = 's'; | ||
157 | } | ||
158 | if ($total_post == 0) | ||
159 | { | ||
160 | $comText = 'No Comments'; | ||
161 | } elseif ($total_post == 1) | ||
162 | { | ||
163 | $comText = '1 Comment'; | ||
164 | } else { | ||
165 | $comText = $total_post . ' Comments'; | ||
166 | } | ||
167 | |||
168 | if ($curID == 0) | ||
169 | { | ||
170 | $template->adds_ref_sub($curID, 'BIG',array( 'DATE' => date('m-d-Y',strtotime($getposts3[$i]['pubDate'])), | ||
171 | 'CODED' => $getposts3[$i]['slug'], | ||
172 | 'TITLE' => $getposts3[$i]['title'], | ||
173 | 'ID' => $getposts3[$i]['id'], | ||
174 | 'YEARID' => ((date('Y',strtotime($getposts3[$i]['pubDate']))-2006) % 4), | ||
175 | 'MONTH' => date('M',strtotime($getposts3[$i]['pubDate'])), | ||
176 | 'DAY' => date('d',strtotime($getposts3[$i]['pubDate'])), | ||
177 | 'AUTHOR' => $getposts3[$i]['author'], | ||
178 | 'PLURALCOMMENT' => (isset($plural) ? $plural : ''), | ||
179 | 'COMMENTS' => $comText, | ||
180 | 'TAG1' => $getposts3[$i]['tag1'], | ||
181 | 'TAG2' => $getposts3[$i]['tag2'], | ||
182 | 'TAG3' => $getposts3[$i]['tag3'])); | ||
183 | } else { | ||
184 | $template->adds_ref_sub($curID, 'SMALL',array( 'DATE' => date('m-d-Y',strtotime($getposts3[$i]['pubDate'])), | ||
185 | 'CODED' => $getposts3[$i]['slug'], | ||
186 | 'TITLE' => $getposts3[$i]['title'])); | ||
187 | } | ||
188 | $i++; | ||
189 | } | ||
190 | if ($i==0) | ||
191 | { | ||
192 | generateError('404'); | ||
193 | } | ||
194 | $template->display(); | ||
195 | } | ||
196 | |||
197 | ?> | ||
diff --git a/pages/comic.php b/pages/comic.php new file mode 100644 index 0000000..103cb17 --- /dev/null +++ b/pages/comic.php | |||
@@ -0,0 +1,177 @@ | |||
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/comic.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 = 'wiki'; | ||
26 | |||
27 | if (isset($_GET['comic'])) | ||
28 | { | ||
29 | $template = new FITemplate('comic'); | ||
30 | $template->adds_block('INTERNAL',array('exi'=>1)); | ||
31 | |||
32 | $getcomic = "SELECT * FROM comic WHERE slug = \"" . urldecode($_GET['comic']) . "\""; | ||
33 | $getcomic2 = mysql_query($getcomic); | ||
34 | $getcomic3 = mysql_fetch_array($getcomic2); | ||
35 | |||
36 | if ($getcomic3['slug'] == urldecode($_GET['comic'])) | ||
37 | { | ||
38 | $title = stripslashes($getcomic3['title']) . ' - Kirby Fan Mail'; | ||
39 | |||
40 | $getback = "SELECT * FROM comic WHERE id = " . ($getcomic3['id']-1); | ||
41 | $getback2 = mysql_query($getback); | ||
42 | $getback3 = mysql_fetch_array($getback2); | ||
43 | if (isset($getback3['title'])) | ||
44 | { | ||
45 | $template->adds_block('BACK', array( 'CODED' => $getback3['slug'], | ||
46 | 'TITLE' => $getback3['title'])); | ||
47 | } | ||
48 | |||
49 | $getnext = "SELECT * FROM comic WHERE id = " . ($getcomic3['id']+1); | ||
50 | $getnext2 = mysql_query($getnext); | ||
51 | $getnext3 = mysql_fetch_array($getnext2); | ||
52 | if (isset($getnext3['title'])) | ||
53 | { | ||
54 | $template->adds_block('NEXT', array( 'CODED' => $getnext3['slug'], | ||
55 | 'TITLE' => $getnext3['title'])); | ||
56 | } | ||
57 | |||
58 | if (stripos($getcomic3['image'], 'gif') !== FALSE) | ||
59 | { | ||
60 | $mode = 'scalegif'; | ||
61 | } else { | ||
62 | $mode = 'scale'; | ||
63 | } | ||
64 | |||
65 | $template->adds_block('COMIC', array( 'ID' => $getcomic3['id'], | ||
66 | 'YEARID' => ((date('Y',strtotime($getcomic3['pubDate']))-2006) % 4), | ||
67 | 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getcomic3['pubDate'])), | ||
68 | 'MONTH' => date('M',strtotime($getcomic3['pubDate'])), | ||
69 | 'DAY' => date('d',strtotime($getcomic3['pubDate'])), | ||
70 | 'CODED' => $getcomic3['slug'], | ||
71 | 'TITLE' => $getcomic3['title'], | ||
72 | 'RATING' => $getcomic3['rating'], | ||
73 | 'TEXT' => parseBBCode($getcomic3['text']), | ||
74 | 'IMAGE' => $getcomic3['image'], | ||
75 | 'MODE' => $mode)); | ||
76 | |||
77 | $template->display(); | ||
78 | $page_id = 'kfm-' . $getcomic3['id']; | ||
79 | include('includes/comments.php'); | ||
80 | |||
81 | $getrelated = "SELECT *, MATCH (title, text) AGAINST (\"" . addslashes($getcomic3['title']) . "\") AS score FROM comic WHERE MATCH (title, text) AGAINST (\"" . addslashes($getcomic3['title']) . "\") AND id <> " . $getcomic3['id'] . " LIMIT 0,5"; | ||
82 | $getrelated2 = mysql_query($getrelated); | ||
83 | $i=0; | ||
84 | while ($getrelated3[$i] = mysql_fetch_array($getrelated2)) | ||
85 | { | ||
86 | if ($i==0) | ||
87 | { | ||
88 | $template = new FITemplate('related'); | ||
89 | } | ||
90 | |||
91 | $template->adds_block('POST', array( 'TITLE' => $getrelated3[$i]['title'], | ||
92 | 'CODED' => $getrelated3[$i]['slug'], | ||
93 | 'AUTHOR' => 'Hatkirby', | ||
94 | 'DATE' => date('F d<\S\U\P>S</\S\U\P> Y',strtotime($getrelated3[$i]['pubDate'])))); | ||
95 | $i++; | ||
96 | } | ||
97 | |||
98 | if ($i > 0) | ||
99 | { | ||
100 | $template->display(); | ||
101 | } | ||
102 | } else { | ||
103 | generateError('404'); | ||
104 | } | ||
105 | } else { | ||
106 | $template = new FITemplate('comicarchive'); | ||
107 | $title = 'Kirby Fan Mail'; | ||
108 | $getcomics = "SELECT * FROM comic ORDER BY id DESC"; | ||
109 | $getcomics2 = mysql_query($getcomics); | ||
110 | $i=0; | ||
111 | while ($getcomics3[$i] = mysql_fetch_array($getcomics2)) | ||
112 | { | ||
113 | if ((!isset($lastmonth)) || ($lastmonth != date('m-Y',strtotime($getcomics3[$i]['pubDate'])))) | ||
114 | { | ||
115 | if (!isset($curID)) | ||
116 | { | ||
117 | $curID = 0; | ||
118 | } else { | ||
119 | $curID++; | ||
120 | } | ||
121 | $template->add_ref($curID, 'MONTH', array('TITLE' => date('F Y',strtotime($getcomics3[$i]['pubDate'])))); | ||
122 | if ($curID == 0) | ||
123 | { | ||
124 | $template->adds_ref_sub($curID, 'BIGEND',array('exi'=>1)); | ||
125 | } | ||
126 | $lastmonth = date('m-Y',strtotime($getcomics3[$i]['pubDate'])); | ||
127 | } | ||
128 | |||
129 | $page_id = 'kfm-' . $getcomics3[$i]['id']; | ||
130 | $getcomments = "SELECT * FROM comments WHERE page_id = \"" . $page_id . "\" ORDER BY posttime"; | ||
131 | $getcomments2 = mysql_query($getcomments); | ||
132 | $total_post=0; | ||
133 | while ($getcomments3[$total_post] = mysql_fetch_array($getcomments2)) | ||
134 | { | ||
135 | $total_post++; | ||
136 | } | ||
137 | if ($total_post >= 2) | ||
138 | { | ||
139 | $plural = 's'; | ||
140 | } | ||
141 | if ($total_post == 0) | ||
142 | { | ||
143 | $comText = 'No Comments'; | ||
144 | } elseif ($total_post == 1) | ||
145 | { | ||
146 | $comText = '1 Comment'; | ||
147 | } else { | ||
148 | $comText = $total_post . ' Comments'; | ||
149 | } | ||
150 | |||
151 | if ($curID == 0) | ||
152 | { | ||
153 | $template->adds_ref_sub($curID, 'BIG',array( 'DATE' => date('m-d-Y',strtotime($getcomics3[$i]['pubDate'])), | ||
154 | 'CODED' => $getcomics3[$i]['slug'], | ||
155 | 'TITLE' => $getcomics3[$i]['title'], | ||
156 | 'ID' => $getcomics3[$i]['id'], | ||
157 | 'YEARID' => ((date('Y',strtotime($getcomics3[$i]['pubDate']))-2006) % 4), | ||
158 | 'MONTH' => date('M',strtotime($getcomics3[$i]['pubDate'])), | ||
159 | 'DAY' => date('d',strtotime($getcomics3[$i]['pubDate'])), | ||
160 | 'AUTHOR' => 'Hatkirby', | ||
161 | 'PLURALCOMMENT' => (isset($plural) ? $plural : ''), | ||
162 | 'COMMENTS' => $comText)); | ||
163 | } else { | ||
164 | $template->adds_ref_sub($curID, 'SMALL',array( 'DATE' => date('m-d-Y',strtotime($getcomics3[$i]['pubDate'])), | ||
165 | 'CODED' => $getcomics3[$i]['slug'], | ||
166 | 'TITLE' => $getcomics3[$i]['title'])); | ||
167 | } | ||
168 | $i++; | ||
169 | } | ||
170 | if ($i==0) | ||
171 | { | ||
172 | generateError('404'); | ||
173 | } | ||
174 | $template->display(); | ||
175 | } | ||
176 | |||
177 | ?> | ||
diff --git a/pages/error.php b/pages/error.php new file mode 100644 index 0000000..7f6c505 --- /dev/null +++ b/pages/error.php | |||
@@ -0,0 +1,84 @@ | |||
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/error.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($errorid) && isset($_GET['id'])) | ||
26 | { | ||
27 | $errorid = $_GET['id']; | ||
28 | } | ||
29 | |||
30 | if ($errorid == '404') | ||
31 | { | ||
32 | header("HTTP/1.0 404 Not Found"); | ||
33 | |||
34 | $template = new FITemplate('errors/404'); | ||
35 | |||
36 | $strReferer = strtolower($_SERVER['HTTP_REFERER']); | ||
37 | |||
38 | if (strlen($strReferer) == 0) | ||
39 | { | ||
40 | $template->adds_block('NOREFERER',array('exi'=>1)); | ||
41 | } else { | ||
42 | if ((strpos($strReferer,".looksmart.co")>0) || (strpos($strReferer,".ifind.freeserve")>0) || (strpos($strReferer,".ask.co")>0) || (strpos($strReferer,"google.co")>0) || (strpos($strReferer,"altavista.co")>0) || (strpos($strReferer,"msn.co")>0) || (strpos($strReferer,"yahoo.co")>0)) | ||
43 | { | ||
44 | $arrSite = split("/",$strReferer); | ||
45 | $arrParams = split("?",$strReferer); | ||
46 | $strSearchTerms = $arrParams[1]; | ||
47 | $arrParams = split("&",$strSearchTerms); | ||
48 | $strSite = $arrSite[2]; | ||
49 | $sQryStr=""; | ||
50 | $arrQueryStrings = array("q=","p=","ask=","key="); | ||
51 | |||
52 | for ($i=0;$i<count($arrParams);$i++) | ||
53 | { | ||
54 | for ($q=0;$q<count($arrQueryStrings);$q++) | ||
55 | { | ||
56 | $sQryStr = $arrQueryStrings[$q]; | ||
57 | if (strpos($arrParams[$i],$sQryStr)==0) | ||
58 | { | ||
59 | $strSearchTerms = $arrParams[$i]; | ||
60 | $strSearchTerms = split($sQryStr,$strSearchTerms); | ||
61 | $strSearchTerms = $strSearchTerms[1]; | ||
62 | $strSearchTerms = str_replace("+"," ",$strSearchTerms); | ||
63 | } | ||
64 | } | ||
65 | } | ||
66 | $template->adds_block('SEARCHREF',array( 'REF' => $strReferer, | ||
67 | 'SITE' => $strSite, | ||
68 | 'TERMS' => $strSearchTerms)); | ||
69 | } else { | ||
70 | $strSite = $strReferer; | ||
71 | $strSite = split("/",$strSite); | ||
72 | $strSite = $strSite[2]; | ||
73 | |||
74 | if (preg_match('/fourisland\.com/',$strSite) == 1) | ||
75 | { | ||
76 | $template->adds_block('OURBAD',array('exi'=>1)); | ||
77 | } | ||
78 | $template->adds_block('NORMALREF',array( 'REF' => $strReferer, | ||
79 | 'SITE' => $strSite)); | ||
80 | } | ||
81 | } | ||
82 | |||
83 | $template->display(); | ||
84 | } | ||
diff --git a/pages/fourm.php b/pages/fourm.php new file mode 100644 index 0000000..41ae0a1 --- /dev/null +++ b/pages/fourm.php | |||
@@ -0,0 +1,27 @@ | |||
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/fourm.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 | include('fourm/link.php'); | ||
26 | |||
27 | ?> | ||
diff --git a/pages/holidates.php b/pages/holidates.php new file mode 100644 index 0000000..29b0ca4 --- /dev/null +++ b/pages/holidates.php | |||
@@ -0,0 +1,10 @@ | |||
1 | <TABLE WIDTH="100%" CLASS="webmail"><TR><TH>ID</TH><TH>Date</TH><TH>Holidate</TH></TR><?php | ||
2 | |||
3 | foreach ($specialdates as $num => $val) | ||
4 | { | ||
5 | $date = sd_clearDate(); | ||
6 | $date += ($num*60*60*24); | ||
7 | echo('<TR' . (($num % 2 == 0) ? ' CLASS="even"' : '') . '><TD>' . $num . '</TD><TD>' . date('F jS',$date) . '</TD><TD>' . $val . '</TD></TR>'); | ||
8 | } | ||
9 | |||
10 | ?></TABLE> | ||
diff --git a/pages/login.php b/pages/login.php new file mode 100644 index 0000000..6270502 --- /dev/null +++ b/pages/login.php | |||
@@ -0,0 +1,64 @@ | |||
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/login.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 | $noMembers=1; | ||
26 | |||
27 | include('includes/recaptchalib.php'); | ||
28 | $publickey = "6LfgvgEAAAAAAG_BJMkWk8sNcT1nBaGoXKJYb-JT"; | ||
29 | $privatekey = "6LfgvgEAAAAAAD0_UVLp57MU7tqcypsbZPS9qTnr"; | ||
30 | |||
31 | if (!isset($_GET['submit'])) | ||
32 | { | ||
33 | $template = new FITemplate('login'); | ||
34 | $template->add('REDIRECT',$_GET['redirect']); | ||
35 | |||
36 | $template->add('RECAPTCHA',recaptcha_get_html($publickey)); | ||
37 | } else { | ||
38 | $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); | ||
39 | if (!$resp->is_valid) | ||
40 | { | ||
41 | $template = new FITemplate('login'); | ||
42 | $template->add('REDIRECT',$_GET['redirect']); | ||
43 | $template->adds_block('ERROR',array('msg' => "The reCAPTCHA wasn't entered correctly. Go back and try it again. (reCAPTCHA said: " . $resp->error . ")")); | ||
44 | |||
45 | $template->add('RECAPTCHA',recaptcha_get_html($publickey)); | ||
46 | } else { | ||
47 | if (verifyUser($_POST['username'], $_POST['password'])) | ||
48 | { | ||
49 | sess_set('uname',$_POST['username']); | ||
50 | header('Location: ' . rawurldecode($_POST['redirect'])); | ||
51 | exit; | ||
52 | } else { | ||
53 | $template = new FITemplate('login'); | ||
54 | $template->add('REDIRECT',$_POST['redirect']); | ||
55 | $template->adds_block('ERROR',array('MSG' => "The username/password pair didn't resolve to a real user. Try logging on again, spelling the password right, or making sure you actually have an a account.")); | ||
56 | |||
57 | $template->add('RECAPTCHA',recaptcha_get_html($publickey)); | ||
58 | } | ||
59 | } | ||
60 | } | ||
61 | |||
62 | $template->display(); | ||
63 | |||
64 | ?> | ||
diff --git a/pages/logout.php b/pages/logout.php new file mode 100644 index 0000000..69b9386 --- /dev/null +++ b/pages/logout.php | |||
@@ -0,0 +1,28 @@ | |||
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/logout.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 | sess_delete('uname'); | ||
26 | header('Location: ' . rawurldecode($_GET['redirect'])); | ||
27 | |||
28 | ?> | ||
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 | ||
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 | $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 | ?> | ||
diff --git a/pages/polloftheweek.php b/pages/polloftheweek.php new file mode 100644 index 0000000..930f346 --- /dev/null +++ b/pages/polloftheweek.php | |||
@@ -0,0 +1,73 @@ | |||
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($_GET['potw'])) | ||
26 | { | ||
27 | if (!isset($forceDisplay)) | ||
28 | { | ||
29 | $getpoll = "SELECT * FROM polloftheweek ORDER BY id DESC LIMIT 0,1"; | ||
30 | } else { | ||
31 | $getpoll = "SELECT * FROM polloftheweek WHERE id = " . $forceDisplay; | ||
32 | } | ||
33 | $getpoll2 = mysql_query($getpoll); | ||
34 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
35 | |||
36 | $template->add('QUESTION', $getpoll3['question']); | ||
37 | $template->add('OPTION1', $getpoll3['option1']); | ||
38 | $template->add('OPTION2', $getpoll3['option2']); | ||
39 | $template->add('OPTION3', $getpoll3['option3']); | ||
40 | $template->add('OPTION4', $getpoll3['option4']); | ||
41 | |||
42 | $getip = "SELECT * FROM didpollalready WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; | ||
43 | $getip2 = mysql_query($getip); | ||
44 | $getip3 = mysql_fetch_array($getip2); | ||
45 | |||
46 | if (($getip3['ip'] != $_SERVER['REMOTE_ADDR']) && (!isset($forceDisplay))) | ||
47 | { | ||
48 | $template->adds_block('FORM',array('exi'=>1)); | ||
49 | } else { | ||
50 | $template->adds_block('DISPLAY',array('exi'=>1)); | ||
51 | |||
52 | $template->add('PERCENT1', getpercent($getpoll3,'1')); | ||
53 | $template->add('PERCENT2', getpercent($getpoll3,'2')); | ||
54 | $template->add('PERCENT3', getpercent($getpoll3,'3')); | ||
55 | $template->add('PERCENT4', getpercent($getpoll3,'4')); | ||
56 | } | ||
57 | } else { | ||
58 | $setip = "INSERT INTO didpollalready SET ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; | ||
59 | $setip2 = mysql_query($setip); | ||
60 | $getpoll = "SELECT * FROM polloftheweek ORDER BY id DESC LIMIT 0,1"; | ||
61 | $getpoll2 = mysql_query($getpoll); | ||
62 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
63 | $setpoll = "UPDATE polloftheweek SET clicks" . $_POST['options'] . " = " . ($getpoll3['clicks' . $_POST['options']]+1) . " WHERE id = " . $getpoll3['id']; | ||
64 | $setpoll2 = mysql_query($setpoll); | ||
65 | |||
66 | $template = new FITemplate('msg'); | ||
67 | |||
68 | $template->add('MSG','<H2>' . $getpoll3['question'] . '</H2><P>Thank you for voting on the Poll of the Week!<BR><A HREF="poll.php?id=' . $getpoll3['id'] . '">Click here to visit the page for this poll.'); | ||
69 | |||
70 | $template->display(); | ||
71 | } | ||
72 | |||
73 | ?> | ||
diff --git a/pages/post.php b/pages/post.php new file mode 100644 index 0000000..f7990bd --- /dev/null +++ b/pages/post.php | |||
@@ -0,0 +1,107 @@ | |||
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/post.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 = 'home'; | ||
26 | $pageAID = 'archive'; | ||
27 | |||
28 | include('includes/recaptchalib.php'); | ||
29 | $privatekey = "6LfgvgEAAAAAAD0_UVLp57MU7tqcypsbZPS9qTnr"; | ||
30 | |||
31 | $template = new FITemplate('msg'); | ||
32 | $template->add('BACK','the previous page'); | ||
33 | |||
34 | if (!isset($_GET['id'])) | ||
35 | { | ||
36 | $template->add('MSG','I\'m sorry, but there\'s no page-id set here, so sadly you can\'t comment yet. Why not contact the administratior (link on the HatBar) and tell him that you saw this error?'); | ||
37 | } else { | ||
38 | if ($_POST['comment'] == "") | ||
39 | { | ||
40 | $template->add('MSG','I\'m sorry, but you didn\'t enter a comment!'); | ||
41 | } else { | ||
42 | if (!isLoggedIn()) | ||
43 | { | ||
44 | $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); | ||
45 | if (!$resp->is_valid) | ||
46 | { | ||
47 | $template->add('MSG',"The reCAPTCHA wasn't entered correctly. Go back and try it again. (reCAPTCHA said: " . $resp->error . ")"); | ||
48 | } else { | ||
49 | if (preg_match('/^[A-Za-z0-9!#$&\'*+-\/=?^_`{|}~]+@[-A-Za-z0-9]+(\.[-A-Za-z0-9]+)+[A-Za-z]$/', $_POST['email'])) | ||
50 | { | ||
51 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $_POST['username'] . "\""; | ||
52 | $getanon2 = mysql_query($getanon); | ||
53 | $getanon3 = mysql_fetch_array($getanon2); | ||
54 | |||
55 | if ($getanon3['username'] == $_POST['username']) | ||
56 | { | ||
57 | if ($getanon3['email'] == $_POST['email']) | ||
58 | { | ||
59 | $setcomment = "INSERT INTO comments SET page_id = \"" . $_GET['id'] . "\", username = \"" . $_POST['username'] . "\", comment = \"" . $_POST['comment'] . "\""; | ||
60 | $setcomment2 = mysql_query($setcomment); | ||
61 | |||
62 | $page_id = $_GET['id']; | ||
63 | $comType = substr($page_id,0,strpos($page_id,'-')); | ||
64 | $comID = substr($page_id,strpos($page_id,'-')+1); | ||
65 | if ($comType == 'updates') | ||
66 | { | ||
67 | recalcPop($comID); | ||
68 | } | ||
69 | |||
70 | $template->add('MSG',"Thank you, " . $getanon3['username'] . ", for posting your valuable comment!"); | ||
71 | } else { | ||
72 | $template->add('MSG',"I'm sorry, but this anonymous username is already in use. If this is in fact you, please verify that you have entered the same email address that you entered the first time you commented here."); | ||
73 | } | ||
74 | } else { | ||
75 | $setcomment = "INSERT INTO moderation SET page_id = \"" . $_GET['id'] . "\", author = \"" . $_POST['username'] . "\", email = \"" . $_POST['email'] . "\", comment = \"" . $_POST['comment'] . "\", website = \"" . $_POST['website'] . "\""; | ||
76 | $setcomment2 = mysql_query($setcomment); | ||
77 | |||
78 | mail('hatkirby@fourisland.com', 'New comment to moderate on Four Island', 'Some one has anonymously left a comment on Four Island and it will require moderation.'); | ||
79 | |||
80 | $template->add('MSG',"Thank you for posting your valuable comment!<P>However, as you aren't logged in, your comment will have to be verified by a moderator before it appears. Sorry!"); | ||
81 | } | ||
82 | } else { | ||
83 | $template->add('MSG',"I'm sorry, but you've entered an invalid email address."); | ||
84 | } | ||
85 | } | ||
86 | } else { | ||
87 | $setcomment = "INSERT INTO comments SET page_id = \"" . $_GET['id'] . "\", username = \"" . sess_get('uname') . "\", comment = \"" . $_POST['comment'] . "\""; | ||
88 | $setcomment2 = mysql_query($setcomment); | ||
89 | |||
90 | mail('hatkirby@fourisland.com', 'New comment on Four Island!', sess_get('uname') . ' has posted a comment on Four Island under the "page id" ' . $_GET['id']); | ||
91 | |||
92 | $page_id = $_GET['id']; | ||
93 | $comType = substr($page_id,0,strpos($page_id,'-')); | ||
94 | $comID = substr($page_id,strpos($page_id,'-')+1); | ||
95 | if ($comType == 'updates') | ||
96 | { | ||
97 | recalcPop($comID); | ||
98 | } | ||
99 | |||
100 | $template->add('MSG',"Thank you, " . sess_get('uname') . ", for posting your valuable comment!"); | ||
101 | } | ||
102 | } | ||
103 | } | ||
104 | |||
105 | $template->display(); | ||
106 | |||
107 | ?> | ||
diff --git a/pages/projects.php b/pages/projects.php new file mode 100644 index 0000000..4129cdf --- /dev/null +++ b/pages/projects.php | |||
@@ -0,0 +1,94 @@ | |||
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/projects.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 | include('includes/phpsvnclient.php'); | ||
26 | |||
27 | if (!isset($_GET['project'])) | ||
28 | { | ||
29 | |||
30 | } else { | ||
31 | if (!isset($_GET['folder']) && !isset($_GET['file'])) | ||
32 | { | ||
33 | } else if (isset($_GET['folder'])) | ||
34 | { | ||
35 | if ($_GET['folder'] == 'browse') | ||
36 | { | ||
37 | $template = new FITemplate('projects/browse'); | ||
38 | |||
39 | if (!isset($_GET['id'])) | ||
40 | { | ||
41 | $path = '/'; | ||
42 | } else { | ||
43 | $path = '/' . $_GET['id']; | ||
44 | } | ||
45 | if (!isset($_GET['rev'])) | ||
46 | { | ||
47 | $rev = -1; | ||
48 | } else { | ||
49 | $rev = $_GET['rev']; | ||
50 | } | ||
51 | |||
52 | $svn = new phpSVNclient(); | ||
53 | $svn->setRespository('http://svn.fourisland.com/' . $_GET['project']); | ||
54 | $svn->setAuth('hatkirby','popstartwo506'); | ||
55 | $data = $svn->getFile($path,$rev); | ||
56 | |||
57 | if (substr($path,strlen($path)-1,1) != '/') | ||
58 | { | ||
59 | $template->add('DATA', str_replace(' ',' ',str_replace(' ',' ',nl2br(htmlentities($data))))); | ||
60 | $template->adds_block('FILE', array('NAME' => $path)); | ||
61 | } else { | ||
62 | $template->add('DATA', $data); | ||
63 | } | ||
64 | |||
65 | $logs = $svn->getFileLogs($path); | ||
66 | $template->add('LOGDATA', str_replace("\n\n",'<P>',htmlentities($logs[count($logs)-1]['comment']))); | ||
67 | $template->add('AUTHOR', $logs[count($logs)-1]['author']); | ||
68 | $template->add('DATE', date('F dS Y \a\\t g:i:s a',strtotime($logs[count($logs)-1]['date']))); | ||
69 | |||
70 | if ($rev != -1) | ||
71 | { | ||
72 | $template->adds_block('FORWARD', array( 'URL' => ('/projects/' . $_GET['project'] . '/browse' . $path . '?rev=' . ($rev+1)), | ||
73 | 'NUM' => ($rev+1))); | ||
74 | } | ||
75 | |||
76 | if ($rev == -1) | ||
77 | { | ||
78 | $rev = $svn->getVersion(); | ||
79 | } | ||
80 | |||
81 | if ($rev != 1) | ||
82 | { | ||
83 | $template->adds_block('BACK', array( 'URL' => ('/projects/' . $_GET['project'] . '/browse' . $path . '?rev=' . ($rev-1)), | ||
84 | 'NUM' => ($rev-1))); | ||
85 | } | ||
86 | } | ||
87 | } else if (isset($_GET['file'])) | ||
88 | { | ||
89 | } | ||
90 | } | ||
91 | |||
92 | $template->display(); | ||
93 | |||
94 | ?> | ||
diff --git a/pages/quotes.php b/pages/quotes.php new file mode 100644 index 0000000..78cd543 --- /dev/null +++ b/pages/quotes.php | |||
@@ -0,0 +1,166 @@ | |||
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/quotes.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 | include('includes/functions_quotes.php'); | ||
26 | |||
27 | $pageCategory = 'quotes'; | ||
28 | |||
29 | if (isset($_GET['id'])) | ||
30 | { | ||
31 | $quote_num = $_GET['id']; | ||
32 | } | ||
33 | |||
34 | if ($_GET['act'] == 'add') | ||
35 | { | ||
36 | $template = new FITemplate('quotes/add'); | ||
37 | if (isset($_GET['submit'])) | ||
38 | { | ||
39 | $template->adds_block('SUBMITTED',array('QUOTE' => (nl2br(htmlspecialchars($_POST['rash_quote'])) . "\n"))); | ||
40 | if (!isLoggedIn()) | ||
41 | { | ||
42 | $insquote = "INSERT INTO rash_queue (quote) VALUES(\"" . addslashes(htmlspecialchars($_POST['rash_quote'])) . "\")"; | ||
43 | } else { | ||
44 | $today = mktime(date('G'),date('i'),date('s'),date('m'),date('d'),date('Y')); | ||
45 | $insquote = "INSERT INTO rash_quotes (quote, rating, flag, date) VALUES (\"" . addslashes($_POST['rash_quote']) . "\", 0, 0, \"" . $today . "\")"; | ||
46 | } | ||
47 | $insquote2 = mysql_query($insquote); | ||
48 | } | ||
49 | $template->display(); | ||
50 | } elseif ($_GET['act'] == 'bottom') | ||
51 | { | ||
52 | $query = "SELECT id, quote, rating, flag FROM rash_quotes WHERE rating < 0 ORDER BY rating ASC LIMIT 50"; | ||
53 | quote_generation($query, "Bottom", -1); | ||
54 | } elseif ($_GET['act'] == 'browse') | ||
55 | { | ||
56 | $query = "SELECT id, quote, rating, flag FROM rash_quotes ORDER BY id ASC "; | ||
57 | quote_generation($query, "Browse", (isset($_GET['page']) ? $_GET['page'] : 1), 10, 5); | ||
58 | } elseif ($_GET['act'] == 'flag') | ||
59 | { | ||
60 | $template = new FITemplate('msg'); | ||
61 | $tracking_verdict = user_quote_status('flag', $quote_num, $template); | ||
62 | if ($tracking_verdict < 3) | ||
63 | { | ||
64 | $getfla = "SELECT flag FROM rash_quotes WHERE id = " . $quote_num . " LIMIT 0,1"; | ||
65 | $getfla2 = mysql_query($getfla); | ||
66 | $getfla3 = mysql_fetch_array($getfla2); | ||
67 | |||
68 | if ($getfla3['flag'] == 2) | ||
69 | { | ||
70 | $template->add('MSG',"This quote has been flagged and rechecked by a moderator already."); | ||
71 | } elseif ($getfla3['flag'] == 1) | ||
72 | { | ||
73 | $template->add('MSG',"This quote is currently pending deletion."); | ||
74 | } else { | ||
75 | $template->add('MSG',"You have marked this quote for deletion."); | ||
76 | $setfla = "UPDATE rash_quotes SET flag = 1 WHERE id = " . $quote_num; | ||
77 | $setfla2 = mysql_query($setfla); | ||
78 | } | ||
79 | } | ||
80 | $template->add('BACK','Quote #' . $quote_num); | ||
81 | $template->display(); | ||
82 | } elseif ($_GET['act'] == 'latest') | ||
83 | { | ||
84 | $query = "SELECT id, quote, rating, flag FROM rash_quotes ORDER BY id DESC LIMIT 50"; | ||
85 | quote_generation($query, "Latest", -1); | ||
86 | } elseif ($_GET['act'] == 'random') | ||
87 | { | ||
88 | $query = "SELECT id, quote, rating, flag FROM rash_quotes ORDER BY rand() LIMIT 50"; | ||
89 | quote_generation($query, "Random", -1); | ||
90 | } elseif ($_GET['act'] == 'random2') | ||
91 | { | ||
92 | $query = "SELECT id, quote, rating, flag FROM rash_quotes WHERE rating > 1 ORDER BY rand() LIMIT 50"; | ||
93 | quote_generation($query, "Random2", -1); | ||
94 | } elseif ($_GET['act'] == 'search') | ||
95 | { | ||
96 | if (isset($_GET['fetch'])) | ||
97 | { | ||
98 | if ($_POST['sortby'] == 'rating') | ||
99 | { | ||
100 | $how = 'desc'; | ||
101 | } else { | ||
102 | $how = 'asc'; | ||
103 | } | ||
104 | $getquotes = "SELECT id, quote, rating, flag FROM rash_quotes WHERE quote LIKE \"%" . $_POST['search'] . "%\" ORDER BY " . $_POST['sortby'] . " " . $how . " LIMIT 0," . $_POST['number']; | ||
105 | quote_generation($getquotes, "Query Results", -1); | ||
106 | } | ||
107 | $template = new FITemplate('quotes/search'); | ||
108 | $template->display(); | ||
109 | } elseif ($_GET['act'] == 'top') | ||
110 | { | ||
111 | $query = "SELECT id, quote, rating, flag FROM rash_quotes WHERE rating > 0 ORDER BY rating DESC LIMIT 50"; | ||
112 | quote_generation($query, "Top", -1); | ||
113 | } elseif ($_GET['act'] == 'vote') | ||
114 | { | ||
115 | $template = new FITemplate('msg'); | ||
116 | $tracking_verdict = user_quote_status('vote', $quote_num,$template); | ||
117 | $template->add('BACK','Quote #' . $quote_num); | ||
118 | $template->display(); | ||
119 | if ($tracking_verdict < 3) | ||
120 | { | ||
121 | if ($_GET['dir'] == "plus") | ||
122 | { | ||
123 | $setquote = "UPDATE rash_quotes SET rating = rating+1 WHERE id = " . $quote_num; | ||
124 | $setquote2 = mysql_query($setquote); | ||
125 | } elseif($_GET['dir'] == "minus") | ||
126 | { | ||
127 | $setquote = "UPDATE rash_quotes SET rating = rating-1 WHERE id = " . $quote_num; | ||
128 | $setquote2 = mysql_query($setquote); | ||
129 | } | ||
130 | } | ||
131 | } else { | ||
132 | if ((is_int($_GET['act']) || ($_GET['act'] != false)) && (verify_int($_GET['act']))) | ||
133 | { | ||
134 | $query = "SELECT id, quote, rating, flag FROM rash_quotes WHERE id = " . $_GET['act']; | ||
135 | quote_generation($query, "#" . $_GET['act'], -1); | ||
136 | $page_id = 'quote-' . $_GET['act']; | ||
137 | } else { | ||
138 | $template = new FITemplate('post'); | ||
139 | $template->adds_block('INTERNAL',array('exi'=>1)); | ||
140 | |||
141 | $getpost = "SELECT * FROM updates WHERE tag1 = \"quotes\" OR tag2 = \"tag2\" OR tag3 = \"tag3\" ORDER BY id DESC LIMIT 0,1"; | ||
142 | $getpost2 = mysql_query($getpost); | ||
143 | $getpost3 = mysql_fetch_array($getpost2); | ||
144 | |||
145 | $title = $getpost3['title'] . ' - Blog Archive'; | ||
146 | |||
147 | $template->adds_block('POST', array( 'ID' => $getpost3['id'], | ||
148 | 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), | ||
149 | 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), | ||
150 | 'MONTH' => date('M',strtotime($getpost3['pubDate'])), | ||
151 | 'DAY' => date('d',strtotime($getpost3['pubDate'])), | ||
152 | 'CODED' => urlencode($getpost3['title']), | ||
153 | 'TITLE' => $getpost3['title'], | ||
154 | 'AUTHOR' => $getpost3['author'], | ||
155 | 'TAG1' => $getpost3['tag1'], | ||
156 | 'TAG2' => $getpost3['tag2'], | ||
157 | 'TAG3' => $getpost3['tag3'], | ||
158 | 'TEXT' => parseBBCode($getpost3['text']))); | ||
159 | |||
160 | $template->display(); | ||
161 | $page_id = 'updates-' . $getpost3['id']; | ||
162 | } | ||
163 | include('includes/comments.php'); | ||
164 | } | ||
165 | |||
166 | ?> | ||
diff --git a/pages/splash.php b/pages/splash.php new file mode 100644 index 0000000..0a9ca89 --- /dev/null +++ b/pages/splash.php | |||
@@ -0,0 +1,28 @@ | |||
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/splash.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 | $template = new FITemplate('welcome'); | ||
26 | $template->display(); | ||
27 | |||
28 | ?> | ||
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 | ||
10 | 4::::444444::::444 | ||
11 | 4::::::::::::::::4 pages/vote.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 = 'home'; | ||
26 | $pageAID = 'archive'; | ||
27 | |||
28 | if (!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 | ?> | ||
diff --git a/pages/welcome.php b/pages/welcome.php new file mode 100644 index 0000000..24fd7ad --- /dev/null +++ b/pages/welcome.php | |||
@@ -0,0 +1,81 @@ | |||
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/welcome.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 = 'home'; | ||
26 | |||
27 | $template = new FITemplate('post'); | ||
28 | $template->adds_block('EXTERNAL',array('exi'=>1)); | ||
29 | |||
30 | $curID = 0; | ||
31 | |||
32 | $getpost = "SELECT * FROM updates ORDER BY id DESC LIMIT 0,4"; | ||
33 | $getpost2 = mysql_query($getpost); | ||
34 | while ($getpost3 = mysql_fetch_array($getpost2)) | ||
35 | { | ||
36 | updatePop($getpost3['id'],'home_views'); | ||
37 | |||
38 | $page_id = 'updates-' . $getpost3['id']; | ||
39 | $getcomments = "SELECT * FROM comments WHERE page_id = \"" . $page_id . "\" ORDER BY posttime"; | ||
40 | $getcomments2 = mysql_query($getcomments); | ||
41 | $total_post=0; | ||
42 | while ($getcomments3[$total_post] = mysql_fetch_array($getcomments2)) | ||
43 | { | ||
44 | $total_post++; | ||
45 | } | ||
46 | if ($total_post >= 2) | ||
47 | { | ||
48 | $plural = 's'; | ||
49 | } | ||
50 | if ($total_post == 0) | ||
51 | { | ||
52 | $comText = 'No Comments'; | ||
53 | } elseif ($total_post == 1) | ||
54 | { | ||
55 | $comText = '1 Comment'; | ||
56 | } else { | ||
57 | $comText = $total_post . ' Comments'; | ||
58 | } | ||
59 | |||
60 | $template->add_ref($curID, 'POST', array( 'ID' => $getpost3['id'], | ||
61 | 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), | ||
62 | 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), | ||
63 | 'MONTH' => date('M',strtotime($getpost3['pubDate'])), | ||
64 | 'DAY' => date('d',strtotime($getpost3['pubDate'])), | ||
65 | 'CODED' => $getpost3['slug'], | ||
66 | 'TITLE' => $getpost3['title'], | ||
67 | 'AUTHOR' => $getpost3['author'], | ||
68 | 'TAG1' => $getpost3['tag1'], | ||
69 | 'TAG2' => $getpost3['tag2'], | ||
70 | 'TAG3' => $getpost3['tag3'], | ||
71 | 'PLURALCOMMENT' => (isset($plural) ? $plural : ''), | ||
72 | 'COMMENTS' => $comText, | ||
73 | 'RATING' => $getpost3['rating'], | ||
74 | 'TEXT' => parseBBCode($getpost3['text']))); | ||
75 | |||
76 | $curID++; | ||
77 | } | ||
78 | |||
79 | $template->display(); | ||
80 | |||
81 | ?> | ||
diff --git a/pages/wiki.php b/pages/wiki.php new file mode 100644 index 0000000..3e5a410 --- /dev/null +++ b/pages/wiki.php | |||
@@ -0,0 +1,179 @@ | |||
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/wiki.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 = 'wiki'; | ||
26 | |||
27 | $page = (isset($_GET['page']) ? $_GET['page'] : ''); | ||
28 | |||
29 | if (!isset($_GET['action'])) | ||
30 | { | ||
31 | $getpage = "SELECT * FROM wiki_pages WHERE slug = \"" . $page . "\""; | ||
32 | $getpage2 = mysql_query($getpage); | ||
33 | $getpage3 = mysql_fetch_array($getpage2); | ||
34 | |||
35 | if ($getpage3['slug'] == $page) | ||
36 | { | ||
37 | $getrev = "SELECT * FROM wiki_revisions WHERE id = " . $getpage3['revision']; | ||
38 | $getrev2 = mysql_query($getrev); | ||
39 | $getrev3 = mysql_fetch_array($getrev2); | ||
40 | |||
41 | $title = $getpage3['title'] . ' - Wiki'; | ||
42 | |||
43 | $template = new FITemplate('wiki/page'); | ||
44 | $template->add('TITLE', $getpage3['title']); | ||
45 | $template->add('CONTENT', parseBBCode($getrev3['text'])); | ||
46 | $template->display(); | ||
47 | } else { | ||
48 | if (isLoggedIn()) | ||
49 | { | ||
50 | header('Location: ./?action=create'); | ||
51 | exit; | ||
52 | } else { | ||
53 | $template = new FITemplate('msg'); | ||
54 | $template->add('MSG', "The wiki page you are trying to access does not yet exist, and as you are not logged in, you cannot create it. If you would like to, why not log in and create this page?"); | ||
55 | $template->add('BACK', "the previous page"); | ||
56 | $template->display(); | ||
57 | } | ||
58 | } | ||
59 | } else if ($_GET['action'] == 'create') | ||
60 | { | ||
61 | if (isLoggedIn()) | ||
62 | { | ||
63 | $template = new FITemplate('wiki/create'); | ||
64 | $template->display(); | ||
65 | } else { | ||
66 | $template = new FITemplate('msg'); | ||
67 | $template->add('MSG', "I'm sorry, but you are attempting to create a wiki page while you aren't logged in. Please log in and then return."); | ||
68 | $template->add('BACK', "the previous page"); | ||
69 | $template->display(); | ||
70 | } | ||
71 | } else if ($_GET['action'] == 'edit') | ||
72 | { | ||
73 | if (isLoggedIn()) | ||
74 | { | ||
75 | $getpage = "SELECT * FROM wiki_pages WHERE slug = \"" . $page . "\""; | ||
76 | $getpage2 = mysql_query($getpage); | ||
77 | $getpage3 = mysql_fetch_array($getpage2); | ||
78 | |||
79 | if ($getpage3['slug'] == $page) | ||
80 | { | ||
81 | $getrev = "SELECT * FROM wiki_revisions WHERE id = " . $getpage3['revision']; | ||
82 | $getrev2 = mysql_query($getrev); | ||
83 | $getrev3 = mysql_fetch_array($getrev2); | ||
84 | |||
85 | $template = new FITemplate('wiki/edit'); | ||
86 | $template->add('PAGENAME', $getpage3['title']); | ||
87 | $template->add('PAGETEXT', $getrev3['text']); | ||
88 | $template->display(); | ||
89 | } else { | ||
90 | header('Location: ./?action=create'); | ||
91 | exit; | ||
92 | } | ||
93 | } else { | ||
94 | $template = new FITemplate('msg'); | ||
95 | $template->add('MSG', "I'm sorry, but you are attempting to edit a wiki page while you aren't logged in. Please log in and then return."); | ||
96 | $template->add('BACK', "the previous page"); | ||
97 | $template->display(); | ||
98 | } | ||
99 | } else if ($_GET['action'] == 'submit') | ||
100 | { | ||
101 | if (isLoggedIn()) | ||
102 | { | ||
103 | if ($_GET['submit'] == 'create') | ||
104 | { | ||
105 | $insrev = "INSERT INTO wiki_revisions (author,text) VALUES (\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\")"; | ||
106 | $insrev2 = mysql_query($insrev); | ||
107 | |||
108 | $getrev = "SELECT * FROM wiki_revisions WHERE author = \"" . sess_get('uname') . "\" AND text = \"" . addslashes($_POST['text']) . "\" ORDER BY id DESC LIMIT 0,1"; | ||
109 | $getrev2 = mysql_query($getrev); | ||
110 | $getrev3 = mysql_fetch_array($getrev2); | ||
111 | |||
112 | $slug = generateSlug($_POST['title'],'wiki-pages'); | ||
113 | |||
114 | $inspage = "INSERT INTO wiki_pages (title,slug,revision) VALUES (\"" . $_POST['title'] . "\",\"" . $slug . "\"," . $getrev3['id'] . ")"; | ||
115 | $inspage2 = mysql_query($inspage); | ||
116 | |||
117 | $template = new FITemplate('msg2'); | ||
118 | $template->add('MSG', 'YAY! You\'ve just created a page!'); | ||
119 | $template->add('LINK', '/wiki/' . $slug . '/'); | ||
120 | $template->add('BACK', 'View the page you just created'); | ||
121 | $template->display(); | ||
122 | } else if ($_GET['submit'] == 'edit') | ||
123 | { | ||
124 | $getpage = "SELECT * FROM wiki_pages WHERE slug = \"" . $_GET['page'] . "\""; | ||
125 | $getpage2 = mysql_query($getpage); | ||
126 | $getpage3 = mysql_fetch_array($getpage2); | ||
127 | |||
128 | $insrev = "INSERT INTO wiki_revisions (author,text,previous) VALUES (\"" . sess_get('uname') . "\",\"" . addslashes($_POST['text']) . "\"," . $getpage3['revision'] . ")"; | ||
129 | $insrev2 = mysql_query($insrev); | ||
130 | |||
131 | $getrev4 = "SELECT * FROM wiki_revisions WHERE author = \"" . sess_get('uname') . "\" AND text = \"" . addslashes($_POST['text']) . "\" AND previous = " . $getpage3['revision'] . " ORDER BY id DESC LIMIT 0,1"; | ||
132 | $getrev5 = mysql_query($getrev4); | ||
133 | $getrev6 = mysql_fetch_array($getrev5); | ||
134 | |||
135 | $setpage = "UPDATE wiki_pages SET revision = " . $getrev6['id'] . " WHERE revision = " . $getpage3['revision']; | ||
136 | $setpage2 = mysql_query($setpage); | ||
137 | |||
138 | $template = new FITemplate('msg2'); | ||
139 | $template->add('MSG', 'YAY! You\'ve just edited a page!'); | ||
140 | $template->add('LINK', './'); | ||
141 | $template->add('BACK', 'View the page you just edited'); | ||
142 | $template->display(); | ||
143 | } | ||
144 | } else { | ||
145 | $template = new FITemplate('msg'); | ||
146 | $template->add('MSG', "I'm sorry, but you are attempting to edit a wiki page while you aren't logged in. Please log in and then return."); | ||
147 | $template->add('BACK', "the previous page"); | ||
148 | $template->display(); | ||
149 | } | ||
150 | } else if ($_GET['action'] == 'index') | ||
151 | { | ||
152 | $template = new FITemplate('wiki/index'); | ||
153 | $getpages = "SELECT * FROM wiki_pages, wiki_revisions WHERE wiki_revisions.id = wiki_pages.revision ORDER BY title ASC"; | ||
154 | $getpages2 = mysql_query($getpages); | ||
155 | $i=0; | ||
156 | $lastLetter=''; | ||
157 | while ($getpages3[$i] = mysql_fetch_array($getpages2)) | ||
158 | { | ||
159 | if (substr($getpages3[$i]['title'],0,1) != $lastLetter) | ||
160 | { | ||
161 | if (!isset($curID)) | ||
162 | { | ||
163 | $curID = 0; | ||
164 | } else { | ||
165 | $curID++; | ||
166 | } | ||
167 | $template->add_ref($curID, 'LETTER', array('TITLE' => substr($getpages3[$i]['title'],0,1))); | ||
168 | $lastLetter = substr($getpages3[$i]['title'],0,1); | ||
169 | } | ||
170 | |||
171 | $template->adds_ref_sub($curID, 'PAGE', array( 'TITLE' => $getpages3[$i]['title'], | ||
172 | 'CODED' => ($getpages3[$i]['slug'] != '' ? $getpages3[$i]['slug'] . '/' : ''), | ||
173 | 'DATE' => date('m-d-y',strtotime($getpages3[$i]['pubDate'])))); | ||
174 | $i++; | ||
175 | } | ||
176 | $template->display(); | ||
177 | } | ||
178 | |||
179 | ?> | ||