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.
43 righe
1.6 KiB
43 righe
1.6 KiB
<? |
|
$configPath = substr(__DIR__, 0, strpos(__DIR__, "/public_html")) . "/config.php"; |
|
include_once($configPath); |
|
$error = true; |
|
if (!empty($_POST) && !empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice) && tokenVerify()) { |
|
$ente = Ente::getInfoFromID($_POST["codice"])[0] ?? null; |
|
if (!empty($ente)) { |
|
$error = false; |
|
if ($ente["oidc"] == "S" || $ente["oidc"] == "W") { |
|
?> |
|
swal({title:js_dict.attenzione,html:"<?= __("Già attivo o in corso di attivazione") ?>",type:"warning"}); |
|
<? |
|
} else { |
|
if (!empty($ente["codice_ipa"]) && !empty($ente["dominio"]) && Ente::validateDomainForTenant($ente["dominio"])) { |
|
$update = ["codice"=>$ente["codice"],"oidc" => "W"]; |
|
$salva = new salva(); |
|
$salva->debug = false; |
|
$salva->operazione = "UPDATE"; |
|
$salva->oggetto = $update; |
|
$salva->nome_tabella = "b_enti"; |
|
$salva->save(); |
|
?> |
|
swal({title:js_dict["success-msg"],type:"success"}).then(function(){ |
|
if (typeof entiTable !== "undefined") { |
|
entiTable.draw('page'); |
|
} else { |
|
refreshModalHelper(); |
|
} |
|
}); |
|
<? |
|
} else { |
|
?> |
|
swal({title:js_dict.attenzione,html:"<?= __("Dominio o codice IPA della piattaforma non valido") ?>",type:"warning"}); |
|
<? |
|
} |
|
} |
|
} |
|
} |
|
|
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
}
|
|
|