\n";
32 | if ($r_dir!="/" ) echo "
[..]";
33 |
34 | $files=array();
35 | if ($dirarray=@scandir($r_dir)) {
36 | foreach($dirarray as $file) {
37 | if ($r_dir=="/") {
38 | $truedir=$r_dir.$file;
39 | } else {
40 | $truedir=$r_dir."/".$file;
41 | }
42 | if ($file!="." && $file!="..") {
43 | if (is_dir($truedir)) {
44 | if (substr($r_hilitedir,1)==$file) echo "
";
45 | echo "
".htmlentities($file,ENT_QUOTES,"UTF-8")."
";
46 | if (substr($r_hilitedir,1)==$file) echo "";
47 | } else {
48 | $files[]=$file;
49 | }
50 | }
51 | }
52 | foreach($files as $file) {
53 | echo "

".htmlentities($file,ENT_QUOTES,"UTF-8")."
\n";
54 | }
55 | } else {
56 | echo "!Invalid directory!";
57 | }
58 | ?>
59 |
60 |
61 |