Data Download
|
|
|
read()) {
if (($entry != '.') and (substr($entry, -4) != '.php') and (substr($entry, -5) != '.html')) {
if (is_dir($entry)) {
if (($entry != '..') or $show_dotdirs){
$dirs[] = $entry;
}
} else {
$files[] = $entry;
}
}
}
$dir->close();
sort($dirs);
$counter=1;
foreach ($dirs as $dir) {
$entriesperline=3;
if($counter%$entriesperline==2)
{
printf('<%s> | ' . "", $dir, $dir);
}
else if($counter%$entriesperline==1)
{
printf('<%s> | ' . "", $dir, $dir);
}
else if($counter%$entriesperline==0)
{
printf('<%s>
|
' . "\n", $dir, $dir);
}
$counter++;
}
sort($files);
foreach ($files as $file) {
$entriesperline=3;
$a = fopen($file, 'r');
fseek($a, 0, SEEK_END);
$size = ftell($a);
fclose($a);
if($counter%$entriesperline==2)
{
printf('%s (%01.2fMB) | ' . "", $file, $file, $size/1048576);
}
else if($counter%$entriesperline==1)
{
printf('%s (%01.2fMB) | ' . "", $file, $file, $size/1048576);
}
else if($counter%$entriesperline==0)
{
printf('%s (%01.2fMB)
|
' . "\n", $file, $file, $size/1048576);
}
$counter++;
}
if($counter%$entriesperline==0)
{
printf(' | ');
}
else if($counter%$entriesperline==2)
{
printf(' | | ');
}
?>