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.
37 righe
1.6 KiB
37 righe
1.6 KiB
<?php |
|
|
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->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); |