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.8 KiB
53 righe
1.8 KiB
<? |
|
$error = true; |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"public_html/"))."config.php"; |
|
include_once($configPath); |
|
$id_modulo = "schede"; |
|
$cmd_info = anac::getInfoModulo($id_modulo); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"]) && $_SESSION["utente"]->permission($radice,$_POST["codice_simog"],$id_modulo)) { |
|
$anac = anac::init($_POST["codice_simog"]); |
|
if (!empty($anac)) { |
|
$codice_lotto = $_POST["codice_lotto"]; |
|
$schede = $anac->getSchede($codice_lotto); |
|
foreach($schede AS $tmp) { |
|
if ($tmp["codice"] == $_POST["codice"]) { $scheda = $tmp; } |
|
} |
|
if (!empty($scheda)) { |
|
if (empty($scheda["response_id"])) { |
|
$scheda["stato"] = 99; |
|
} else { |
|
$scheda["stato"] = 97; |
|
} |
|
$salva = new salva(); |
|
$salva->debug = false; |
|
|
|
$salva->nome_tabella = "b_simog_schede"; |
|
$salva->operazione = "UPDATE"; |
|
$salva->oggetto = array("codice"=>$scheda["codice"],"stato"=>$scheda["stato"]); |
|
$codice = $salva->save(); |
|
if (!empty($codice)) { |
|
$error = false; |
|
?> |
|
swal({title:js_dict["success-msg"],type:"success"}).then(function(){ |
|
<? |
|
if ($scheda["stato"] == "97") { |
|
?> |
|
showModalWithURL('/backend/anac/send.php?token=<?= tokenGen() ?>&method=deleteSchede&codice=<?= $anac->info["codice"] ?>&codice_lotto=<?= $codice_lotto ?>'); |
|
<? |
|
} else { |
|
?> |
|
window.location.reload(); |
|
<? |
|
} |
|
?> |
|
}); |
|
<? |
|
} |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|