$navstr[0]
"; echo ' '; echo "
Download:


"; echo '
 
'; $i=0; $info=file("info4php.db"); $dirsize=0; $d=dir($ext_dir); while($entry=$d->read()) { if ($entry=="." || $entry=="..") continue; if (!ereg("test", $entry)) { $filesize=round(filesize($ext_dir.$entry)/1024, 2); $filedate = filemtime($ext_dir.$entry); $list[$i][3]=$filedate; $filedate = date("d.m.Y", $filedate); $entry = clear_str($entry); $list[$i][0]=$entry; $list[$i][1]=$filedate; $list[$i][2]=$filesize; $list[$i][3]=''; foreach ($info as $record) { if (ereg($entry, $record)) { $infoarr=split ('::', $record); $list[$i][3]=$infoarr[1]; $list[$i][1]=$infoarr[2]; break; } } $dirsize += $filesize; $i++; } } array_qsort ($list, 1, SORT_DESC); $lastdate=$list[0][1]; // $lastdate="29.06.2005"; array_qsort ($list, 0, SORT_ASC); foreach ($list as $record) { $entry=$record[0]; $filedate=$record[1]; $filesize=$record[2]; $descr=$record[3]; if ($filesize>1000): $filesize=round($filesize/1024,2); $filesize=$filesize." Mb"; else: $filesize=$filesize." kb"; endif; $cmnts=$entry; if (file_exists($cmnts.".db")): { $f = file ($cmnts.".db"); $n = sizeof($f);} else: { $n = 0; } endif; $lastdate=clear_str($lastdate); $filedate=clear_str($filedate); if ($lastdate==$filedate): {$filedate="uploaded: $filedate";} else: {$filedate="uploaded: $filedate";} endif; echo"
$entry
$filesize
$descr

"; echo '
 
'; } $dirsize=round($dirsize/1024,2); echo"
files: $i; total size: $dirsize Μα. 


"; echo ""; require("../bottom.php"); ########################################## function array_qsort (&$array, $column=0, $order=SORT_ASC, $first=0, $last= -2) { // $array - the array to be sorted // $column - index (column) on which to sort // can be a string if using an associative array // $order - SORT_ASC (default) for ascending or SORT_DESC for descending // $first - start index (row) for partial array sort // $last - stop index (row) for partial array sort if($last == -2) $last = count($array) - 1; if($last > $first) { $alpha = $first; $omega = $last; $guess = $array[$alpha][$column]; while($omega >= $alpha) { if($order == SORT_ASC) { while($array[$alpha][$column] < $guess) $alpha++; while($array[$omega][$column] > $guess) $omega--; } else { while($array[$alpha][$column] > $guess) $alpha++; while($array[$omega][$column] < $guess) $omega--; } if($alpha > $omega) break; $temporary = $array[$alpha]; $array[$alpha++] = $array[$omega]; $array[$omega--] = $temporary; } array_qsort ($array, $column, $order, $first, $omega); array_qsort ($array, $column, $order, $alpha, $last); } } ######################### function clear_str($info) { $info = ereg_replace("\n", "", $info); $info = ereg_replace("\r", "", $info); $info = trim($info); return $info; } function GetNavStr($basedir) { $pathlist = split ('/', substr($basedir,0,strlen($basedir)-1)); $path=''; $navstr=''; foreach ($pathlist as $no => $level) { $path.=$level."/"; $filename=$path."label"; if (file_exists ($filename)): $f = file ($filename); else: $f[0]=".."; endif; $pathid=$f[0]; $navstr = " » $pathid ".$navstr; } if (file_exists ("label")): $f = file ("label"); else: $f[0]=""; endif; $pathid=$f[0]; $navstr .= " » $pathid"; $navstr = substr($navstr, 8); $returnresult[0]="$navstr"; $returnresult[1]="$pathid"; return $returnresult; } ?>