$dir = "../../../";
$body='
';
/*
*********** DO NOT MODIFY BELOW THIS LINE ************
*/
function dirHeader() {
$content = "";
return $content;
}
function dirTable() {
$content = "Type |
Indexes |
Size |
";
return $content;
}
function dirFooter() {
$content = "
";
return $content;
}
function fType($file) {
$varFileType = filetype($file);
if($varFileType != "dir") {
$curdir = getcwd();
$pInfo = pathinfo("$curdir/$file");
$varFileType = $pInfo["extension"];
}
return $varFileType;
}
function fileView($file) {
$varType = strtolower(fType($file));
$varJSSettings = "width=300,height=300,resizable=1,scrollbars=1,menubar=0,status=0,titlebar=0,toolbar=0,hotkeys=0,locationbar=0"; $txtArray[] = "txt"; $txtArray[] = "nfo"; $txtArray[] = "diz"; $txtArray[] = "now";
$txtArray[] = "bmp";
$txtArray[] = "jpg";
$txtArray[] = "gif";
$txtArray[] = "doc";
$txtArray[] = "1st";
$txtArray[] = "now";
$txtArray[] = "me";
if(in_array($varType, $txtArray))
return $content;
}
function display_size($file_size){
if($file_size >= 1073741824) {
$file_size = round($file_size / 1073741824 * 100) / 100 . "g"; } elseif($file_size >= 1048576) {
$file_size = round($file_size / 1048576 * 100) / 100 . "m"; } elseif($file_size >= 1024) {
$file_size = round($file_size / 1024 * 100) / 100 . "k"; } else {
$file_size = $file_size . "b";
}
return $file_size;
}
//FORK
function dirGather() {
$handle=opendir(".");
$content = "";
//while (false!=($file = readdir($handle))) {
while ($file = readdir($handle)) {
if(($file != "index.txt") && ($file != "index.php")) { $filetype = fType($file);
if($filetype == "dir") {
$dirtext[] = "$file";
} else {
$context[] = "$file";
}
}
}
if($dirtext) {
sort($dirtext);
for($i=0; $i$file$viewfile";
$content .= "$filesize | "; }
}
if($context) {
sort($context);
for($i=0; $i$file $viewfile";
$content .= "$filesize | "; $content .= "$changeddate | ";
}
}
return $content;
}
function diskStats($scriptStats) {
if($scriptStats) {
// $diskTotal = display_size(disk_total_space("/"));
$diskFree = display_size(diskfreespace("/"));
$content = "";
$content .= "Free Disk Space: | $diskFree |
";
// $content .= "Total Disk Space: | $diskFree |
"; $content .= "
"; print($content);
}
}
?>
ICED IMAGES
print($body);
?>
diskStats($scriptStats);
print(dirHeader());
print(dirTable());
print(dirGather());
print(dirTable());
print(dirFooter());
diskStats($scriptStats);
@include("index.txt");
?>