$path = ".";
$bgcolor = "#EAEAEA";
echo "\n";
# Listage des repertoires
$handle = opendir($path);
$i = 0;
while ($file = readdir($handle))
{
if ($file != "." && $file != ".." && $file != ".htaccess" && $file != "index.php" && is_dir($file))
{
$ListFiles[$i]=$file;
$i++;
}
}
closedir($handle);
if ($i != "0") { sort($ListFiles); }
$i = 0;
while ($i < count($ListFiles))
{
if ($ListFiles[$i] != "." && $ListFiles[$i] != ".." && $ListFiles[$i] != ".htaccess" && $ListFiles[$i] != "index.php")
{
echo " \n";
echo " ".$ListFiles[$i]." | \n";
echo "
\n";
}
$i++;
}
# Listage des fichiers
$handle = opendir($path);
$i = 0;
while ($file = readdir($handle))
{
if ($file != "." && $file != ".." && $file != ".htaccess" && $file != "index.php" && !is_dir($file))
{
$ListFiles[$i]=$file;
$i++;
}
}
closedir($handle);
if ($i != "0") { sort($ListFiles); }
$i = 0;
while ($i < count($ListFiles))
{
if ($ListFiles[$i] != "." && $ListFiles[$i] != ".." && $ListFiles[$i] != ".htaccess" && $ListFiles[$i] != "index.php" && !is_dir($ListFiles[$i]))
{
echo " \n";
echo " >> ".$ListFiles[$i]." | \n";
echo "
\n";
}
$i++;
}
?>