} else {
     if (isset($_GET['renamedir'])) {
         // Rename a directory
         $status = rename_dir($dir, $enable_folder_rename, $fix_utf8);
     } else {
         if (isset($_GET['deletedir'])) {
             // the check if the file can be deleted is done before - if it is not possible we never get here!
             $status = delete_folder($dir, $enable_folder_deletion, $fix_utf8);
         }
     }
 }
 // needed for browsing - we check if a [..] is possible - it is never allowed to go higher as the defined root!
 $show_root = isset($_SESSION["TFU_ROOT_DIR"]) ? $dir != $_SESSION["TFU_ROOT_DIR"] : false;
 if (isset($_GET['changedir'])) {
     // Change a directory
     $dir = change_folder($dir, $show_root, $enable_folder_browsing, $exclude_directories);
 }
 // needed for browsing - we check again because folder could have changed!
 $show_root = isset($_SESSION["TFU_ROOT_DIR"]) ? $dir != $_SESSION["TFU_ROOT_DIR"] : false;
 // Read all files and folders
 $size = read_dir($dir, $myFiles, $myDirs, $fix_utf8, $exclude_directories, $sort_files_by_date);
 // Sort files and folders
 sort_data($myFiles, $myDirs, $sort_files_by_date);
 if ($show_root) {
     array_unshift($myDirs, "..");
 }
 $nrFiles = count($myFiles);
 // check restrictions like if files can be deleted or folders created or of the folder does exists
 $status = check_restrictions($dir, $show_root, $myFiles, $fix_utf8, $status);
 // we check if we have an error in the upload!
 if (isset($_SESSION["upload_memory_limit"]) && isset($_GET['check_upload'])) {
Example #2
0
 } else {
     if (isset($_GET['renamedir'])) {
         // Rename a directory
         $status = rename_dir($dir, $enable_folder_rename, $fix_utf8);
     } else {
         if (isset($_GET['deletedir'])) {
             // the check if the file can be deleted is done before - if it is not possible we never get here!
             $status = delete_folder($dir, $enable_folder_deletion, $fix_utf8);
         }
     }
 }
 // needed for browsing - we check if a [..] is possible - it is never allowed to go higher as the defined root!
 $show_root = isset($_SESSION["TFU_ROOT_DIR"]) ? $dir != $_SESSION["TFU_ROOT_DIR"] : false;
 if (isset($_GET['changedir'])) {
     // Change a directory
     $dir = change_folder($dir, $show_root, $enable_folder_browsing, $exclude_directories, $sort_directores_by_date);
 }
 // needed for browsing - we check again because folder could have changed!
 $show_root = isset($_SESSION["TFU_ROOT_DIR"]) ? $dir != $_SESSION["TFU_ROOT_DIR"] : false;
 // I reset the status cache before I read the directory and check the restrictions
 clearstatcache();
 // Read all files and folders
 $size = read_dir($dir, $myFiles, $myDirs, $fix_utf8, $exclude_directories, $sort_files_by_date, $sort_directores_by_date);
 // Sort files and folders
 sort_data($myFiles, $myDirs, $sort_files_by_date, $sort_directores_by_date);
 if ($show_root) {
     array_unshift($myDirs, "..");
 }
 $nrFiles = count($myFiles);
 // check restrictions like if files can be deleted or folders created or of the folder does exists
 $status = check_restrictions($dir, $show_root, $myFiles, $fix_utf8, $status);