= 393216) { PackLog($realpath, $infile); } return 0; } function ListSort($a, $b) { $fn = substr($GLOBALS['realpath'], 4).'.'; $atime = str_replace('.log', '', str_replace('.gz', '', str_replace($fn, '', $a))); $btime = str_replace('.log', '', str_replace('.gz', '', str_replace($fn, '', $b))); if ($atime == $btime) return 0; return ($atime > $btime) ? -1 : 1; } function ListLogs() { global $logblock; $realpath = substr($GLOBALS['realpath'], 4); $fn = "$realpath."; $handle=opendir('../../logs'); while ($file = readdir($handle)) { if (preg_match("/^{$realpath}\./", $file)) { $midir[count($midir)] = $file; } } closedir($handle); if ($midir) usort($midir, 'ListSort'); echo "
Expect a 8:1 ratio on sizes, so a file of 128 KB in size is really 1 MB when you open it.\n"; } function DisplayLog($time) { global $logblock, $master_zlib; $realpath = substr($GLOBALS['realpath'], 4); if ($master_zlib == 0) $fn = "../../logs/$realpath.".$time.".log"; else $fn = "../../logs/$realpath.".$time.".gz"; if ($time == "current") { readfile("../complete.log"); return 1; } else if (file_exists($fn)) { if ($master_zlib == 0) readfile($fn); else readgzfile($fn); return 1; } else echo "The log $fn was not found."; return 0; } ?>\n"; echo "
\n"; //echo " Date Packed size (KB) \n"; for ($cc=0;$cc Current log ".ceil(filesize("../complete.log")/1024)."
(not packed)$dname $fs \n"; } echo "
\n"; echo "