/*Vypisuje obsah adresare, existuje-li podadresar '_manage', vola uploadovaci a deletovaci funkce
vyzaduje includes:
dirreader_functions.php
dirreader_header.php
v adr. '_manage': delete.php
upload.php
*/?>
$include_glob_path = '/var/www/czmssa.cz/html/_includes/' ?>
$include_path = $include_glob_path ?>
INCLUDE $include_glob_path."dirreader_functions.php" ?>
INCLUDE $include_path."dirreader_header.php" ?>
$area = ".";
$manage = 0;
?>
function compare ($a, $b)
{
global $sort_by, $sort_order;
if (!isset($sort_by)) $sort_by = 0;
if (!isset($sort_order)) $sort_order = "<";
if ($a[$sort_by] == $b[$sort_by]) return 0;
if($sort_order==">") return($a[$sort_by] > $b[$sort_by]) ? -1:1;
else return ($a[$sort_by] < $b[$sort_by]) ? -1:1;
}
function make_date($time){return date("d.m.Y, H:i",$time);}
global $style, $files;
$handle=opendir($area);
while (false!==($file = readdir($handle)))
{
if (is_permited_file($file)==0)
{
list ($file_name, $file_extension) = split_file_name($file);
if (!is_file($file))
{
$file.="/";
$file_extension = "DIR";
}
$files[]=array($file,filemtime($file),filesize($file),$file_name,$file_extension);
}
}
closedir($handle);
if (!empty($files)) usort ($files, "compare");
if ($manage == 1)
{
?>
}# end of if (!empty($manage))?>
|
CZMSSA |
  echo substr((strrchr(getcwd(),"/")),1); ?> |
|
|
|
if ($manage == 1)
{
?>
Upload file |
}# end of if (!empty($manage))?>
|
if (sizeof($files) == 0) echo ' | No files ... | ';
else
{
?>
if($sort_by==0)echo''.$sort_order.$sort_order; ?>
":"<" ?>">FILE NAME |
|
if($sort_by==1)echo''.$sort_order.$sort_order; ?>
":"<" ?>">DATE,time |
|
if($sort_by==2)echo''.$sort_order.$sort_order; ?>
":"<" ?>">SIZE |
|
if($sort_by==4)echo''.$sort_order.$sort_order; ?>
":"<" ?>">Type |
|
|
|
}
if (!empty($files))foreach($files as $row)
{
$style = select_file_type($row[4]);
echo '
'.$row[3].' |
|
'.make_date($row[1]).' |
|
'.make_file_size($row[2]).' |
|
'.$row[4].' |
';
}
?>
|
|
|
|
|
|