";
print " | ";
print "";
if ($open = @opendir($home_directory.$path))
{
for($i=0;($directory = readdir($open)) != FALSE;$i++)
if (is_dir($home_directory.$path.$directory) && $directory != "." && $directory != ".." && !is_hidden_directory($home_directory.$path.$directory))
$directories[$i] = array($directory,$directory);
closedir($open);
if (isset($directories))
{
sort($directories);
reset($directories);
}
}
print "";
print "";
print " | ";
print " $StrFolderNameShort | ";
if ($AllowRename) print "$StrRenameShort | ";
if ($AllowDelete) print "$StrDeleteShort | ";
print " ";
print "";
print " | ";
print " . | ";
print " | ";
print " | ";
print " ";
print "";
print " | ";
print " .. | ";
print " | ";
print " | ";
print " ";
if (isset($directories)) foreach($directories as $directory)
{
print "";
print " | ";
print " ".htmlentities($directory[0])." | ";
if ($AllowRename) print " | ";
if ($AllowDelete) print " | ";
print " ";
}
print " | ";
print " ";
print " | ";
print " | ";
print "";
if ($open = @opendir($home_directory.$path))
{
for($i=0;($file = readdir($open)) != FALSE;$i++)
if (is_file($home_directory.$path.$file) && !is_hidden_file($home_directory.$path.$file))
{
$icon = get_icon($file);
$filesize = filesize($home_directory.$path.$file);
$permissions = decoct(fileperms($home_directory.$path.$file)%01000);
$modified = filemtime($home_directory.$path.$file);
$extension = "";
$files[$i] = array(
"icon" => $icon,
"filename" => $file,
"filesize" => $filesize,
"permissions" => $permissions,
"modified" => $modified,
"extension" => $extension,
);
}
closedir($open);
if (isset($files))
{
usort($files, "compare_filedata");
reset($files);
}
}
print "";
print "";
print " | ";
print " $StrFileNameShort | ";
print "$StrFileSizeShort | ";
print "$StrPermissionsShort | ";
print "$StrLastModifiedShort | ";
if ($AllowView) print "$StrViewShort | ";
if ($AllowEdit) print "$StrEditShort | ";
if ($AllowRename) print "$StrRenameShort | ";
if ($AllowDownload) print "$StrDownloadShort | ";
if ($AllowDelete) print "$StrDeleteShort | ";
print " ";
if (isset($files)) foreach($files as $file)
{
$file['filesize'] = get_better_filesize($file['filesize']);
$file['modified'] = date($ModifiedFormat, $file['modified']);
print "";
print " | ";
print " ".htmlentities($file['filename'])." | ";
print "".$file['filesize']." | ";
print "".$file['permissions']." | ";
print "".$file['modified']." | ";
if ($AllowView && is_viewable_file($file['filename'])) print " | ";
else if ($AllowView) print " | ";
if ($AllowEdit && is_editable_file($file['filename'])) print " | ";
else if ($AllowEdit) print " | ";
if ($AllowRename) print " | ";
if ($AllowDownload) print " | ";
if ($AllowEdit) print " | ";
print " ";
}
print " | ";
print " ";
print " | ";
print "
";
print "