permission($radice,$_GET["codice"],$id_modulo) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"])) { $elenco = AlboCommissione::init($_GET["codice"]); if (!empty($elenco)) { $busta = $elenco->getVersionContentBusta($_GET["codice_partecipante"],$_GET["codice_richiesta"],$_GET["codice_versione"]); if (!empty($busta)) { if(!empty($busta["content"])) { $elenco->addToLog("DOWNLOAD","Partecipante #{$_GET["codice_partecipante"]} - Richiesta #{$_GET["codice_richiesta"]} - {$busta["nomeFile"]} - Versione {$busta["codice"]}"); header('Content-Description: File Transfer'); header('Content-Disposition: attachment; filename=' . str_replace("-",".",$busta["nomeFile"])); header('Content-Type: ' . $busta["mime"]); header('Content-Transfer-Encoding: binary'); header('Connection: Keep-Alive'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); echo $busta["content"]; $error = false; } } } } if ($error) { header('HTTP/1.0 403 Forbidden'); die(); } ?>