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.
 
 
 
 
 

50 righe
1.4 KiB

<?php
ob_start();
$configPath = substr(__DIR__, 0, strpos(__DIR__, "/public_html")) . "/config.php";
include_once $configPath;
$codice = $_POST["codice"] ?? $_GET["codice"];
$id_scheda = $_POST["id_scheda"] ?? $_GET["scheda"];
$npa = NuovaPiattaformaAppalti::init(null, $codice, $id_scheda);
// Verifica utente
if(!$npa->verifyUtente()) {
die_forbidden();
}
?>
<?php if (!empty($npa->fascicolo)) : ?>
<?php if (!empty($npa->scheda) && !empty($npa->scheda["codice_rettifica"])) : ?>
<?php
$npa->verifyDelega();
$result = $npa->rectify($message);
// Catturiamo eventuali notice da PHP
$notices = ob_get_clean();
if (!empty($notices)) :
?>
swal({
title: js_dict.attenzione ?>,
html: `<?= htmlspecialchars($notices) ?>`,
type: "error"
}).then(function(){
window.location.reload();
});
<?php exit; ?>
<?php endif; ?>
swal({
title: <?= $result ? 'js_dict["success-msg"]' : (str_starts_with($message, "INFO -") ? "`Informazione`" : "js_dict.attenzione") ?>,
html: <?= $result ? 'js_dict["success-msg"]' : "`{$message}`" ?>,
type: "<?= $result ? "success" : (str_starts_with($message, "INFO -") ? "info" : "error") ?>"
}).then(function(){
window.location.reload();
});
<?php exit; ?>
<?php endif;?>
<?php endif;?>
<?php
ob_get_clean();
HTTPStatus(403);
exit;