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.
 
 
 
 
 

53 righe
1.3 KiB

<?php
ob_start();
$configPath = substr(__DIR__, 0, strpos(__DIR__, "/public_html")) . "/config.php";
include_once $configPath;
$codice = $_POST["codice"] ?? null;
if($codice == null) {
die_forbidden();
}
$npa = NuovaPiattaformaAppalti::init(null, intval($codice));
?>
<?php
// Verifica utente
if(!$npa->verifyUtente()) {
die_forbidden();
}
?>
<?php if (!empty($npa->fascicolo) && !empty($npa->scheda) ) : ?>
<?php
$result = $npa->resyncScheda($message);
// Catturiamo eventuali notice da PHP
$notices = trim(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
ob_get_clean();
HTTPStatus(403);
exit;