Location: PHPKode > projects > PHPExplorer > modules/pub/index.php
<?

require_once("include.php");

$total=0;

if($mkdir){
 mkdir($anonymous.$dir.$mkdir,0777);
 die("<html><script>alert('Le dossier \"$mkdir\" a été créé');window.location.href='$PHP_SELF?dir=$dir';</script></html>");
}

/*  Partie principale : affichage de la liste  */
require_once("$instp/skins/$sk/pub/_m_head.php");

$z=opendir($anonymous.$dir); $dirs=Array(); $files=Array();
if($z){ $nid="0";
while($d=readdir($z)){$nid++;
if(@is_dir($anonymous.$dir.$d)==true){
if($d!="."&&$d!=".."){ $dirs[]=str_replace("\\'","'",$d);}}else{
$files[]=str_replace("\\'","'",$d);}} sort($files); sort($dirs);
if(count($files)==0&&count($dirs)==0){
 require("$instp/skins/$sk/pub/_m_list_empty.php");
}
for($i=0,$d=$dirs[0];$dirs[$i];$i++,$d=$dirs[$i])
 require("$instp/skins/$sk/pub/_m_list_dirs.php"); 
for($i=0,$d=$files[0];$files[$i];$i++,$d=$files[$i]){
$fs=filesize($anonymous.$dir.$d); $unit="Oct"; $total=$total+$fs;
if($fs>1000){$fs=substr($fs/1000,0,5);$unit="Ko";}
if($fs>1000){$fs=substr($fs/1000,0,5);$unit="Mo";}
if($fs>1000){$fs=substr($fs/1000,0,5);$unit="Go";}
 include("$instp/skins/$sk/pub/_m_list_files.php");
}}
if($total>1000){$total=intval($total/1000);$unit="Ko";}
if($total>1000){$total=intval($total/1000);$unit="Mo";}
if($total>0){include("$instp/skins/$sk/pub/_m_dirsize.php"); }
include("$instp/skins/$sk/pub/_m_footers.php");
?>
Return current item: PHPExplorer