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 /includes/footer.php | |
download | fourisland-24503e3abe705acde2df159aeae61be0d009f92e.tar.gz fourisland-24503e3abe705acde2df159aeae61be0d009f92e.tar.bz2 fourisland-24503e3abe705acde2df159aeae61be0d009f92e.zip |
Imported sources
Diffstat (limited to 'includes/footer.php')
-rw-r--r-- | includes/footer.php | 198 |
1 files changed, 198 insertions, 0 deletions
diff --git a/includes/footer.php b/includes/footer.php new file mode 100644 index 0000000..e4c88c8 --- /dev/null +++ b/includes/footer.php | |||
@@ -0,0 +1,198 @@ | |||
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/footer.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('footer'); | ||
26 | |||
27 | $template->add('EXTRASIDEBARS',(isset($extraSidebars) ? $extraSidebars : '')); | ||
28 | |||
29 | if (isset($onFourm)) | ||
30 | { | ||
31 | $template->adds_block('ONFOURM',array('exi'=>1)); | ||
32 | } | ||
33 | |||
34 | if (!isset($noRightbar)) | ||
35 | { | ||
36 | $template->adds_block('RIGHTBAR',array('exi'=>1)); | ||
37 | |||
38 | if (!isset($noHatNav)) | ||
39 | { | ||
40 | $template->adds_block('USEHATNAV', array('exi'=>1)); | ||
41 | if (!isset($genHatNav)) | ||
42 | { | ||
43 | $gethnis = 'SELECT * FROM hatnav WHERE category = "' . | ||
44 | $pageCategory . '"'; | ||
45 | $gethnis2 = mysql_query($gethnis); | ||
46 | $i=0; | ||
47 | while ($gethnis3[$i] = mysql_fetch_array($gethnis2)) | ||
48 | { | ||
49 | $template->adds_block('HATNAV', array( 'AID' => $gethnis3[$i]['AID'], | ||
50 | 'HREF' => $gethnis3[$i]['href'], | ||
51 | 'IMAGE' => '/theme/images/icons/' . $gethnis3[$i]['image'] . '.png', | ||
52 | 'TEXT' => $gethnis3[$i]['text'], | ||
53 | 'NEW' => dispIfNotOld($gethnis3[$i]['lastEdit']))); | ||
54 | $i++; | ||
55 | } | ||
56 | } else { | ||
57 | $i=0; | ||
58 | while ($i < $genHatNavNum) | ||
59 | { | ||
60 | $template->adds_block('HATNAV', array( 'AID' => 'post', | ||
61 | 'HREF' => $genHatNav[$i]['href'], | ||
62 | 'IMAGE' => '/theme/images/blue.PNG', | ||
63 | 'TEXT' => $genHatNav[$i]['text'], | ||
64 | 'NEW' => '')); | ||
65 | $i++; | ||
66 | } | ||
67 | } | ||
68 | } | ||
69 | |||
70 | include('pages/polloftheweek.php'); | ||
71 | |||
72 | $getpopular = "SELECT * FROM updates ORDER BY popularity DESC LIMIT 0,5"; | ||
73 | $getpopular2 = mysql_query($getpopular); | ||
74 | $i=0; | ||
75 | while ($getpopular3[$i] = mysql_fetch_array($getpopular2)) | ||
76 | { | ||
77 | $template->adds_block('POPULAR', array( 'CODED' => $getpopular3[$i]['slug'], | ||
78 | 'TITLE' => stripslashes($getpopular3[$i]['title']))); | ||
79 | $i++; | ||
80 | } | ||
81 | |||
82 | $getcomments = "SELECT * FROM comments WHERE page_id LIKE \"updates-%\" ORDER BY id DESC LIMIT 0,5"; | ||
83 | $getcomments2 = mysql_query($getcomments); | ||
84 | $i=0; | ||
85 | while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) | ||
86 | { | ||
87 | $getpost = "SELECT * FROM updates WHERE id = " . substr($getcomments3[$i]['page_id'],strpos($getcomments3[$i]['page_id'],'-')+1); | ||
88 | $getpost2 = mysql_query($getpost); | ||
89 | $getpost3 = mysql_fetch_array($getpost2); | ||
90 | |||
91 | $getuser = "SELECT * FROM users WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | ||
92 | $getuser2 = mysql_query($getuser); | ||
93 | $getuser3 = mysql_fetch_array($getuser2); | ||
94 | |||
95 | if ($getuser3['username'] == $getcomments3[$i]['username']) | ||
96 | { | ||
97 | $username = $getuser3['username']; | ||
98 | $website = $getuser3['website']; | ||
99 | } else { | ||
100 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | ||
101 | $getanon2 = mysql_query($getanon); | ||
102 | $getanon3 = mysql_fetch_array($getanon2); | ||
103 | |||
104 | if ($getanon3['username'] == $getcomments3[$i]['username']) | ||
105 | { | ||
106 | $username = $getanon3['username'] . ' (Guest)'; | ||
107 | $website = $getanon3['website']; | ||
108 | } | ||
109 | } | ||
110 | |||
111 | |||
112 | $template->adds_block('COMMENTS', array( 'CODED' => $getpost3['slug'], | ||
113 | 'TITLE' => stripslashes($getpost3['title']), | ||
114 | 'AUTHOR' => (($website != '') ? '<A HREF="http://' . $website . '">' . $username . '</A>' : $username))); | ||
115 | $i++; | ||
116 | } | ||
117 | |||
118 | $getusers = "SELECT DISTINCT username FROM comments"; | ||
119 | $getusers2 = mysql_query($getusers); | ||
120 | $i=0; | ||
121 | while ($getusers3[$i] = mysql_fetch_array($getusers2)) | ||
122 | { | ||
123 | $getcount = "SELECT COUNT(*) FROM comments WHERE username = \"" . $getusers3[$i]['username'] . "\""; | ||
124 | $getcount2 = mysql_query($getcount); | ||
125 | $getcount3 = mysql_fetch_array($getcount2); | ||
126 | |||
127 | $getuser = "SELECT * FROM users WHERE username = \"" . $getusers3[$i]['username'] . "\""; | ||
128 | $getuser2 = mysql_query($getuser); | ||
129 | $getuser3 = mysql_fetch_array($getuser2); | ||
130 | |||
131 | if ($getuser3['username'] == $getusers3[$i]['username']) | ||
132 | { | ||
133 | $username = $getuser3['username']; | ||
134 | $website = $getuser3['website']; | ||
135 | } else { | ||
136 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $getusers3[$i]['username'] . "\""; | ||
137 | $getanon2 = mysql_query($getanon); | ||
138 | $getanon3 = mysql_fetch_array($getanon2); | ||
139 | |||
140 | if ($getanon3['username'] == $getusers3[$i]['username']) | ||
141 | { | ||
142 | $username = $getanon3['username'] . ' (Guest)'; | ||
143 | $website = $getanon3['website']; | ||
144 | } | ||
145 | } | ||
146 | |||
147 | $name = (($website != '') ? '<A HREF="http://' . $website . '">' . $username . '</A>' : $username); | ||
148 | $users[$name] = $getcount3[0]; | ||
149 | |||
150 | $i++; | ||
151 | } | ||
152 | |||
153 | arsort($users); | ||
154 | $i=0; | ||
155 | foreach ($users as $name => $count) | ||
156 | { | ||
157 | if ($i == 5) | ||
158 | { | ||
159 | break; | ||
160 | } | ||
161 | |||
162 | if ($name != 'Pingback') | ||
163 | { | ||
164 | $template->adds_block('TOP', array( 'USERNAME' => $name, | ||
165 | 'COUNT' => $count)); | ||
166 | $i++; | ||
167 | } | ||
168 | } | ||
169 | |||
170 | $gethits = "SELECT * FROM config WHERE name = \"hits\""; | ||
171 | $gethits2 = mysql_query($gethits); | ||
172 | $gethits3 = mysql_fetch_array($gethits2); | ||
173 | $template->add('HITS', $gethits3['value']); | ||
174 | |||
175 | $gethits = "SELECT * FROM config WHERE name = \"todayHits\""; | ||
176 | $gethits2 = mysql_query($gethits); | ||
177 | $gethits3 = mysql_fetch_array($gethits2); | ||
178 | $template->add('TODAY', $gethits3['value']); | ||
179 | |||
180 | $getpost = "SELECT * FROM phpbb_posts ORDER BY post_id DESC LIMIT 0,5"; | ||
181 | $getpost2 = mysql_query($getpost) or die($getpost); | ||
182 | $i=0; | ||
183 | while ($getpost3[$i] = mysql_fetch_array($getpost2)) | ||
184 | { | ||
185 | $getuser = "SELECT * FROM phpbb_users WHERE user_id = " . $getpost3[$i]['poster_id']; | ||
186 | $getuser2 = mysql_query($getuser) or die($getuser); | ||
187 | $getuser3 = mysql_fetch_array($getuser2); | ||
188 | |||
189 | $template->adds_block('FOURM', array( 'SUBJECT' => $getpost3[$i]['post_subject'], | ||
190 | 'TOPIC' => $getpost3[$i]['topic_id'], | ||
191 | 'POST' => $getpost3[$i]['post_id'], | ||
192 | 'USERNAME' => $getuser3['username'])); | ||
193 | } | ||
194 | } | ||
195 | |||
196 | $template->display(); | ||
197 | |||
198 | ?> | ||