setLotto($_GET["codice_lotto"])) { $partecipante = $gara->miaPartecipazione(); if (!empty($partecipante)) { $busteDisponibili = $gara->getBusteSoggetteAccesso(); if (!empty($busteDisponibili[$_GET["codice_partecipante"]][$_GET["codice_richiesta"]])) { $busta = $gara->getBustaAccesso($_GET["codice_richiesta"],$_GET["codice_partecipante"],true); if (!empty($busta) && $busta["pubblica"]=="S") { $content = $busta["content"]; } } } } if ($content !== false) { if (P7Manager::bustaEstensioneSoloP7M($busta["nomeFile"])) { $ext = getTypeAndExtension($file_content,true); $busta["nomeFile"] = str_replace(".p7m", "{$ext["ext"]}", $busta["nomeFile"]); } header('Content-Type: ' . $busta["mime"]); header('Content-Disposition: attachment; filename='.str_replace("-",".",$busta["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 { header('HTTP/1.0 403 Forbidden'); echo __("Errore nella richiesta"); die(); } } ?>