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.
26 righe
947 B
26 righe
947 B
<?php |
|
|
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
|
|
$connettore = json_decode($_SESSION["ente"]->getInfo()["conservazione"], true)["connettore"] ?? ""; |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice) && $_SESSION["utente"]->isSupportoOrRoot() && ! empty($connettore)) { |
|
|
|
$pacchetti = $pdo->go("SELECT codice FROM b_conservazione WHERE stato = 5 LIMIT 0,10"); |
|
if($pacchetti->rowCount() > 0) { |
|
|
|
while($pacchetto = $pacchetti->fetch(PDO::FETCH_ASSOC)) { |
|
|
|
$result = shell_exec("php {$config["cmds_folder"]}/artisan job:dispatch Preservation/SendPackageJob -P {$_SESSION["ente"]->codice} -P {$pacchetto["codice"]} -Q preservation -C database -D now 2>&1"); |
|
|
|
} |
|
|
|
} |
|
|
|
header("Location: {$_SERVER['HTTP_REFERER']}"); |
|
die(); |
|
|
|
} |
|
|
|
HTTPStatus(403); |
|
?><h1>Forbidden</h1><a href="/index.php"><?= __("Ritorna") ?></a><?
|