"; echo "  ..\n"; echo "   "; echo ""; } $i = 0; while(list($item,) = each($list)){ if( $item == 'index.html') { continue; } $abs_item=get_abs_item($dir,$item); $is_writable = is_writable( $abs_item ); $is_chmodable = $GLOBALS['ext_File']->is_chmodable( $abs_item ); $is_readable = is_readable( $abs_item ); $is_deletable = $GLOBALS['ext_File']->is_deletable( $abs_item ); $file_info = @stat( $abs_item ); $is_file = false; //if(is_link($abs_item)) $extra=" -> ".@readlink($abs_item); if(@is_dir($abs_item)) { $link = ext_make_link("list",get_rel_item($dir, $item),NULL); } else { //if(get_is_editable($dir,$item) || get_is_image($dir,$item)) { $link = ext_make_link("download",$dir,$item); $is_file = true; } //else $link = ""; $class = $i % 2 ? 'sectiontableentry1' : 'sectiontableentry2'; //echo "" echo ''; // Icon + Link echo ""; if($is_readable) { echo ""; } //else echo ""; echo "\"\" "; $s_item=$item; if(strlen($s_item)>50) $s_item=substr($s_item,0,47)."..."; $s_item = htmlspecialchars($s_item); if( !$is_file ) { echo ''.$s_item.''; } else { echo $s_item; } if( $is_readable ) { echo ""; // ...$extra... } echo "\n"; // Size echo "".parse_file_size(get_file_size($abs_item))."\n"; // type echo "".get_mime_type($abs_item, "type")."\n"; // modified echo "".parse_file_date(get_file_date($abs_item))."\n"; // actions echo "\n"; $i++; } } //------------------------------------------------------------------------------ // MAIN FUNCTION function list_dir($dir) { // list directory contents global $dir_up, $mosConfig_live_site, $_VERSION; $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))) ext_Result::sendResult('', false, $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); $dirs = explode( "/", $dir ); $implode = ""; $dir_links = ".. / "; foreach( $dirs as $directory ) { if( $directory != "" ) { $implode .= $directory."/"; $dir_links .= "$directory / "; } } echo '
'.$GLOBALS["messages"]["actdir"].": ".$dir_links.'
'; // Sorting of items $images = " \"^\""; } else { $_srt = "ASC"; $images .= "_arrowdown.gif\" alt=\"v\">"; } // Toolbar /*echo "
\n"; // Create File / Dir if($allow && is_writable($GLOBALS['home_dir'].'/'.$dir)) { echo "\n"; } echo "
\n"; // PARENT DIR echo "\n"; // HOME DIR echo "\n"; // RELOAD echo "\n"; // SEARCH echo "\n"; echo ""; // Joomla Sysinfo echo "\n"; echo ""; if($allow) { // COPY echo "\n"; // MOVE echo "\n"; // DELETE echo "\n"; // CHMOD echo "\n"; // UPLOAD if(ini_get("file_uploads")) { echo "\n"; } else { echo "\n"; } // ARCHIVE if($GLOBALS["zip"] || $GLOBALS["tar"] || $GLOBALS["tgz"]) { echo "\n"; } } else { // COPY echo "\n"; // MOVE echo "\n"; // DELETE echo "\n"; // UPLOAD echo "\n"; } // ADMIN & LOGOUT if($GLOBALS["require_login"]) { echo ""; // ADMIN if($admin) { echo "\n"; } // LOGOUT echo "\n"; } // Logo echo "\n"; echo "
"; if( $dir != "" ) { echo ""; echo ""; } echo ""; echo "\"".$GLOBALS["messages"]["reloadlink"];"; echo "\"|\""; echo "\"|\"\"".$GLOBALS["messages"]["copylink"];\"".$GLOBALS["messages"]["movelink"];\"".$GLOBALS["messages"]["dellink"];\"chmod\""; echo "\"".$GLOBALS["messages"]["uploadlink"];\"".$GLOBALS["messages"]["uploadlink"];\"".$GLOBALS["messages"]["comprlink"];\"".$GLOBALS["messages"]["copylink"]."\"\"".$GLOBALS["messages"]["movelink"]."\"\"".$GLOBALS["messages"]["dellink"]."\"\"".$GLOBALS["messages"]["uplink"];::"; echo "\"".$GLOBALS["messages"]["adminlink"]."\""; echo "\"".$GLOBALS["messages"]["logoutlink"]."\""; //echo "
"; echo "\"""; //echo "
"; echo "
\n
"; echo "\n"; echo ""; echo "
\n"; */ // End Toolbar // Begin Table + Form for checkboxes echo"\n"; echo "\n\n\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 ""; echo "\n
\n"; if($GLOBALS["order"]=="name") $new_srt = $_srt; else $new_srt = "yes"; echo "".$GLOBALS["messages"]["nameheader"]; if($GLOBALS["order"]=="name") echo $images; echo "\n"; if($GLOBALS["order"]=="size") $new_srt = $_srt; else $new_srt = "yes"; echo "".$GLOBALS["messages"]["sizeheader"]; if($GLOBALS["order"]=="size") echo $images; echo ""; if($GLOBALS["order"]=="type") $new_srt = $_srt; else $new_srt = "yes"; echo "".$GLOBALS["messages"]["typeheader"]; if($GLOBALS["order"]=="type") echo $images; echo ""; if($GLOBALS["order"]=="mod") $new_srt = $_srt; else $new_srt = "yes"; echo "".$GLOBALS["messages"]["modifheader"]; if($GLOBALS["order"]=="mod") echo $images; echo "

 ".$num_items." ".$GLOBALS["messages"]["miscitems"]." ".parse_file_size($tot_file_size)."  

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