permission($radice)) { if(! empty($_POST["codice"])) { $pacchetto = $pdo->go("SELECT * FROM b_conservazione WHERE codice = :codice LIMIT 0,1", [":codice" => $_POST["codice"]])->fetch(PDO::FETCH_ASSOC); if(! empty($pacchetto)) { if($pacchetto["stato"] == 110 || $pacchetto["stato"] == 90) { $pdo->go("UPDATE b_conservazione SET stato = :stato, utente_modifica = :utente_modifica WHERE codice = :codice", [":codice" => $pacchetto["codice"], ":stato" => 5, ":utente_modifica" => $_SESSION["utente"]->codice]); scriviLog("b_conservazione", "UPDATE", $pdo->getSQL(), $pacchetto["codice"]); if(! empty($_GET["recupera-file"])) { $result = shell_exec("php {$config["cmds_folder"]}/artisan job:dispatch Preservation/GetFilesJob -P {$_SESSION["ente"]->codice} -P {$pacchetto["codice"]} -Q preservation -C database -D now 2>&1"); } else { $result = shell_exec("php {$config["cmds_folder"]}/artisan job:dispatch Preservation/SendPackageJob -P {$_SESSION["ente"]->codice} -P {$pacchetto["codice"]} -Q preservation -C database -D \"{$pacchetto["timestamp_esecuzione"]}\" 2>&1"); } $result = preg_replace('~[[:cntrl:]]~', '', $result); if($result == "Job has been scheduled.") { die("table.ajax.reload(null, false);"); } } } } } HTTPStatus(403);