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.
 
 
 
 
 

75 righe
2.6 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$error = true;
$id_modulo = "preliminari";
if (!empty($_POST) && !empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_POST["codice"],$id_modulo) && tokenVerify() && $_SESSION["utente"]->unlockSupporto()) {
$error = false;
if (!empty($_POST["codice"])) {
$check = concorso::init($_POST["codice"]);
$lotti = $check->getLotti();
}
if (!empty($_POST["cpv"]) || !empty($lotti)) {
if (!empty($_POST["fase"])) {
if ($_SESSION["ente"]->checkLimite($radice) || $_POST["codice"] > 0) {
$entiAbilitati = $_SESSION["utente"]->getEntiBeneficiari(false);
$checkEnte = false;
foreach($entiAbilitati AS $ente) {
if ($_POST["codice_ente"] == $ente["codice"]) {
$checkEnte = true;
break;
}
}
if ($checkEnte) {
$concorso = concorso::save($_POST);
if (is_a($concorso,"concorso")) {
if (!$_SESSION["ente"]->checkLimite($radice) && empty($_POST["codice"])) {
$_SESSION["ente"]->sendAlertLimite($radice);
}
?>
swal({title:js_dict["success-msg"],type:"success"}).then(function(){
window.location.href="/backend/concorsi/panel.php?codice=<?= $concorso->info["codice"] ?>";
});
<?
} else {
if ($concorso === -1) {
?>
swal({title:js_dict.error,html:"<?= __("Errore nella generazione della chiave") ?>",type:"error"});
<?
} else {
?>
swal({title:js_dict.error,html:js_dict["error-generic"],type:"error"});
<?
}
}
} else {
?>
swal({title:js_dict.error,html:"<?= __("Ente non abilitato") ?>",type:"error"});
<?
die();
}
} else {
?>
swal({title:js_dict.error,html:"<?= __("Limite di procedure raggiunto") ?>",type:"error"});
<?
die();
}
} else {
?>
swal({title:js_dict.error,html:"<?= __("Fasi") . " " . __("obbligatorio") ?>",type:"error"});
<?
die();
}
} else {
?>
swal({title:js_dict.error,html:"<?= __("categorie merceologiche") . " " . __("obbligatorio") ?>",type:"error"});
<?
die();
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>