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.
66 righe
2.5 KiB
66 righe
2.5 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$error = true; |
|
$error_detail = ""; |
|
$id_modulo = "open"; |
|
$cmd_info = gara::getInfoModulo($id_modulo); |
|
if (!empty($_SESSION["utente"]) |
|
&& $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"],$_POST["codice"],$id_modulo) |
|
&& !empty($_POST["codice_round"]) |
|
&& !empty($_POST["partecipante"]) |
|
&& !empty($_POST["codice_lotto"]) |
|
&& !empty($_POST["richiesta"]) |
|
&& tokenVerify()) { |
|
$codice_round = $_POST["codice_round"]; |
|
$gara = gara::init($_POST["codice"],$codice_round); |
|
if (!empty($gara) && $gara->setLotto($_POST["codice_lotto"])) { |
|
$record = $gara->info; |
|
$round = $gara->round; |
|
if ($gara->checkOpeningPermission($_POST["partecipante"],$_POST["richiesta"])) { |
|
$aggiuntive = false; |
|
$parent = $gara->getBusta($_POST["partecipante"],$_POST["richiesta"],$aggiuntive,false); |
|
if ($parent["open"] == "S") { |
|
$busta = $gara->getBustaSecretata($_POST["partecipante"],$_POST["richiesta"],$_POST["derivazione"],true); |
|
if (!empty($busta)) { |
|
$richiesta = $gara->getRichiesta($busta["codice_richiesta"]); |
|
$partecipante = $gara->getPartecipante($busta["codice_partecipante"]); |
|
if ($busta["open"] == "S") { |
|
if ($gara->downloadBusta($busta)) { |
|
$error = false; |
|
$gara->addToLog("DOWNLOAD",$richiesta["titolo"] . " - " . $partecipante["codice_fiscale"] . " " . $partecipante["ragione_sociale"] . " - " . __("Oscurato")); |
|
} |
|
} else { |
|
if (!empty($_POST["private"])) { |
|
$esito = $gara->decryptBusta($busta, $_POST["private"], "segreto"); |
|
if ($esito === true) { |
|
$error = false; |
|
$gara->addToLog("OPEN",$richiesta["titolo"] . " - " . $partecipante["codice_fiscale"] . " " . $partecipante["ragione_sociale"]. " - " . __("Oscurato")) |
|
?> |
|
$("#wait_div").show(); |
|
refreshModalHelper(); |
|
tabofferte.draw(); |
|
<? |
|
} else { |
|
$error_detail = $esito; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
if ($error) { |
|
if (empty($error_detail)) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
echo "<h1>FORBIDDEN</h1>"; |
|
} else { |
|
?> |
|
swal({title:js_dict.error,html:"<?= $error_detail ?>",type:"error"}); |
|
<? |
|
} |
|
die(); |
|
} |
|
?>
|
|
|