-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
341 lines (255 loc) · 8.55 KB
/
footer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<?php
// = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
// TextfileBB
// Website: http://tfbb.jcink.com
//
// Modify freely, as long as you're not turning the forum
// into a board service of any form. Please ask for permission
// first to redistribute any of the TextfileBB code.
//
// Thanks.
//
// ----------------------------------------------------------------------------------------
// Module: footer.php - Last update: Feb 21, 2007
// Santized and Dereglobed: OK
// ----------------------------------------------------------------------------------------
//
// You can add your copyright to your site and such below, or above
// mine if you like. Just do not remove mine.
//
// = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
// Here, we discover what location they're at.
// It explodes the php file
// and just gets the name
$explosion = explode(".php", $_SERVER['PHP_SELF']);
$kerboom = explode("/", $explosion[0]);
$howmuchexploded = count($kerboom);
$Location = $kerboom[$howmuchexploded-1];
if (isset($_COOKIE['storedcookie_textfileBB_id'])) {
$register_id = file("./id_data/member_names_num.txt");
$result = array_search_ci($register_id, $_COOKIE['storedcookie_textfileBB_id']);
$get = rtrim($register_id[$result]);
$username = rtrim($get);
} else {
$register_id = file("./id_data/member_names_num.txt");
$username = "";
}
if (isset($_COOKIE['storedcookie_textfileBB_id'])) {
$fnew_s=fopen("./sessionsfolder/$get.php", "w");
if ($Location == online) {
fwrite($fnew_s, "Viewing Online List");
}
if ($Location == inbox) {
fwrite($fnew_s, "Using Inbox... ");
}
if ($Location == edit_post) {
fwrite($fnew_s, "Editing a post...");
}
if ($Location == register) {
fwrite($fnew_s, "Registering...");
}
if ($Location == forgotpass) {
fwrite($fnew_s, "Recovering password...");
}
if ($Location == profile) {
fwrite($fnew_s, "Updating profile..." );
}
if ($Location == login) {
fwrite($fnew_s, "Logging in..." );
}
if ($Location == mail) {
fwrite($fnew_s, "Using Inbox... » Composing Message" );
}
if ($Location == viewprofile) {
fwrite($fnew_s, "Viewing Member's Profile" );
}
if ($Location == admincp) {
fwrite($fnew_s, "Using Admin CP..." );
}
if ($Location == topicdisplay) {
fwrite($fnew_s, "Viewing forum" );
}
if ($Location == viewtopic) {
fwrite($fnew_s, "Viewing topic" );
}
if ($Location == new_topic) {
fwrite($fnew_s, "» Creating New Topic... " );
}
if ($Location == add_reply) {
fwrite($fnew_s, "» Replying..." );
}
if ($Location == index) {
fwrite($fnew_s, "Viewing Board Index" );
}
if ($Location == search) {
fwrite($fnew_s, "Searching..." );
}
fwrite($fnew_s, "\n<?php die(); ?>" );
fwrite($fnew_s, "\n$_SERVER[REMOTE_ADDR]\n$result" );
}
$olist=0;
$dir = "./sessionsfolder/";
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if ($file != ".." && $file != ".") {
$FileTime=explode(".", filemtime("./sessionsfolder/$file")/60);
$TimeNow = explode(".", time()/60);
$HowManyMinutes=$TimeNow[0]-$FileTime[0];
if($HowManyMinutes > 15) { unlink("./sessionsfolder/$file"); } else {
$onlinedata=file("./sessionsfolder/$file");
$file=explode(".", $file);
$lowerrr=strtolower($file[0]);
if (file_exists("./accounts/{$lowerrr}_user.php")) {
require("./accounts/{$lowerrr}_user.php");
require("./groups/{$status}.php");
} else {
@unlink("./sessionsfolder/{$file[0]}.php");
}
$storedonlinelist.="$online_prefix <a href='viewprofile.php?showuser=$onlinedata[3]' title='$onlinedata[0]'>$file[0]</a> $online_suffix";
$olist++;
}
}
}
closedir($dh);
}
}
?>
<?php
if ($Location == index) {
echo "<br><div align='center'><div class='tableborder'><table width=100% cellpadding='5' cellspacing='1'><tr><td class=headertableblock colspan=9><b><font size=-5>Forum Stats</font></b></td></tr>
<td width=2% align=center class=arcade1><font size=-5></font></td>
<td width=50% align=center class=arcade1></td>";
echo "<tr><td class=arcade1>$online_marker</td><td class=arcade1>";
?>
<?php echo $olist; ?> users have visited in the last 15 Minutes:
<?php
if ($olist != 0 ) {
$s9 = "./sessionsfolder/";
$handle9 = opendir($s9);
while ( $topic9 = readdir($handle9 ))
{
if( $topic9 == '.' || $topic9 == '..' || $topic9 == '.php' )
continue;
if (preg_match("/\.(php|xml)$/", $topic9)){
$forumtopiclist9 [$topic9] = filemtime($s9."/".$topic9);
}
}
// use arsort to show them by last modified date
// arsort also lets us have "bumped" topics because it doesnt go by creation but last modified.
// so when a topic is replied to, it gets bumped to the top because then it's "modified"
// get it?
@arsort($forumtopiclist9);
while(list($t9)=@each($forumtopiclist9))
{
// strip the .txt off the end of the topics.
$thetopic9 = "$t9";
$topicstrip9 = strrpos($thetopic9, '.');
$topictitle9 = substr($thetopic9, 0, $topicstrip9);
if (file_exists("./sessionsfolder/{$topictitle9}.php")) {
$member_id_number = array_search_ci($register_id, "$topictitle9");
$lowerplz = strtolower($topictitle9);
if (file_exists("./accounts/{$lowerplz}_user.php")) {
require("./accounts/{$lowerplz}_user.php");
} else {
@unlink("./sessionsfolder/{$topictitle9}.php");
}
require("./groups/{$status}.php");
if ($Location == index) {
echo "<a href='viewprofile.php?showuser=$member_id_number'><u>$online_prefix".$topictitle9."$online_suffix</u></a> ";
}
}
}
}
if ($Location == index) {
echo " <a href='online.php' title='Details'>[+]</a>";
echo "</td></tr>";
echo "<tr><td class=arcade1>$birthday_marker</td><td class=arcade1>";
//Attempt to bring up peoples birthdays... I have a feeling that this will be slow when a good number of accounts
//are signed up, but we'll see
echo "Today's Birthdays: ";
$c = 0;
$s = "./accounts/";
$handle = opendir($s);
while ( $topic = readdir($handle ))
{
if( $topic == '.' || $topic == '..' )
continue;
$forumtopiclist [$topic] = filemtime($s."/".$topic);
}
arsort($forumtopiclist);
while(list($t)=each($forumtopiclist))
{
$thetopic = "$t";
$topicstrip = strrpos($thetopic, '.');
$topictitle = substr($thetopic, 0, $topicstrip);
if ($topictitle == "" || $topictitle == "guest_user") {
echo "";
} else {
$username = explode("_user", $topictitle);
$member_txt_file = file("./id_data/member_names_num.txt");
$getkey = array_search_ci($member_txt_file, "$username[0]");
require("./accounts/{$username[0]}_user.php");
$birthdaydata = explode(".", $birthday);
$md = $birthdaydata[0].$birthdaydata[1];
$date = date("m.d.y");
$thedatedata = explode(".", $date);
$md_date = $thedatedata[0].$thedatedata[1];
if ($md == $md_date) {
$yearborn = "19"."$birthdaydata[2]";
$yeartoday= "20"."$thedatedata[2]";
$howold = $yeartoday-$yearborn;
$c++;
echo "$member_txt_file[$getkey] - ( <b>$howold</b> ) ";
}
}
}
if ($c == 0) {
echo "No members are celebrating a birthday today";
/*
[00:15] jcinker: And a fresh install is a-ok for me
[00:15] bluerush123: Wait
[00:15] bluerush123: lol
[00:15] bluerush123: Bitday*
[00:15] bluerush123: bithday*
[00:15] bluerush123: X
[00:15] bluerush123: you forgot the r
[00:15] jcinker: <_>
[00:15] jcinker: oops
*/
}
// end birthdays
echo "</td></tr>";
echo "<tr><td class=arcade1>$stats_marker</td><td class=arcade1>";
$thefinal = $top_p+$rep_p;
?>
<div align=Left>
Our members have posted: <?php echo "<b>$thefinal</b>"; ?> posts.<br>
We have <?
$countstuff = opendir("./accounts/");
$members = 0;
while($file = readdir($countstuff)){
if($file != '.' && $file != '..'){
$members++;
}
}
closedir($countstuff);
$dividerealfast = $members/3-1;
echo "<b>$dividerealfast</b> registered members";
// find out who is the latest registered user
$members2 = file("./id_data/member_names_num.txt");
$total_user = count($members2);
echo "<br>Our newest registered user is: ";
$we = $total_user-1;
if(trim($members2[$we])=="Guest") {
$we=$we-1;
}
echo "<a href='viewprofile.php?showuser=$we'> $members2[$we] </a>";
echo "</td></tr>";
echo "</tr></table></div><br>";
}
}
?>
<br>
<div align='center'><?php readfile("footer.html");?></div><br>
<div align=center><font size=-5>[ Powered By <a href="http://tfbb.jcink.com">TextfileBB</a> v1.0.19 © 2005 <a href=http://jcink.com>Jcink.com</a> ]</font></div>