".__('Not Allowed!','download-manager').""; die(); }
$dir = urldecode($_POST['dir']);
if (file_exists($dir)) {
$files = scandir($dir);
natcasesort($files);
if (count($files) > 2) { /* The 2 accounts for . and .. */
echo "";
// All dirs
foreach ($files as $file) {
if ($file != '.' && $file != '..' && file_exists($root . $dir . $file) && is_dir($root . $dir . $file)) {
echo "- " . htmlentities($file) . "
";
}
}
// All files
foreach ($files as $file) {
$abspath = realpath($root.'/'.$dir.'/'.$file);
$relpath = $root === '/' ? $abspath : str_replace($root, "", $abspath);
if ($file != '.' && $file != '..' && $file != '.htaccess' && file_exists($abspath) && !is_dir($abspath)) {
$ext = preg_replace('/^.*\./', '', $file);
$abspath = str_replace(UPLOAD_DIR, '', $abspath);
echo "- " . htmlentities($file) . "
";
}
}
echo "
";
}
}
die();
}
function wpdm_file_browser(){
//if($_GET['task']!='wpdm_file_browser') return;
?>