header("Content-Type: application/xhtml+xml"); ?>
print("Index of $SCRIPT_URL\n"); ?>
| Name | Last modified | Size |
if ($dh = opendir('.')) {
while (($file = readdir($dh)) !== false) {
if ($file != '.' && $file != 'autoindex.php' && $file != 'index.php' && is_readable($file) ) {
#list($size,$mtime) = (stat($file))[7,9];
if ((list($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($file)) !== false) {
#list($mday,$mon,$year) = (localtime($mtime))[3,4,5];
list ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($mtime);
$mtime = sprintf("%d-%02d-%02d",$year+1900,$mon,$mday);
$kb = &round($size / 1024);
$mb = &round($size / 1024 / 1024);
$gb = &round($size / 1024 / 1024);
if ($kb >= 1) {
$size = $kb;
$unit = 'kB';
if ($mb >= 1) {
$size = $mb;
$unit = 'mB';
if ($gb >= 1) {
$size = $gb;
$unit = 'gB';
}
}
} else {
$unit = 'B';
}
print("| $file | $mtime | $size | $unit |
\n");
}
}
}
closedir($dh);
} else {
print("Failed to opendir .\n");
}
print "
Return to Darxus' Home Page. \n";
?>