"); fclose($fp); } else {exit;} } function taille($fichier) { global $size_unit; $taille=filesize($fichier); if ($taille >= 1073741824) {$taille = round($taille / 1073741824 * 100) / 100 . " G".$size_unit;} elseif ($taille >= 1048576) {$taille = round($taille / 1048576 * 100) / 100 . " M".$size_unit;} elseif ($taille >= 1024) {$taille = round($taille / 1024 * 100) / 100 . " K".$size_unit;} else {$taille = $taille . " ".$size_unit;} if($taille==0) {$taille="-";} return $taille; } function date_modif($fichier) { $tmp = filemtime($fichier); return date("d/m/Y H:i",$tmp); } function mimetype($fichier,$quoi) { global $mess,$HTTP_USER_AGENT; if(!eregi("MSIE",$HTTP_USER_AGENT)) {$client="netscape.gif";} else {$client="html.gif";} if(is_dir($fichier)){$image="dossier.gif";$nom_type=$mess[8];} else if(eregi("\.mid$",$fichier)){$image="mid.gif";$nom_type=$mess[9];} else if(eregi("\.txt$",$fichier)){$image="txt.gif";$nom_type=$mess[10];} else if(eregi("\.sql$",$fichier)){$image="txt.gif";$nom_type=$mess[10];} else if(eregi("\.js$",$fichier)){$image="js.gif";$nom_type=$mess[11];} else if(eregi("\.gif$",$fichier)){$image="gif.gif";$nom_type=$mess[12];} else if(eregi("\.jpg$",$fichier)){$image="jpg.gif";$nom_type=$mess[13];} else if(eregi("\.html$",$fichier)){$image=$client;$nom_type=$mess[14];} else if(eregi("\.htm$",$fichier)){$image=$client;$nom_type=$mess[15];} else if(eregi("\.rar$",$fichier)){$image="rar.gif";$nom_type=$mess[60];} else if(eregi("\.gz$",$fichier)){$image="zip.gif";$nom_type=$mess[61];} else if(eregi("\.tgz$",$fichier)){$image="zip.gif";$nom_type=$mess[61];} else if(eregi("\.z$",$fichier)){$image="zip.gif";$nom_type=$mess[61];} else if(eregi("\.ra$",$fichier)){$image="ram.gif";$nom_type=$mess[16];} else if(eregi("\.ram$",$fichier)){$image="ram.gif";$nom_type=$mess[17];} else if(eregi("\.rm$",$fichier)){$image="ram.gif";$nom_type=$mess[17];} else if(eregi("\.pl$",$fichier)){$image="pl.gif";$nom_type=$mess[18];} else if(eregi("\.zip$",$fichier)){$image="zip.gif";$nom_type=$mess[19];} else if(eregi("\.wav$",$fichier)){$image="wav.gif";$nom_type=$mess[20];} else if(eregi("\.php$",$fichier)){$image="php.gif";$nom_type=$mess[21];} else if(eregi("\.php3$",$fichier)){$image="php.gif";$nom_type=$mess[22];} else if(eregi("\.phtml$",$fichier)){$image="php.gif";$nom_type=$mess[22];} else if(eregi("\.exe$",$fichier)){$image="exe.gif";$nom_type=$mess[50];} else if(eregi("\.bmp$",$fichier)){$image="bmp.gif";$nom_type=$mess[56];} else if(eregi("\.png$",$fichier)){$image="gif.gif";$nom_type=$mess[57];} else if(eregi("\.css$",$fichier)){$image="css.gif";$nom_type=$mess[58];} else if(eregi("\.mp3$",$fichier)){$image="mp3.gif";$nom_type=$mess[59];} else if(eregi("\.xls$",$fichier)){$image="xls.gif";$nom_type=$mess[64];} else if(eregi("\.doc$",$fichier)){$image="doc.gif";$nom_type=$mess[65];} else if(eregi("\.pdf$",$fichier)){$image="pdf.gif";$nom_type=$mess[79];} else if(eregi("\.mov$",$fichier)){$image="mov.gif";$nom_type=$mess[80];} else if(eregi("\.avi$",$fichier)){$image="avi.gif";$nom_type=$mess[81];} else if(eregi("\.mpg$",$fichier)){$image="mpg.gif";$nom_type=$mess[82];} else if(eregi("\.mpeg$",$fichier)){$image="mpeg.gif";$nom_type=$mess[83];} else if(eregi("\.swf$",$fichier)){$image="flash.gif";$nom_type=$mess[91];} else {$image="defaut.gif";$nom_type=$mess[23];} if($quoi=="image"){return $image;} else {return $nom_type;} } function init($rep) { global $racine,$sens,$mess,$font; if($rep==""){$nom_rep=$racine;} if($sens==""){$sens=1;} else { if($sens==1){$sens=0;}else{$sens=1;} } if($rep!=""){$nom_rep="$racine/$rep";} if(!file_exists($racine)) {echo "$mess[72]

