gestione gare pubbliche
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

34 righe
788 B

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$path = $_SESSION["communicatoriArchivePaths"][$_GET["tokenEsportazione"]];
$error = true;
if (!empty($_SESSION["utente"]) && !empty($_SESSION["ente"]) && file_exists($path)) {
$error = false;
$zip = file_get_contents($path);
unlink($path);
header('Content-Description: File Transfer');
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename=' . basename($path));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
echo $zip;
die();
}
if($error){
header('HTTP/1.0 403 Forbidden');
die();
}
?>