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.
32 righe
1.1 KiB
32 righe
1.1 KiB
<? |
|
$error =true; |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_POST["codice"]) && $_SESSION["utente"]->gerarchia <= 10) { |
|
|
|
$bind = array(":codice"=>$_POST["codice"]); |
|
$sql = "SELECT * FROM b_documentale WHERE codice = :codice "; |
|
if (!empty($_SESSION["ente"])) { |
|
$bind[":codice_gestore"]=$_SESSION["ente"]->codice; |
|
$sql .= " AND codice_gestore = :codice_gestore "; |
|
} |
|
$ris = $pdo->go($sql,$bind); |
|
if ($ris->rowCount() === 1) { |
|
$bind = array(":codice"=>$_POST["codice"]); |
|
$bind[":utente"] = $_SESSION["utente"]->codice; |
|
$sql = "UPDATE b_documentale SET attivo = 'N', soft_delete = 'S', utente_modifica = :utente WHERE codice = :codice "; |
|
$ris = $pdo->go($sql,$bind); |
|
if ($ris->rowCount() === 1) { |
|
$error = false; |
|
scriviLog("b_documentale","UPDATE",$pdo->getSQL(),$_POST["codice"]); |
|
?> |
|
window.location.reload(); |
|
<? |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
?>
|
|
|