<?php
function liste($dir){
if($_GET[v]){ $v=$_GET[v]; }
$dossier=opendir($dir);
while($fichier=readdir($dossier)){
$berk=array('.', '..');
if(!in_array($fichier,$berk)){
$lien="$dir/$fichier";
$nbrT=count(split("/",$lien))-2;
if($v==$lien){ $here='<span class="here">';$hereEnd='</span>'; } else{ $here='<span class="hereOn">';$hereEnd='</span>'; }
$space="";
for($i=1; $i<$nbrT; $i++){ $space.=' '; }
if(is_dir($dir."/".$fichier)){
echo $space.'<img src="/tutoriel/rep.jpg" border="0"> '.$here.'<b> <a href="index.php?v='.$lien.'">'.ucfirst($fichier).'</a> </b>'.$hereEnd.'<br />';
liste("$dir/$fichier");
}
}
}
}
function listeFichier($dir){
if($_GET[v]){ $v=$_GET[v]; }
$dossier=opendir($dir);
while($fichier=readdir($dossier)){
$berk=array('.', '..');
if(!in_array($fichier,$berk)){
$lien="$dir/$fichier";
if(!is_dir($dir."/".$fichier)){
echo ' '.ucfirst($fichier).' <br />';
}
}
}
}
$v=htmlentities($_GET[v]);
$situation=str_replace("./test/","",$v); $situation=str_replace("/"," > ",$situation);
echo '<table width="100%"><tr valign="top"><td width="200">';
liste("./test");
echo '</td><td>
<b>Les fichiers</b> ['.$situation.']<br /><br />';
if($v){ listeFichier($v); }else{ echo 'Cliquez sur un répertoire'; }
echo '</td></tr></table>';
?>
<style type="text/css">
.here a {
font-weight: bold;
color: red;
text-decoration: none;
font-variant: small-caps;
}
.here a:hover {
font-weight: bold;
color: darkblue;
text-decoration: none;
font-variant: small-caps;
}
.hereOn a {
font-weight: bold;
text-decoration: none;
color: #2B53A8;
font-variant: small-caps;
}
.hereOn a:hover {
font-weight: bold;
color: #E63E00;
text-decoration: none
font-variant: small-caps;
}
</style>
Ecrit le 3-/-0/2005 par Sky
http://www.graphiks.net/
Nous - Plan du site - Informations légale - Contact - © Graphiks.net