diff options
Diffstat (limited to 'pages/viewPost.php')
-rw-r--r-- | pages/viewPost.php | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/pages/viewPost.php b/pages/viewPost.php new file mode 100644 index 0000000..1daca00 --- /dev/null +++ b/pages/viewPost.php | |||
@@ -0,0 +1,62 @@ | |||
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/viewPost.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 (!isAdmin()) | ||
26 | { | ||
27 | generateError('404'); | ||
28 | } else { | ||
29 | $template = new FITemplate('post'); | ||
30 | $template->adds_block('INTERNAL',array('exi'=>1)); | ||
31 | |||
32 | $getpost = "SELECT * FROM " . $_GET['type'] . " WHERE id = " . $_GET['id']; | ||
33 | $getpost2 = mysql_query($getpost); | ||
34 | $getpost3 = mysql_fetch_array($getpost2); | ||
35 | |||
36 | if ($getpost3['id'] == $_GET['id']) | ||
37 | { | ||
38 | $template->add_ref(0, 'POST', array( 'ID' => $getpost3['id'], | ||
39 | 'YEARID' => ((date('Y')-2006) % 4), | ||
40 | 'DATE' => date('F jS Y \a\\t g:i:s a'), | ||
41 | 'MONTH' => date('M'), | ||
42 | 'DAY' => date('d'), | ||
43 | 'CODED' => $getpost3['slug'], | ||
44 | 'TITLE' => $getpost3['title'], | ||
45 | 'AUTHOR' => $getpost3['author'], | ||
46 | 'RATING' => $getpost3['rating'], | ||
47 | 'TEXT' => parseText($getpost3['text']))); | ||
48 | |||
49 | $tags = getTags($getpost3['id']); | ||
50 | foreach ($tags as $tag) | ||
51 | { | ||
52 | $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag)); | ||
53 | } | ||
54 | |||
55 | $template->adds_ref_sub(0, 'NOVOTE', array('exi'=>1)); | ||
56 | $template->display(); | ||
57 | } else { | ||
58 | generateError('404'); | ||
59 | } | ||
60 | } | ||
61 | |||
62 | ?> | ||