download

Pliki do ściągnięcia

 

'AUDIO', 'wma'=>'AUDIO' ); if(file_exists($file_dir."".strtoupper($ext)."".$file_ext)!=0) $view_img=$file_dir."".strtoupper($ext)."".$file_ext; else{ if(array_key_exists($ext,$ext_img)) $view_img=$file_dir."".$ext_img[$ext]."".$file_ext; else $view_img=$plain_img; } return ""; } function file_link($dir,$file){ return "".ext_img(file_extension($dir."".$file),'zapisz plik')."".$file.""; } function file_extension($filename) { $path_info = pathinfo($filename); return $path_info['extension']; } function up_directory($start_dir,$first_dir){ $counter=0; $new_dir=''; $dirs=explode('/',urldecode($start_dir)); $f_dirs=explode('/',urldecode($first_dir)); $last_dir=count($dirs)-1; if(count($dirs)>count($f_dirs)){ foreach($dirs as $dir){ if($counter<(count($dirs)-2)) $new_dir.=$dir.'/'; $counter++; } } if($new_dir=='') $new_dir=$first_dir; return $new_dir; } // ###################### $catalog_img="/../system/themes/default/images/folderC.gif"; $counter=0; $dirArray=get_dir($start_dir); foreach($dirArray[0] as $catalog){ $in_dir=get_dir($start_dir."".$catalog); if(count($in_dir[0])>0 || count($in_dir[1])>0) { $table_body.=" ".$catalog."".str_replace('./tl_files/download/','./',iconv("cp1250","UTF-8",$catalog))." : ".count($in_dir[0])." | ".ext_img('PLAIN').": ".count($in_dir[1])." "; $counter++; } } foreach($dirArray[1] as $file){ $table_body.=" ".file_link(iconv( "cp1250","UTF-8",$start_dir),iconv( "cp1250","UTF-8",$file))." ".file_size($start_dir."/".$file)." "; $counter++; } if($start_dir!=$first_dir){ $table_body=" ".up_directory($start_dir,$first_dir)."".up_directory($start_dir,$first_dir)." ".$table_body; } echo "

".$table_body."
"; ?>