Dusk Kino

"); $directories = []; $files = []; $dirs = scandir($currentdir); foreach($dirs as $file) { if ($file[0] != '.') { if (is_dir("$currentdir/$file")) { array_push($directories, $file); } else { array_push($files, $file); } } } //Show folder links if(count($directories) > 0) { echo("

Carpetes

"); foreach($directories as $file) { printf('/%s/
' . "\n" , $_GET["q"] ? $_GET["q"] . "/" : "", $file, $file); } } //Show Files if(count($files) > 0) { if (count($directories) > 0) echo("
"); //Show file links echo("

Fitxers

"); echo("
"); foreach($files as $file) { printf('%s
' , $currentdir, $file, $file); printf("\n"); } echo("
"); } printf('

/%s

', $_GET["q"]); //Check if home and back buttons are needed if($currentdir != $basedir) { echo("
"); echo("Inici
"); //Solve ocurrences where url has ?q=./ if (dirname($_GET["q"]) == ".") { $parentdir = ""; } else $parentdir = dirname($_GET["q"]); echo("Arrere
"); echo("
"); } ?>