Aktuelle Downloads bei Gross-Funk
Klicken Sie auf einen Link, um das entsprechende Dokument
in einem neuen Fenster zu öffnen.
function my_filesize($file)
{
// First check if the file exists.
if(!is_file("./".$file)) exit("File does not exist!");
// Setup some common file size measurements.
$kb = 1024; // Kilobyte
$mb = 1024 * $kb; // Megabyte
$gb = 1024 * $mb; // Gigabyte
$tb = 1024 * $gb; // Terabyte
// Get the file size in bytes.
$size = filesize($file);
/* If it's less than a kb we just return the size, otherwise we keep going until the size is in the appropriate measurement range. */
if($size < $kb)
{
return $size." B";
}
else if($size < $mb)
{
return round($size/$kb,2)." KB";
}
else if($size < $gb)
{
return round($size/$mb,2)." MB";
}
else if($size < $tb)
{
return round($size/$gb,2)." GB";
}
else
{
return round($size/$tb,2)." TB";
}
}
function getDirList ($dirname)
{
# rekursive Verzeichnisscan-Funktion
global $ebene;
$ebene++;
echo '
'; if ($ebene > 1) echo ' | '; if (is_dir($dirname."/".$entry)) { echo ' '.$entry.''; getDirList($dirname."/".$entry); } else { $filecnt = explode(".",$entry); $pic ='other'; if ($filecnt[1] == 'pdf') $pic = 'pdf'; if ($filecnt[1] == 'mp3') $pic = 'sound'; # $absfile = '/db2/down/'; $absfile = $dirname; if ($dirname != '') $absfile .= '/'; $absfile .= $entry; echo ' '.$entry.''; echo ' ('.my_filesize($absfile).')'; } echo ' |