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.
76 righe
3.4 KiB
76 righe
3.4 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["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)) { |
|
if ($busta["open"] == "S" && $busta["accettata"] != "S") { |
|
$richiesta = $pdo->go("SELECT * FROM b_gare_richieste WHERE codice = :richiesta",[":richiesta"=>$busta["codice_richiesta"]])->fetch(PDO::FETCH_ASSOC); |
|
if (!empty($richiesta)) { |
|
$error = false; |
|
$partecipante = $gara->getPartecipante($_POST["partecipante"]); |
|
$pdo->go("UPDATE b_gare_emendamenti SET accettata = 'S', motivazione = '' WHERE codice = :richiesta",[":richiesta"=>$busta["codice"]]); |
|
scriviLog("b_gare_emendamenti","UPDATE",$pdo->getSQL(),$busta["codice"]); |
|
$gara->addToLog("ACCETTATO EMENDAMENTO",$richiesta["titolo"] . " " . $partecipante["ragione_sociale"]); |
|
$mailer = new Communicator(); |
|
$mailer->oggetto = __("Emendamento accettato") . ": ". $richiesta["titolo"]; |
|
$mailer->corpo = __("Si comunica l'avvenuta accettazione dell'emendamento del documento in oggetto"). "<br>" . |
|
__("Gara") . ": <strong>{$gara->info["oggetto"]}</strong><br>" . |
|
__("Lotto") . ": <strong>{$gara->lotto["cig"]} - {$gara->lotto["oggetto"]}</strong>"; |
|
$mailer->codice_pec = $gara->info["codice_pec"]; |
|
$mailer->comunicazione = true; |
|
$mailer->coda = true; |
|
$mailer->sezione = "gare"; |
|
$mailer->codice_gara = $gara->info["codice"]; |
|
$mailer->destinatari = oeManager::getOE($partecipante["codice_operatore"])["pec"] ?? $partecipante["pec"]; |
|
$esito = $mailer->send(); |
|
?> |
|
swal({title:js_dict["success-msg"],type:"success"}).then(function(){ |
|
tabofferte.draw(); |
|
backModalHelper(); |
|
}); |
|
<? |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
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(); |
|
} |
|
?>
|
|
|