Zip($resourcesdir, $zipfile); if (is_file($zipfile)) { //Send the file for download! header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header( "Content-Disposition: attachment; filename=resources-survey-$surveyid.zip" ); header( "Content-Description: File Transfer"); @readfile($zipfile); //Delete the temporary file unlink($zipfile); } } if ($action == "exportlabelresources" && $lid) { require("classes/phpzip/phpzip.inc.php"); $z = new PHPZip(); $resourcesdir=$uploaddir. "/upload/labels/$lid/"; $zipfile="$tempdir/resources-labelset-$lid.zip"; $z -> Zip($resourcesdir, $zipfile); if (is_file($zipfile)) { //Send the file for download! header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header( "Content-Disposition: attachment; filename=resources-label-$lid.zip" ); header( "Content-Description: File Transfer"); @readfile($zipfile); //Delete the temporary file unlink($zipfile); } } ?>