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.
 
 
 
 
 

31 righe
1.3 KiB

<?php
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
if (!empty($_SESSION["utente"]) &&
$_SESSION["utente"]->ruolo == "SAD" &&
!empty($_POST["token"]) &&
!empty($_POST["class"]) &&
tokenVerify()
) {
if ($_POST["action"] == "save_settings") {
$current_settings = json_decode($_SESSION["ente"]->getInfo()[Integrazione::INFO_NAME], true);
$current_settings[$_POST["class"]] = $_POST[$_POST["class"]];
$current_settings = json_encode($current_settings);
$pdo->go(
"UPDATE b_enti SET ".Integrazione::INFO_NAME." = :settings WHERE codice = :codice",
[":codice" => $_SESSION["ente"]->codice, ":settings" => $current_settings]
);
?>
swal({title:js_dict["success-msg"],type:"success"}).then(function(){ window.location.reload(); });
<?php
die();
}
$integration = Integrazione::to_snake_case($_POST["class"]);
if (method_exists($_SESSION["ente"]->{$integration}, $_POST["action"])) {
$function_name = sanitize_string($_POST["action"], [], "-", false);
$_SESSION["ente"]->{$integration}->{$function_name}($_REQUEST);
die();
}
}
http_response_code(401);