Pouet :)
No notes
Syntax:
PHP
<?php # +------------------ explorer ---------------------------+ # | SCRIPT Entierement Ecrit par Jean Charles MAMMANA | # | Url : http://www.jbc-explorer.com | # | Contact : jc_mammana@hotmail.com | # | | # | Tous les scripts utilisé dans ce projet | # | sont en libre utilisation. | # | Tous droits de modifications sont autorisé | # | à condition de m'en informer comme précisé | # | dans les termes du contrat de la licence GPL | # | | # +-------------------------------------------------------+ @session_start(); include_once('./config.inc.php'); include_once('./listing.inc.php'); $auth = false; $fileListToHide = file("hide.php"); if(file_exists('modules/auth/func.inc.php')){ include_once('./modules/auth/func.inc.php'); } // Définition du chemin du dossier $pass = substr($CONFIG['DOCUMENT_ROOT'], 0, -1); foreach ($_GET as $k => $v) { if(!is_numeric($k)) continue; $pass = $pass."/".$_GET[$k]; } $info = file_library($pass); if (!file_exists($pass.'/.dirinfo')) DirInfoTime ($pass,'0'); // Fin Définition du chemin du dossier // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- function count_files($folder, $ext, $subfolders) { // on rajoute le / à la fin du nom du dossier s'il ne l'est pas if(substr($folder, -1) != '/') $folder .= '/'; // $ext est un tableau? $array = 0; if(is_array($ext)) $array = 1; // ouverture du répertoire $rep = @opendir($folder); if(!$rep) return -1; $nb_files = 0; // tant qu'il y a des fichiers while($file = readdir($rep)) { // répertoires . et .. if($file == '.' || $file == '..') continue; // si c'est un répertoire et qu'on peut le lister if(is_dir($folder . $file) && $subfolders) { $nb_files += count_files($folder . $file, $ext, 1);// on appelle la fonction } elseif(!$array && substr($file, -strlen($ext))== $ext) { // vérification de l'extension avec $array = 0 $nb_files++; } elseif($array==1 && in_array(strtolower(substr(strrchr($file,"."),1)), $ext)) { // vérification de l'extension avec $array = 1 $nb_files++; } elseif ($ext == "*") { $nb_files++; } } // fermeture du rep closedir($rep); return $nb_files; } // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Download | Copy Paste Code</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="styles/<?php echo $CONFIG['CSS'] ?>" rel="stylesheet" type="text/css"> <script language="javascript"> <!-- function TestFrame(){ <?php $path = ''; if(!empty($_GET)){ $path = "?".http_build_query($_GET,''); } ?> if(!(parent.frames["tree"] && parent.frames["main"])){ location.replace("../index.php<?php echo $path ?>"); } } /************************************************* ** Permet d'afficher ou non une portion de page ** *************************************************/ function close_open(img, id) { if (document.getElementById(id).style.display == "") { document.getElementById(id).style.display = "none"; img.src = "./icones/win/plus.gif"; } else { document.getElementById(id).style.display = ""; img.src = "./icones/win/moins.gif"; } } TestFrame(); //--> </script> <style type="text/css"> <!-- body { margin-top: 10px; } --> </style> </head> <body class="bback"> <table width="204" height="0" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="23" colspan="3" class='Ctitre2' onclick="close_open(this, 'liste');" style="cursor:pointer"> Liste des fichiers</td> </tr> </table> <div id="liste"> <table width="204" height="0" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class='cadre'><img src="img/onepix.gif" width="1" height="1"></td> <td class='Ctitre2back'> <table width="100%" border="0" cellspacing="0" cellpadding="4"> <tr> <td> <table border="0" cellpadding="1" cellspacing="0"> <tr> <td class='Ctitre2back'> <p style="margin:0;"><a href="http://www.parapenteattitude.com" target="_blank"><b>Parapente Attitude (site)</b></a></p> <p style="background-color:#CCC000; color:#000000;padding:5px 5px;">Pour consulter les photos/vidéos disponibles dans notre galerie,<br><b>Naviguez dans les dossiers<br>ci-dessous</b></p> <a href="arbre.php" onClick="open('list.php','main','')" ><img src="<?php echo $CONFIG['ICO_FOLDER'] ?>/disk.gif" alt="Serveur" title="Server" class="ico"> <strong>Galerie Photos<?php // echo $_SERVER['SERVER_NAME'] ?></strong></a><br> <?php listing($CONFIG['DOCUMENT_ROOT'],$_GET,$CONFIG,$LANGUE); ?></td> </tr> </table> </td> </tr> </table> </td> <td class='cadre'><img src="img/onepix.gif" width="1" height="1"></td> </tr> <tr class='cadre'> <td height="1"></td> <td height="1" width="202"></td> <td height="1"></td> </tr> </table> </div> <br> <!-- Définition du chemin du dossier --> <table width="204" height="0" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="23" colspan="3" class="Ctitre3" onclick="close_open(this, 'details');" style="cursor:pointer"> Détails</td> </tr> </table> <div id="details"> <table width="204" height="0" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class='cadre'><img src="img/onepix.gif" width="1" height="1"></td> <td class='Ctitre3back'> <table width="100%" border="0" cellspacing="0" cellpadding="4"> <tr> <td> <table border="0" cellpadding="1" cellspacing="0"> <tr> <td width="80">Nom :</td> <td width="300"><b><?php echo basename($pass).'</b>'; ?></td> </tr> <tr> <td>Type</td> <td> <?php if($pass == substr($CONFIG['DOCUMENT_ROOT'], 0, -1))echo 'Dossier racine'; else echo ''.$info['type']; ?> </td> </tr> <?php if(!function_exists('FormateDate')) { FUNCTION FormateDate($variable, $avec='') { $TabMoisLettre = array(1 => 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre') ; $TabJourLettre = array('Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi') ; // jour de la semaine $var2 = date('w', mktime(0, 0, 0, substr($variable, 5, 2), substr($variable, 8, 2), substr($variable, 0, 4))); // jour de la semaine $VarJour = $TabJourLettre[intval($var2)] ; // trouvre le jour de la semaine // formatage de la date $VarDate = substr($variable, 8, 2) .' '.$TabMoisLettre[intval(substr($variable, 5, 2))] .' '.substr($variable, 0, 4) ; if($avec != '') { $VarDate .= '' .' à '.substr($variable, 11, 2) .'h'.substr($variable, 14, 2) //.':'.substr($variable, 17, 2) .'' ; } RETURN ($VarJour.' '.$VarDate) ; // retourne les variables } } // on formate la date $DateNew = substr($info['date'],6,4).'-'.substr($info['date'],3,2).'-'.substr($info['date'],0,2).' '.substr($info['date'],11,2).':'.substr($info['date'],14,2).':00' ; echo '' .'<tr>' .' <td>Créé le :</td>' .' <td>'.FormateDate($DateNew, true).'</td>' .'</tr>' .'<tr>' .' <td>Fichiers :</td>' .' <td>'.count_files($pass,"*",1).'</td>' .'</tr>' .'' ; //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- $dossier = opendir($pass); $i = 0; while($Fichier = readdir($dossier)) { if ($Fichier != "." && $Fichier != ".." ) { $nomFichier = $pass."/".$Fichier; if(file_exists($nomFichier)) { $i++; $poids[$i] = round(filesize($nomFichier)/1024); $o = $i - 1; @$poidsrep[$i] += ($poids[$i] + $poidsrep[$o]); } } } closedir($dossier); echo '' .'<tr>' .' <td>Poids :</td>' .' <td>'.@number_format($poidsrep[$i]/1024,2).'mo</td>' .'</tr>' .'' ; //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //echo quota('Waga Festival 2009') ; ?> </table> </td> </tr> </table> </td> <td class='cadre'><img src="img/onepix.gif" width="1" height="1"></td> </tr> <tr class='cadre'> <td height="1"></td> <td height="1" width="202"></td> <td height="1"></td> </tr> </table> </div> <br> <!-- Fin de Définition du chemin du dossier --> <!-- <table width="204" height="0" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="23" colspan="3" class="Ctitre3" onclick="close_open(this, 'modules');" style="cursor:pointer"> Modules</td> </tr> </table> <div id="modules"> <table width="204" height="0" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="1" class='cadre'><img src="img/onepix.gif" width="1" height="1"></td> <td width="190" class='Ctitre3back'> <table width="100%" border="0" cellspacing="0" cellpadding="4"> <tr> <td> <table> <tr> <td> <?php ListModules(); // Pour supprimer le lien "Information & Aide", supprimez simplement le fichier "info.php" :) ?> </td> </tr> </table> </td> </tr> </table> </td> <td width="1" class='cadre'><img src="img/onepix.gif" width="1" height="1"></td> </tr> <tr class='cadre'> <td height="1"></td> <td height="1" width="202"></td> <td height="1"></td> </tr> </table> </div> <br> --> <?php if ($CONFIG['activer_Message']){?> <table width="100%"> <tr> <td> <table class="message" align="center" > <tr> <td align="center"><br><?php echo $CONFIG['Message']; ?><br><br></td> </tr> </table> </td> </tr> </table> <?php } ?> <?php if(file_exists("info.php")){ ?> <table width="204" height="0" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="23" colspan="3" class="Ctitre3" onclick="close_open(this, 'info');" style="cursor:pointer"> Info</td> </tr> </table> <div id="info"> <table width="204" height="0" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="cadre"><img src="img/onepix.gif" width="1" height="1"></td> <td class="Ctitre3back"> <table width="100%" border="0" cellspacing="0" cellpadding="4"> <tr> <td> <table> <tr> <td><a href="info.php" target="main"><img src="<?php echo $CONFIG['ICO_FOLDER'] ?>/hlp.gif" alt="Info" title="info" class="ico" ><?php echo $LANGUE['infocopy'] ?></a></td> </tr> </table> </td> </tr> </table> </td> <td class="cadre"><img src="img/onepix.gif" width="1" height="1"></td> </tr> <tr class="cadre"> <td height="1"></td> <td height="1" width="202"></td> <td height="1"></td> </tr> </table> </div> <?php } ?> <p> </p> </body> </html>