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.
 
 
 
 
 

45 righe
1.1 KiB

<?php
ob_start();
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once $configPath;
$codice = $_POST["codice"] ?? $_GET["codice"];
$npa = NuovaPiattaformaAppalti::init($codice);
// Verifica utente
if(!$npa->verifyUtente()) {
die_forbidden();
}
$npa->verifyDelega();
if(! empty($npa->fascicolo["codice"])) {
$error = true;
$result = $npa->getCIG($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;
}
?>
swal({
title: <?= $result ? 'js_dict["success-msg"]' : 'js_dict.attenzione' ?>,
html: <?= $result ? 'js_dict["success-msg"]' : (empty($message) ? 'js_dict["error-retry"]' : "`{$message}`")?>,
type: "<?= $result ? "success" : "error" ?>"
}).then(function(){
window.location.reload();
});
<?
exit;
}
HTTPStatus(403);
exit;