$mess[32]
\n";exit;} if(!is_dir($nom_rep)) {echo "$mess[76]

$mess[32]
\n";exit;} return $nom_rep; } function assemble_tableaux($t1,$t2) { global $sens; if($sens==0) {$tab1=$t1; $tab2=$t2;} else {$tab1=$t2; $tab2=$t1;} if(is_array($tab1)) {while (list($cle,$val) = each($tab1)) {$liste[$cle]=$val;}} if(is_array($tab2)) {while (list($cle,$val) = each($tab2)) {$liste[$cle]=$val;}} return $liste; } function txt_vers_html($chaine) { $chaine=str_replace("‘","'",$chaine); $chaine=str_replace("œ","oe",$chaine); $chaine=str_replace("’","'",$chaine); $chaine=str_replace("…","...",$chaine); $chaine=str_replace("&","&",$chaine); $chaine=str_replace("<","<",$chaine); $chaine=str_replace(">",">",$chaine); $chaine=str_replace("\"",""",$chaine); $chaine=str_replace("à","à",$chaine); $chaine=str_replace("é","é",$chaine); $chaine=str_replace("è","è",$chaine); $chaine=str_replace("ù","ù",$chaine); $chaine=str_replace("â","â",$chaine); $chaine=str_replace("ê","ê",$chaine); $chaine=str_replace("î","î",$chaine); $chaine=str_replace("ô","ô",$chaine); $chaine=str_replace("û","û",$chaine); $chaine=str_replace("ä","ä",$chaine); $chaine=str_replace("ë","ë",$chaine); $chaine=str_replace("ï","ï",$chaine); $chaine=str_replace("ö","ö",$chaine); $chaine=str_replace("ü","ü",$chaine); return $chaine; } function show_hidden_files($fichier) { global $showhidden; $retour=1; if(substr($fichier,0,1)=="." && $showhidden==0) {$retour=0;} return $retour; } function listing($nom_rep) { global $sens,$ordre,$size_unit; $poidstotal=0; $handle=opendir($nom_rep); while ($fichier = readdir($handle)) { if($fichier!="." && $fichier!=".." && show_hidden_files($fichier)==1) { $poidsfic=filesize("$nom_rep/$fichier"); $poidstotal+=$poidsfic; if(is_dir("$nom_rep/$fichier")) { if($ordre=="mod") {$liste_rep[$fichier]=filemtime("$nom_rep/$fichier");} else {$liste_rep[$fichier]=$fichier;} } else { if($ordre=="nom") {$liste_fic[$fichier]=mimetype("$nom_rep/$fichier","image");} else if($ordre=="taille") {$liste_fic[$fichier]=$poidsfic;} else if($ordre=="mod") {$liste_fic[$fichier]=filemtime("$nom_rep/$fichier");} else if($ordre=="type") {$liste_fic[$fichier]=mimetype("$nom_rep/$fichier","type");} else {$liste_fic[$fichier]=mimetype("$nom_rep/$fichier","image");} } } } closedir($handle); if(is_array($liste_fic)) { if($ordre=="nom") {if($sens==0){ksort($liste_fic);}else{krsort($liste_fic);}} else if($ordre=="mod") {if($sens==0){arsort($liste_fic);}else{asort($liste_fic);}} else if($ordre=="taille"||$ordre=="type") {if($sens==0){asort($liste_fic);}else{arsort($liste_fic);}} else {if($sens==0){ksort($liste_fic);}else{krsort($liste_fic);}} } if(is_array($liste_rep)) { if($ordre=="mod") {if($sens==0){arsort($liste_rep);}else{asort($liste_rep);}} else {if($sens==0){ksort($liste_rep);}else{krsort($liste_rep);}} } $liste=assemble_tableaux($liste_rep,$liste_fic); if ($poidstotal >= 1073741824) {$poidstotal = round($poidstotal / 1073741824 * 100) / 100 . " G".$size_unit;} elseif ($poidstotal >= 1048576) {$poidstotal = round($poidstotal / 1048576 * 100) / 100 . " M".$size_unit;} elseif ($poidstotal >= 1024) {$poidstotal = round($poidstotal / 1024 * 100) / 100 . " K".$size_unit;} else {$poidstotal = $poidstotal . " ".$size_unit;} return array($liste,$poidstotal); } function barre_outil($revenir) { global $font,$id,$ordre,$sens,$user,$users,$mess,$rep,$allow_change_lang; echo ""; echo "
\n"; if($revenir==0) {echo "\n";} echo ""; if($revenir==1) {echo "$mess[32]";} else { echo "$user"; $array_chemin=split("/",$rep); while (list($cle,$val) = each($array_chemin)) { if($val!="") { if($addchemin!="") {$addchemin=$addchemin."/".$val;} else {$addchemin=$val;} echo "/$val"; } } } echo "\n"; if($allow_change_lang==1) {echo "\"$mess[92]\"  \n";} echo "\"$mess[85]\"  \n"; echo "\"$mess[84]\"  \n"; if($users==1) {echo "\"$mess[63]\"";} echo "

\n"; } function contenu_dir($nom_rep) { global $font,$id,$sens,$ordre,$rep,$poidstotal; // LECTURE DU REPERTOIRE ET CLASSEMENT DES FICHIERS list($liste,$poidstotal)=listing($nom_rep); // AFFICHAGE if(is_array($liste)) { while (list($fichier,$mime) = each($liste)) { // DEFINITION DU LIEN SUR LE FICHIER if(is_dir("$nom_rep/$fichier")) { $lien="index.php?id=$id&sens=$sens&ordre=$ordre&rep="; if($rep!=""){$lien.="$rep/";} $lien.=$fichier; $affiche_copier="non"; } else { $lien=""; if($rep!=""){$lien.="$rep/";} $lien.=$fichier; $lien="javascript:popup('$lien')"; $affiche_copier="oui"; } // AFFICHAGE DE LA LIGNE echo "\n"; echo "\n"; if(is_editable($fichier) || is_image($fichier) || is_dir("$nom_rep/$fichier")) {echo "";} echo ""; echo "$fichier"; if(is_editable($fichier) || is_image($fichier) || is_dir("$nom_rep/$fichier")) {echo "\n";} echo "\n"; echo ""; echo taille("$nom_rep/$fichier"); echo "\n"; echo ""; echo mimetype("$nom_rep/$fichier","type"); echo "\n"; echo ""; echo date_modif("$nom_rep/$fichier"); echo "\n"; echo ""; // IMAGE COPIER if($affiche_copier=="oui") { echo "\"$mess[66]\"\n"; } else { echo "\n"; } // IMAGE DEPLACER if($affiche_copier=="oui") { echo "\"$mess[70]\"\n"; } else {echo "\n";} // IMAGE RENOMMER echo "\"$mess[6]\"\n"; // IMAGE SUPPRIMER echo "\"$mess[7]\"\n"; // IMAGE EDITER if(is_editable($fichier) && !is_dir("$racine/$fichier")) { echo "\"$mess[51]\"\n"; } else {echo "\n";} // IMAGE TELECHARGER if($affiche_copier=="oui") { echo ""; echo "\"$mess[88]\"\n"; } echo "\n"; echo "\n"; } } } function lister_rep($nom_rep) { // $rep,$sens passes dans l'url global $rep,$url_racine,$racine,$mess,$sens,$user,$users,$id,$font,$tablecolor,$ordre,$poidstotal; if(eregi("\.\.",$rep)) {$rep="";} $nom_rep=init($rep); //$base_nom_rep=str_replace($racine,"",$nom_rep); //if($base_nom_rep==""){$base_nom_rep="/";} // AFFICHAGE BARRE DU HAUT (REPERTOIRE COURANT, AIDE, DECONNEXION...) if($sens==1){$sens=0;}else{$sens=1;} barre_outil(0); if($sens==1){$sens=0;}else{$sens=1;} echo "\n"; echo "\n"; echo "\n"; // PREMIERE LIGNE DU TABLEAU : Nom du fichier / Taille / Type / Modifié le / Actions if($rep!=""){$lien="&rep=".$rep;} echo "\n"; echo"\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if($sens==1){$sens=0;}else{$sens=1;} // LIEN DOSSIER PARENT if($rep!="") { $nom=dirname($rep); echo "\n"; } contenu_dir($nom_rep); echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "
$mess[1]"; if($ordre=="nom"||$ordre=="") {echo "  ";} echo "$mess[2]"; if($ordre=="taille") {echo "  ";} echo "$mess[3]"; if($ordre=="type") {echo "  ";} echo "$mess[4]\n"; if($ordre=="mod") {echo "  ";} echo "$mess[5]
$mess[24]    

 $poidstotal   
\n
"; } function deldir($location) { if(is_dir($location)) { $all=opendir($location); while ($file=readdir($all)) { if (is_dir("$location/$file") && $file !=".." && $file!=".") { deldir("$location/$file"); if(file_exists("$location/$file")){rmdir("$location/$file"); } unset($file); } elseif (!is_dir("$location/$file")) { if(file_exists("$location/$file")){unlink("$location/$file"); } unset($file); } } closedir($all); rmdir($location); } else { if(file_exists("$location")) {unlink("$location");} } } function enlever_controlM($fichier) { $fic=file($fichier); $fp=fopen($fichier,"w"); while (list ($cle, $val) = each ($fic)) { $val=str_replace(CHR(10),"",$val); $val=str_replace(CHR(13),"",$val); fputs($fp,"$val\n"); } fclose($fp); } function traite_nom_fichier($nom) { global $max_caracteres; $nom=stripslashes($nom); $nom=str_replace("'","",$nom); $nom=str_replace("\"","",$nom); $nom=str_replace("\"","",$nom); $nom=str_replace("&","",$nom); $nom=str_replace(",","",$nom); $nom=str_replace(";","",$nom); $nom=str_replace("/","",$nom); $nom=str_replace("\\","",$nom); $nom=str_replace("`","",$nom); $nom=str_replace("<","",$nom); $nom=str_replace(">","",$nom); $nom=str_replace(" ","_",$nom); $nom=str_replace(":","",$nom); $nom=str_replace("*","",$nom); $nom=str_replace("|","",$nom); $nom=str_replace("?","",$nom); $nom=str_replace("é","",$nom); $nom=str_replace("è","",$nom); $nom=str_replace("ç","",$nom); $nom=str_replace("@","",$nom); $nom=str_replace("â","",$nom); $nom=str_replace("ê","",$nom); $nom=str_replace("î","",$nom); $nom=str_replace("ô","",$nom); $nom=str_replace("û","",$nom); $nom=str_replace("ù","",$nom); $nom=str_replace("à","",$nom); $nom=str_replace("!","",$nom); $nom=str_replace("§","",$nom); $nom=str_replace("+","",$nom); $nom=str_replace("^","",$nom); $nom=str_replace("(","",$nom); $nom=str_replace(")","",$nom); $nom=str_replace("#","",$nom); $nom=str_replace("=","",$nom); $nom=str_replace("$","",$nom); $nom=str_replace("%","",$nom); $nom = substr ($nom,0,$max_caracteres); return $nom; } //----------------------------------------------------------------------------------------------------------------------------------------- // MAIN //----------------------------------------------------------------------------------------------------------------------------------------- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); include("prive/conf.php3"); if($langue=="") {$langue=$dft_langue;} require("include/${langue}.php3"); if(file_exists("logs/$id.php3")) {include("logs/$id.php3");} switch($action) { //----------------------------------------------------------------------------------------------------------------------------------------- // AIDE / HELP //----------------------------------------------------------------------------------------------------------------------------------------- case "aide"; include($hautpage); barre_outil(1); include("include/${langue}_help.htm"); break; //----------------------------------------------------------------------------------------------------------------------------------------- // LANGUE / LANGUAGE //----------------------------------------------------------------------------------------------------------------------------------------- case "langue"; setcookie("cookie_test","ok",time()+3600); // 1 an include($hautpage); barre_outil(1); echo "
$mess[95]

\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\"Français\"
Français
"; if($langue=="fr") {echo "";} echo "
\"English\"
English
"; if($langue=="en") {echo "";} echo "
\"Deutch\"
Deutch
"; if($langue=="de") {echo "";} echo "
\"Estonian\"
Estonian
"; if($langue=="ee") {echo "";} echo "
\"Italian\"
Italian
"; if($langue=="it") {echo "";} echo "
\"Hungary\"
Hungary
"; if($langue=="hun") {echo "";} echo "
\"Russian\"
Russian
"; if($langue=="rs") {echo "";} echo "
\"Slovak\"
Slovak
"; if($langue=="sk") {echo "";} echo "
\"Poland\"
Poland
"; if($langue=="pl") {echo "";} echo "
\"Lithuanian\"
Lithuanian
"; if($langue=="lt") {echo "";} echo "
\"Chinese\"
Chinese
"; if($langue=="cn") {echo "";} echo "
 
\n"; break; case "savelangue"; if($cookie_test!="ok") { include($hautpage); echo "
$mess[93]

$mess[32]
\n"; } else { $langue=$HTTP_GET_VARS["langue"]; setcookie("langue",$langue,time()+31536000); // 1 an header("Location:index.php?action=langue&id=$id&ordre=$ordre&sens=$sens&rep=$rep"); exit; } break; //----------------------------------------------------------------------------------------------------------------------------------------- // TELECHARGER / DOWNLOAD //----------------------------------------------------------------------------------------------------------------------------------------- case "telecharger"; $NomFichier = basename($fichier); $taille=filesize("$racine/$fichier"); header("Content-Type: application/force-download; name=\"$NomFichier\""); header("Content-Transfer-Encoding: binary"); header("Content-Length: $taille"); header("Content-Disposition: attachment; filename=\"$NomFichier\""); header("Expires: 0"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); readfile("$racine/$fichier"); exit(); break; //----------------------------------------------------------------------------------------------------------------------------------------- // EDITER / EDIT //----------------------------------------------------------------------------------------------------------------------------------------- case "editer"; if(!connecte($id)) {header("Location:index.php");exit;} include($hautpage); $code=stripslashes($code); if($save==1) { $code=str_replace("<","<",$code); $fp=fopen("$racine/$fic","w"); fputs ($fp,$code); fclose($fp); enlever_controlM("$racine/$fic"); } echo "
\n"; echo "$mess[52] $fic
"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "

\n"; echo "\n"; echo "\"$mess[86]\"\n"; echo "
\n"; echo "
\n"; break; //----------------------------------------------------------------------------------------------------------------------------------------- // COPIER / COPY //----------------------------------------------------------------------------------------------------------------------------------------- case "copier"; if(!connecte($id)) {header("Location:index.php");exit;} include($hautpage); echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
$mess[67] : $fic
$mess[68] : "; if($dest=="") {echo "/";} else {echo "$dest";} echo "
\n"; echo "
$mess[69] :
\n"; echo ""; $handle=opendir("$racine/$dest"); while ($fichier = readdir($handle)) { if($fichier=="..") { $up=dirname($dest); if($up==$dest || $up==".") {$up="";} if($up!=$dest) { echo ""; } } else if($fichier!=".." && $fichier!="." && is_dir("$racine/$dest/$fichier")) {$liste_dir[]=$fichier;} } closedir($handle); if(is_array($liste_dir)) { asort($liste_dir); while (list($cle,$val) = each($liste_dir)) { echo "\n"; } } echo "
$mess[24]
$val

"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "
\n"; echo "
\n"; break; case "copier_suite"; if(!connecte($id)) {header("Location:index.php");exit;} $destination="$racine/"; if($dest!="") {$destination.="$dest/";} $destination.=basename($fic); if(file_exists("$racine/$fic") && "$racine/$fic"!=$destination) {copy("$racine/$fic",$destination);} header("Location:index.php?rep=$rep&id=$id&ordre=$ordre&sens=$sens"); exit; break; //----------------------------------------------------------------------------------------------------------------------------------------- // VOIR UN FICHIER //----------------------------------------------------------------------------------------------------------------------------------------- case "voir"; $nomdufichier=basename($fichier); echo "\n"; echo "$mess[23] : ".$nomdufichier."\n"; $fp=@fopen("$hautpage","r"); if($fp) { while(!feof($fp)) { $buffer=fgets($fp,4096); if(eregi("","",$val); $val=str_replace(CHR(10),"",$val); $val=str_replace(CHR(13),"",$val); echo "<$val onload=\"self.focus()\">\n"; } } break; } } fclose($fp); } echo "
$mess[23] : "; echo "\n"; echo "".$nomdufichier."


\n"; echo "\"$mess[90]\"\n"; echo "\"$mess[86]\"\n"; echo "
\n"; echo "

"; if(!is_image($fichier)) { echo "
\n"; $fp=@fopen("$racine/$fichier","r"); if($fp) { echo "\n"; while(!feof($fp)) { $buffer=fgets($fp,4096); $buffer=txt_vers_html($buffer); $buffer=str_replace("\t","     ",$buffer); echo $buffer."
"; } fclose($fp); echo "
\n"; } else { echo "$mess[89] : $racine/$fichier"; } echo "
\n"; } else { echo "\n"; } echo "
\n"; echo "\"$mess[90]\"\n"; echo "\"$mess[86]\"\n"; echo "
\n"; echo "\n"; echo "\n"; exit; break; //----------------------------------------------------------------------------------------------------------------------------------------- // DEPLACER / MOVE //----------------------------------------------------------------------------------------------------------------------------------------- case "deplacer"; if(!connecte($id)) {header("Location:index.php");exit;} include($hautpage); echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
$mess[67] : $fic
$mess[68] : "; if($dest=="") {echo "/";} else {echo "$dest";} echo "
\n"; echo "
$mess[69] :
\n"; echo ""; $handle=opendir("$racine/$dest"); while ($fichier = readdir($handle)) { if($fichier=="..") { $up=dirname($dest); if($up==$dest || $up==".") {$up="";} if($up!=$dest) { echo "\n"; } } echo "
$mess[24]"; } } else if($fichier!=".." && $fichier!="." && is_dir("$racine/$dest/$fichier")) {$liste_dir[]=$fichier;} } closedir($handle); if(is_array($liste_dir)) { asort($liste_dir); while (list($cle,$val) = each($liste_dir)) { echo "
$val

"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "
\n"; echo "
\n"; break; case "deplacer_suite"; if(!connecte($id)) {header("Location:index.php");exit;} $destination="$racine/"; if($dest!="") {$destination.="$dest/";} $destination.=basename($fic); if(file_exists("$racine/$fic") && "$racine/$fic"!=$destination) {copy("$racine/$fic",$destination);} if("$racine/$fic"!=$destination) {if(file_exists("$racine/$fic")) {unlink("$racine/$fic");}} header("Location:index.php?rep=$rep&ordre=$ordre&sens=$sens&id=$id"); exit; break; //----------------------------------------------------------------------------------------------------------------------------------------- // SUPPRIMER / DELETE //----------------------------------------------------------------------------------------------------------------------------------------- case "supprimer"; if(!connecte($id)) {header("Location:index.php");exit;} include($hautpage); echo "
\n"; if(is_dir("$racine/$fic")){$mime=$mess[45];}else{$mime=$mess[46];} echo "$mess[47] $mime $fic ?"; echo "

"; echo "$mess[48]   \n"; echo "$mess[49]\n"; echo "

"; echo "
\n"; break; case "supprimer_suite"; if(!connecte($id)) {header("Location:index.php");exit;} $messtmp=""; $a_effacer="$racine/$fic"; if(file_exists($a_effacer)) { if(is_dir($a_effacer)){deldir($a_effacer);$messtmp.="$mess[38] $fic $mess[44].";} else {unlink($a_effacer); $messtmp.="$mess[34] $fic $mess[44].";} } else {$messtmp.=$mess[76];} $messtmp.="

$mess[32]"; $messtmp.="
"; header("Location:index.php?rep=$rep&id=$id&ordre=$ordre&sens=$sens"); exit; break; //----------------------------------------------------------------------------------------------------------------------------------------- // RENOMMER / RENAME //----------------------------------------------------------------------------------------------------------------------------------------- case "rename"; if(!connecte($id)) {header("Location:index.php");exit;} include($hautpage); echo "
\n"; $nom_fic=basename($fic); echo ""; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "$mess[6] $nom_fic $mess[42] "; echo "\n"; echo "\n"; echo "
"; echo "$mess[32]"; echo "

"; echo "
\n"; break; case "rename_suite"; if(!connecte($id)) {header("Location:index.php");exit;} $err=""; $nom_fic=basename($fic); $messtmp=""; $fic_new=traite_nom_fichier($fic_new); $old="$racine/$fic"; $new=dirname($old)."/".$fic_new; if($fic_new=="") { $messtmp.="$mess[37]"; $err=1; } else if(file_exists($new)) { $messtmp.="$fic_new $mess[43]"; $err=1; } else { if(file_exists($old)) {rename($old,$new);} $messtmp.="$fic $mess[41] $fic_new"; } $messtmp.="

$mess[32]"; $messtmp.="
"; if($err=="") {header("Location:index.php?rep=$rep&ordre=$ordre&sens=$sens&id=$id");exit;} include($hautpage); echo "
\n"; echo "$messtmp"; echo "
\n"; break; //----------------------------------------------------------------------------------------------------------------------------------------- // CREER UN REPERTOIRE / CREATE DIR //----------------------------------------------------------------------------------------------------------------------------------------- case "mkdir"; if(!connecte($id)) {header("Location:index.php");exit;} $err=""; $messtmp=""; $nomdir=traite_nom_fichier($nomdir); if($nomdir=="") { $messtmp.="$mess[37]"; $err=1; } else if(file_exists("$racine/$rep/$nomdir")) { $messtmp.="$mess[40]"; $err=1; } else { mkdir("$racine/$rep/$nomdir",0775); $messtmp.="$mess[38] $nomdir $mess[39] "; if($rep=="") {$messtmp.="/";} else {$messtmp.="$rep";} $messtmp.=""; } $messtmp.="

$mess[32]"; $messtmp.="
"; if($err=="") {header("Location:index.php?rep=$rep&id=$id&ordre=$ordre&sens=$sens");exit;} include($hautpage); echo "
\n"; echo "$messtmp"; echo "
\n"; break; //----------------------------------------------------------------------------------------------------------------------------------------- // CREER UN FICHIER / CREATE FILE //----------------------------------------------------------------------------------------------------------------------------------------- case "creer_fichier"; if(!connecte($id)) {header("Location:index.php");exit;} $err=""; $messtmp=""; $nomfic=traite_nom_fichier($nomfic); if($nomfic=="") { $messtmp.="$mess[37]"; $err=1; } else if(file_exists("$racine/$rep/$nomfic")) { $messtmp.="$mess[71]"; $err=1; } else { $fp=fopen("$racine/$rep/$nomfic","w"); if(eregi("\.html$",$nomfic)||eregi("\.htm$",$nomfic)) { fputs($fp,"\n\nDocument sans titre\n\n\n\n\n\n\n"); } fclose($fp); $messtmp.="$mess[34] $nomfic $mess[39] "; if($rep=="") {$messtmp.="/";} else {$messtmp.="$rep";} $messtmp.=""; } $messtmp.="

$mess[32]"; $messtmp.="
"; if($err=="") {header("Location:index.php?rep=$rep&id=$id&ordre=$ordre&sens=$sens");exit;} include($hautpage); echo "
\n"; echo "$messtmp"; echo "
\n"; break; //----------------------------------------------------------------------------------------------------------------------------------------- // UPLOAD //----------------------------------------------------------------------------------------------------------------------------------------- case "upload"; if(!connecte($id)) {header("Location:index.php");exit;} $messtmp=""; if($rep!=""){$rep_source="/$rep";} $destination=$racine.$rep_source; if ($userfile_size!=0) {$taille_ko=$userfile_size/1024;} else {$taille_ko=0;} if ($userfile=="none") {$message=$mess[31];} if ($userfile!="none" && $userfile_size!=0) { $userfile_name=traite_nom_fichier($userfile_name); if (!copy($userfile, "$destination/$userfile_name")) { $message="
$mess[33]
$userfile_name"; } else { if(is_editable($userfile_name)) { enlever_controlM("$destination/$userfile_name"); } $message="$mess[34] $userfile_name $mess[35] $rep"; } } $messtmp.="$message
"; $messtmp.="

$mess[32]"; $messtmp.="
"; header("Location:index.php?rep=$rep&ordre=$ordre&sens=$sens&id=$id"); exit; break; //----------------------------------------------------------------------------------------------------------------------------------------- // VERIFICATION LOGIN/PASSE //----------------------------------------------------------------------------------------------------------------------------------------- case "verif"; $fp=@fopen("prive/users.txt","r"); if($fp) { while(!feof($fp)) { $buf=fgets($fp,4096); if(!ereg("^[#]",$buf)) { $buf=str_replace(CHR(10),"",$buf); $buf=str_replace(CHR(13),"",$buf); $buf=split(";",$buf); $l=$buf[2];$p=$buf[3]; if($login==$l && $passe==$p && $login!="" && $passe!="") {creer_id($buf[0],$buf[1],$l);$ok=1;} } } } else { include($hautpage); echo "
\n"; echo "$mess[75]"; echo "
\n"; include($baspage); exit; } if($fp) {fclose($fp);} if($ok==1) {header("Location:index.php?id=$id");} else {header("Location:index.php?err=1");} break; //----------------------------------------------------------------------------------------------------------------------------------------- // DECONNEXION //----------------------------------------------------------------------------------------------------------------------------------------- case "deconnexion"; if(!connecte($id)) {header("Location:index.php");exit;} // EFFACE LE LOG DU USER if(file_exists("logs/$id.php3")) {unlink("logs/$id.php3");} //EFFACE LES LOGS DE PLUS DE 24H $now=time(); $eff=$now-(24*3600); $handle=opendir("logs"); while ($fichier = readdir($handle)) { if($fichier!="." && $fichier!="..") { $tmp = filemtime("logs/$fichier"); if($tmp<$eff) {unlink("logs/$fichier");} } } closedir($handle); header("Location:index.php"); break; //----------------------------------------------------------------------------------------------------------------------------------------- // DEFAUT //----------------------------------------------------------------------------------------------------------------------------------------- default; include($hautpage); echo "
\n"; if(!connecte($id)) { echo "\n"; echo "

\n"; echo "
\n"; echo "$mess[94]\n"; echo "\n"; echo "
$mess[78]\n"; echo "\n"; echo "\n"; echo "

\n"; echo "\n"; echo "
\n"; } else { lister_rep($nom_rep); echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "$mess[25]"; if($rep==""){echo "/";}else{echo "$rep";} echo "\n"; echo "
\n"; echo "
\n"; echo "  \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "$mess[26]"; if($rep==""){echo "/";}else{echo "$rep";} echo "
\n"; echo "
\n"; echo "  \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "$mess[28]"; if($rep==""){echo "/";}else{echo "$rep";} echo "
\n"; echo "
\n"; echo "  \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"; } echo "
\n"; break; } echo "

© Script par Webjeff
"; include($baspage); ?>