$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["valutazione"])) ) && !empty($_POST["codice_round"]) && !empty($_POST["partecipante"]) && !empty($_POST["codice_lotto"]) && !empty($_POST["richiesta"]) && tokenVerify()) { $valutazione = (empty($_POST["valutazione"])) ? NULL : "commissione"; $codice_round = $_POST["codice_round"]; $gara = gara::init($_POST["codice"],$codice_round,$valutazione); 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->getEmendamento($_POST["partecipante"],$_POST["richiesta"],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"] . " - " . __("Emendamento")); } } else { if (!empty($_POST["private"])) { $esito = $gara->decryptBusta($busta, $_POST["private"], "emendamento"); 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 "