$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
if (!function_exists("fatal_handler")) {
function fatal_handler() {
$error = error_get_last();
if( $error !== NULL && ($error['type'] === E_ERROR || $error['type'] === E_USER_ERROR))
{
global $record;
?>
= $record["oggetto"] ?>
$offerta = $asta->ultimoRilancio();
if (!empty($offerta)) {
$check_hash = true;
$error = false;
$msg = "";
if (strpos($_POST["filechunk"], "../")===false) {
$chunkPath = $config["chunk_folder"]."/".$_SESSION["utente"]->codice."/".$_POST["filechunk"];
$p7m = new P7Manager($chunkPath);
if ($p7m !== false) {
$signed = true;
$esito = $p7m->checkSignatures();
if ($esito) {
$found = false;
$hashVerify = array();
if ($offerta["md5"] != "") { $hashVerify[] = $p7m->find($offerta["md5"],"md5",$signed); }
if ($offerta["sha1"] != "") { $hashVerify[] = $p7m->find($offerta["sha1"],"sha1",$signed); }
if ($offerta["sha256"] != "") { $hashVerify[] = $p7m->find($offerta["sha256"],"sha256",$signed); }
if (!empty($hashVerify) && in_array(false,$hashVerify)!==false) {
if ($p7m->find($offerta["shaContent"],"sha256",$signed,true)) {
$found = true;
}
} else {
$found = true;
}
if ($found) {
$path = $gara->getBustePath()."/asta";
if (!is_dir($path)) {
mkdir($path,0777,true);
}
$path .= "/rilancio" . $offerta["codice"] . "-" . sanitize_string($_POST["filechunk"]);
if (file_put_contents($path,$p7m->fileContent)) {
$offerta["verificata"] = "S";
$salva = new salva();
$salva->debug = false;
$salva->nome_tabella = "b_offerte_gare";
$salva->operazione = "UPDATE";
$salva->oggetto = $offerta;
$codice_offerta = $salva->save();
if (!empty($codice_offerta)) {
$asta->aggiornaGraduatoria();
alertManager::printSuccessBox(__('Operazione effettuata con successo'));
} else {
alertManager::printAlertBox(__('errore nel salvataggio offerta') . " - #009");
}
} else {
alertManager::printAlertBox(__('errore nel salvataggio offerta') . " - #008");
}
} else {
alertManager::printAlertBox(__('Errore riconoscimento offerta') . " - #007");
}
} else {
alertManager::printAlertBox(__('Errore firma digitale') . " - #005");
}
} else {
alertManager::printAlertBox(__("errore") . " " . __("upload") . " - #003");
}
} else {
alertManager::printAlertBox(__("errore") . " " . __("upload") . " - #002");
}
} else {
alertManager::printAlertBox(__('Impossibile continuare') . " - #000");
}
} else {
alertManager::printAlertBox(__('Impossibile continuare'));
}
?>
&codice_lotto== $lotto["codice"] ?>">
= __("Torna al pannello per continuare le operazioni") ?>
include_once ($root."/layout/bottom.php");
} else {
echo '