You are now logged out.

"; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $entries=opendir("$postdir"); // Load files into an array $files = array(); $replies = array(); $tmpfiles = array(); while ($file = readdir($entries)) { $tmpFiles[] = $file; } rsort($tmpFiles); foreach ($tmpFiles as $file) { if ($file != "." && $file != "..") { if (strstr($file, '-') != false) { list ($rdate, $parent) = explode('-', $file); if (!in_array($parent, array_keys($replies))) { $replies[$parent] = 1; } else { $replies[$parent]++; } if (!in_array($parent, $files)) { $files[] = $parent; } } else { if (!in_array($file, array_keys($replies))) { $replies[$file] = 0; } if (!in_array($file, $files)) { $files[] = $file; } } } } $threads = count($files); if ($page == "1") { $min = "0"; } else { $p = $page - 1; $min = ($p * $split) - $p; } $max = $page * $split; $t_count = $min + 1; // echo "Page $page
Min: $min
Max: $max
Starting t_count: $t_count"; for (reset ($files); list ($key, $value) = each ($files); ) { if ($t_count <= $max && $t_count <= $threads) { while ($key >= $min) { if ($key % 2 != 1) { echo ""; } else { echo ""; } $modify = $value; $msg = array(); $msg = file("$postdir/$value"); $msg[] = $value; for (reset ($msg); list ($key, $value) = each ($msg); ) { if ($key == "0") { /* Title */ $value = addslashes($value); echo "\n"; echo "\n"; } } for (reset ($msg); list ($key, $value) = each ($msg); ) { if ($key == "3") { /* Date */ echo "\n"; } } for (reset ($msg); list ($key, $value) = each ($msg); ) { if ($key == "1") { /* Author */ echo "\n"; } } $t_count++; } } } echo ""; echo "
$registered registered users.
$posts total posts in $totalthreads topics.

Threads sorted by order of activity.
  Topic:  Replies:  Posted On:  Author:
  $value   $replies[$modify]  $value  $value
"; echo "
Page: "; for ($i = 1; $i <= ceil($threads / $split); $i++) { echo "$i "; } echo "
"; // echo "Final t_count: $t_count"; // Finish things off closedir($entries); break; } ?>