".__('attach_error')."";
// } else {
// // Delete temporal file
// unlink ($_FILES['file']['tmp_name']);
// }
//
// }
//}
//if ($delete_file) {
// $filename = (string) get_parameter ('filename');
// echo "
".__('Deleting')." ".$filename."
";
// if (is_dir ($filename)) {
// rmdir ($filename);
// } else {
// unlink ($filename);
// }
//}
$directory = (string) get_parameter ('directory', "/");
//// CREATE DIR
//if ($create_dir) {
// $dirname = (string) get_parameter ('dirname');
// if ($dirname) {
// @mkdir ($directory.'/'.$dirname);
// echo ''.__('Created directory %s', $dirname).'
';
// }
//}
// A miminal security check to avoid directory traversal
if (preg_match ("/\.\./", $directory))
$directory = "images";
if (preg_match ("/^\//", $directory))
$directory = "images";
if (preg_match ("/^manager/", $directory))
$directory = "images";
/* Add custom directories here */
$fallback_directory = "images";
$banned_directories['include'] = true;
$banned_directories['godmode'] = true;
$banned_directories['operation'] = true;
$banned_directories['reporting'] = true;
$banned_directories['general'] = true;
$banned_directories[ENTERPRISE_DIR] = true;
if (isset ($banned_directories[$directory]))
$directory = $fallback_directory;
// Current directory
$available_directories[$directory] = $directory;
$real_directory = realpath ($config['homedir'].'/'.$directory);
//filemanager_box_upload_file_explorer($real_directory, $directory);
echo ''.__('Index of %s', $directory).'
';
filemanager_file_explorer($real_directory, $directory, 'index.php?sec=gsetup&sec2=godmode/setup/file_manager');
?>