.
Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
@ini_set('memory_limit', -1);
verifyAction('DOWNLOADDIR');
checkAccess('DOWNLOADDIR');
$path = RoxyFile::FixPath(trim($_GET['d']));
verifyPath($path);
$path = fixPath($path);
if(!class_exists('ZipArchive')){
echo '';
}
else{
try{
$filename = basename($path);
$zipFile = $filename.'.zip';
$zipPath = BASE_PATH.'/tmp/'.$zipFile;
RoxyFile::ZipDir($path, $zipPath);
header('Content-Disposition: attachment; filename="'.$zipFile.'"');
header('Content-Type: application/force-download');
readfile($zipPath);
function deleteTmp($zipPath){
@unlink($zipPath);
}
register_shutdown_function('deleteTmp', $zipPath);
}
catch(Exception $ex){
echo '';
}
}
?>