".@readlink($abs_item);
if(is_dir($abs_item)) {
$link = make_link("list",get_rel_item($dir, $item),NULL);
} else { //if(get_is_editable($dir,$item) || get_is_image($dir,$item)) {
$link = make_link("download",$dir,$item);
$target = "_blank";
} //else $link = "";
echo "
\n";
// Icon + Link
echo "";
/*if($link!="") */ echo"";
//else echo "";
echo " ";
$s_item=$item; if(strlen($s_item)>50) $s_item=substr($s_item,0,47)."...";
echo htmlspecialchars($s_item)." | \n"; // ...$extra...
// Size
echo "".parse_file_size(get_file_size($dir,$item))." | \n";
// Type
echo "".get_mime_type($dir, $item, "type")." | \n";
// Modified
echo "".parse_file_date(get_file_date($dir,$item))." | \n";
// Permissions
// echo "";
// echo parse_file_type($dir,$item).parse_file_perms(get_file_perms($dir,$item));
// if($allow) echo "";
// echo " | \n";
// Actions
echo "\n\n";
// DOWNLOAD
if(get_is_file($dir,$item)) {
if($allow) {
echo "";
echo " | \n";
} else if(!$allow) {
echo " | \n";
}
} else {
echo " | \n";
}
echo " \n |
\n";
}
}
//------------------------------------------------------------------------------
// MAIN FUNCTION
function list_dir($dir) { // list directory contents
$allow=($GLOBALS["permissions"]&01)==01;
$admin=((($GLOBALS["permissions"]&04)==04) || (($GLOBALS["permissions"]&02)==02));
$dir_up = dirname($dir);
if($dir_up==".") $dir_up = "";
if(!get_show_item($dir_up,basename($dir))) show_error($dir." : ".$GLOBALS["error_msg"]["accessdir"]);
// make file & dir tables, & get total filesize & number of items
make_tables($dir, $dir_list, $file_list, $tot_file_size, $num_items);
$s_dir=$dir; if(strlen($s_dir)>50) $s_dir="...".substr($s_dir,-47);
echo "Directory: /".get_rel_item("",$s_dir);
// Javascript functions:
include $_SERVER["DOCUMENT_ROOT"]."/Modules/Downloads/include/javascript.php";
// Toolbar
echo "
\n";
// PARENT DIR
echo "";
echo " | \n";
// HOME DIR
echo "";
echo " | \n";
// RELOAD
echo " | \n";
echo "
| \n";
echo "
\n";
// End Toolbar
// Begin Table + Form for checkboxes
echo"\n";
}
//------------------------------------------------------------------------------
?>