if (($handle = opendir("$nick/".join("/",$url))) == NULL)
{
print "ERROR dossier inexistamt";
}
else
{
print "
Repertoire : $nick / ";
$base = "/site.php";
foreach($url as $key)
{
$base .= "/$key";
print "$key\n";
}
print "
";
$repertoires = array();
$fichiers = array();
while($fichier= readdir($handle))
{
if (! ereg("\.$",$fichier))
{
if (is_dir("$nick/".join("/",$url)."/$fichier")) { array_push($repertoires,$fichier); }
else { array_push($fichiers,$fichier); }
}
}
print "";
$i = 0;
foreach($repertoires as $key)
{
$i++;
$class = ($i % 5 == 0 ? "rep_c" : "rep_g");
print "- $key
\n";
}
print "
";
print "";
$i = 0;
foreach($fichiers as $key)
{
$i++;
$class = ($i % 5 == 0 ? "fichier_c" : "fichier_g");
$nom = $key;
$nom = preg_replace("/^(.{10}).{3,}$/","$1...",$nom);
$fichier = preg_replace("/\/\//","/","/$nick/".join("/",$url)."/$key");
print "- $nom
\n";
}
print "
";
print "";
}
?>