\n";
if ($r_dir!="/" ) echo "
[..]";
$files=array();
if ($dirarray=@scandir($r_dir)) {
foreach($dirarray as $file) {
if ($r_dir=="/") {
$truedir=$r_dir.$file;
} else {
$truedir=$r_dir."/".$file;
}
if ($file!="." && $file!="..") {
if (is_dir($truedir)) {
if (substr($r_hilitedir,1)==$file) echo "
";
echo "
".htmlentities($file,ENT_QUOTES,"UTF-8")."
";
if (substr($r_hilitedir,1)==$file) echo "";
} else {
$files[]=$file;
}
}
}
foreach($files as $file) {
echo "

".htmlentities($file,ENT_QUOTES,"UTF-8")."
\n";
}
} else {
echo "!Invalid directory!";
}
?>