$dir_){ if($dir_ == $dir){ $exists = true; break; } } if(!$exists){ echo <<< errorblock

LISTING NOT FOUND

errorblock; exit(); } if(!array_key_exists('path', $_GET)){ $path = '/'; } else { $path = $_GET['path']; } $elements = []; if($handle = opendir($dir_dirs[$dir_index] . $path)){ while(false !== ($entry = readdir($handle))){ //exclude . and .. if($entry != '.' && $entry != '..'){ $elements[] = $entry; } } } else { echo <<< erroropendir

ERROR OPENING DIRECTORY, PLEASE RELOAD THE PAGE

IF THE ISSUE PERSISTS, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR

erroropendir; exit(); } ?>

Select a file to download, or a folder to view its contents

emptylisting; } foreach($elements as $i=>$currentfile){ echo ""; echo ""; $fulldir = $dir_dirs[$dir_index] . $path . "/" . $currentfile; if(is_dir($fulldir)){ echo ""; echo ""; } else { echo ""; echo ""; } echo ""; } ?>
File Name Link Size
Oops! This folder is empty... 0
" . $currentfile . "View Directory" . foldersize($fulldir) . "Download" . listingsize($fulldir) . "