oe) && !$_SESSION["utente"]->isSupporto() && tokenVerify($_GET["token"])) { $managerRisposta = publicRispostaDocumentale::init($_GET['codice']); if(!empty($managerRisposta)){ $error = false; $file = $managerRisposta->getFile(); if(!empty($file['dir']) && !empty($file['file'])){ adaptMemoryLimitToFile($file["file"]); $content = simple_decrypt(file_get_contents($file["file"]),base64_decode($file["content"])); } if (!empty($content)) { header('Content-Description: File Transfer'); header('Content-Type: ' . $file["mime"]); header('Content-Disposition: attachment; filename='.str_replace("-",".",$file["nomeFile"])); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); echo $content; }else { $error = true; } } } if($error) { header('HTTP/1.0 403 Forbidden'); die(); } ?>