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.
 
 
 
 
 

38 righe
1.5 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$content = false;
if (!empty($_SESSION["utente"]) && !empty($_GET["codice_richiesta"]) && !empty($_GET["codice_lotto"]) && tokenVerify($_GET["token"])) {
$codice_round = $_GET["codice_round"] ?? NULL;
$gara = publicGara::init($_GET["codice_gara"],$codice_round);
if (!empty($gara) && $gara->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();
}
}
?>