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.
39 righe
1.5 KiB
39 righe
1.5 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$error = true; |
|
$id_modulo = "modelliGara"; |
|
$cmd_info = gara::getInfoModulo($id_modulo); |
|
if (!empty($_POST) && !empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"]) && $_SESSION["utente"]->permission($radice,$_POST["gara"],$id_modulo) && tokenVerify()) { |
|
$gara = gara::init($_POST["gara"],$_POST["round"]); |
|
if (!empty($gara)) { |
|
$modello = $gara->getModelli($_POST["codice"]); |
|
if (!empty($modello) && (empty($_POST["lotto"]) || $gara->setLotto($_POST["lotto"]))) { |
|
$lock = $gara->checkLockModello($modello["codice"]); |
|
if (!$lock) { |
|
$idRiferimento = "gare-{$gara->info["codice"]}-{$gara->round["codice"]}"; |
|
if (!empty($gara->lotto)) { |
|
$idRiferimento .= "-{$gara->lotto["codice"]}"; |
|
} |
|
$record = $gara->info; |
|
$round = $gara->round; |
|
$error = false; |
|
$editor = new editorManager($modello["tipo"],$idRiferimento); |
|
if ($editor->delete()) { |
|
?> |
|
swal({title:js_dict["success-msg"],type:"success"}).then(function(){ window.location.reload(); }); |
|
<? |
|
} else { |
|
?> |
|
swal({title:"<?= __("Errore nella rielaborazione") ?>",type:"error"}); |
|
<? |
|
} |
|
} |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|