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.
46 righe
1.9 KiB
46 righe
1.9 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$error = true; |
|
$cmd_info = concorso::getInfoModulo("buste"); |
|
if (!empty($_POST) && !empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"]) && $_SESSION["utente"]->permission($radice,$_POST["codice_concorso"],"buste") && tokenVerify()) { |
|
$concorso = concorso::init($_POST["codice_concorso"],$_POST["codice_round"]); |
|
if (!empty($concorso)) { |
|
$lock = $concorso->checkLock($cmd_info["id"]); |
|
if (!$lock) { |
|
$codice_richiesta = $concorso->saveRichiesta($_POST); |
|
if (!empty($codice_richiesta)) { |
|
$error = false; |
|
if (count($concorso->getLotti()) > 1 && empty($_POST["codice"])) { |
|
$showSuccess = false; |
|
if (isset($_POST["codice_lotto"])) { |
|
$concorso->bindRichiesta($codice_richiesta,[$_POST["codice_lotto"]]); |
|
?> |
|
swal({title:js_dict["success-msg"],html:'<?= __("Vuoi associare questa richiesta ad altri lotti?") ?>',type:"success",showCancelButton:true,confirmButtonText: '<?= __("Si") ?>',cancelButtonText: '<?= __("No") ?>'}).then((result) => { |
|
if (result.value) { |
|
showModalWithURL("/backend/concorsi/buste/lotti.php?codice=<?= $codice_richiesta ?>&codice_concorso=<?= $concorso->info["codice"] ?>&codice_round=<?= $concorso->round["codice"] ?>"); |
|
} else { |
|
window.location.reload(); |
|
} |
|
}); |
|
<? |
|
} else { |
|
$showSuccess = true; |
|
} |
|
} else { |
|
$showSuccess = true; |
|
} |
|
if ($showSuccess) { |
|
?> |
|
swal({title:js_dict["success-msg"],type:"success"}).then(function(){ window.location.reload() }); |
|
<? |
|
} |
|
} |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|