".@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 "\n"; } else if(!$allow) { echo "\n"; } } else { echo "\n"; } echo "
"; echo "\"".$GLOBALS["messages"]["downlink"];\"".$GLOBALS["messages"]["downlink"];\"\"
\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"; echo "
\n"; // PARENT DIR echo "\n"; // HOME DIR echo "\n"; // RELOAD echo "\n"; echo "
"; echo ""; echo "\"".$GLOBALS["messages"]["reloadlink"];
\n"; // End Toolbar // Begin Table + Form for checkboxes echo"\n"; // Table Header echo "\n"; echo "\n\n\n\n"; echo "\n"; echo "\n"; // make & print Table using lists print_table($dir, make_list($dir_list, $file_list), $allow); // print number of items & total filesize echo "\n"; echo "\n"; echo "\n"; for($i=0;$i<3;++$i) echo""; echo "\n

\n"; echo $GLOBALS["messages"]["nameheader"]; echo ""; echo $GLOBALS["messages"]["sizeheader"]; echo ""; echo $GLOBALS["messages"]["typeheader"]; echo ""; echo $GLOBALS["messages"]["modifheader"]; echo "".$GLOBALS["messages"]["actionheader"]."


".$num_items." ".$GLOBALS["messages"]["miscitems"]." ("; if(function_exists("disk_free_space")) { $free=parse_file_size(disk_free_space(get_abs_dir($dir))); } elseif(function_exists("diskfreespace")) { $free=parse_file_size(diskfreespace(get_abs_dir($dir))); } else $free="?"; // echo "Total: ".parse_file_size(disk_total_space(get_abs_dir($dir))).", "; echo $GLOBALS["messages"]["miscfree"].": ".$free.")".parse_file_size($tot_file_size)."

\n"; } //------------------------------------------------------------------------------ ?>