Non hai i permessi per visualizzare questo pannello."); } $codice = $_REQUEST["codice"] ?? null; $npa = NuovaPiattaformaAppalti::init(null, $codice); // Verifica utente if (!$npa->verifyUtente()) { debugPanelNotAvailable(); } $npa->disableLogs = true; if (empty($npa->fascicolo)) debugPanelNotAvailable(); if ( empty($npa->fascicolo) || empty($npa->scheda) || !$_SESSION["utente"]->isSupportoOrRoot() ) { debugPanelNotAvailable(); } $npa_fascicolo = NuovaPiattaformaAppalti::init($npa->fascicolo["codice"]); $dataFascicolo = unserialize($npa->fascicolo["data"]); if (isset($_POST["toggleFlag"])) { $flag = $_POST["toggleFlag"]; $dataFascicolo[$flag] = ($dataFascicolo[$flag] ?? false) ? false : true; $npa->updateFascicolo(["data" => serialize($dataFascicolo)]); } $abilitaModifiche = $dataFascicolo["abilita_modifica_appalto"] ?? false; $abilitaResync = $dataFascicolo["abilita_resync"] ?? false; if (DEVELOP_ENV && isset($_GET["fascicolo"]) && valid_json($_GET["fascicolo"], $modFascicolo, true)) { die($npa->updateFascicolo($modFascicolo) ? "OK" : "KO"); } if (DEVELOP_ENV && isset($_GET["scheda"]) && valid_json($_GET["scheda"], $modScheda, true)) { die($npa->updateScheda($modScheda) ? "OK" : "KO"); } if(!empty($npa->scheda["codice_lotto"])) { $npa->setLotto($npa->scheda["codice_lotto"]); } $npa->_loadSuggestions(); $scheda = $npa->scheda; $scheda["info"] = unserialize($scheda["info"]); unset($scheda["dati"]); // Forziamoci come RP per le richieste if (DEVELOP_ENV) { define("__CMDS_JOB_EXEC", true); } $server_data = $server_scheda = null; if (DEVELOP_ENV) { if (!empty($scheda["info"]->idAvviso)) { $server_data = $npa->readNotice(); } else { $server_data = $npa->read(); } } $server_scheda = $server_data->_scheda->body ?? null; function debugPanelProcessScheda($scheda) { if (isset($scheda->eform)) { try { $eform = base64_decode($scheda["eform"]); $eform_xml = new DOMDocument(); $eform_xml->loadXML($eform); $xpath10 = new DOMXPath($eform_xml); $scheda->eform_notice_id = $xpath10->evaluate("string(/*/cbc:ContractFolderID)"); } catch (\Throwable $t) {/* no */} } return $scheda; } if (!empty($server_scheda)) { $server_scheda = debugPanelProcessScheda($server_scheda); } $client_scheda = $npa->getCardData(); $npa->organizeRepeteableGroups($client_scheda); $client_scheda = debugPanelProcessScheda($client_scheda); $operations = $npa->getLastOperation(null, null, false, true); $logs = $npa->getAvailableLogs(); if(isset($_REQUEST["log"])) { $logs = $npa->retrieveLogs($_REQUEST["log"]); } $logs_fascicolo = $npa_fascicolo->getAvailableLogs(); if(isset($_REQUEST["log_fascicolo"])) { $logs = $npa_fascicolo->retrieveLogs($_REQUEST["log_fascicolo"]); } $suggestions = $npa->getSuggestions(); ?>
Piattaforma:
Tipologia di gara: = $procedura ?>
Valore economico dell'Appalto: = currency_format($npa->integration["GENERAL"]["prezzoRiferimento"] ?? 0, "EUR " )?>
fascicolo["id_appalto"])): ?>
idAppalto: = $npa->fascicolo["id_appalto"] ?>
fascicolo["id_pianificazione"])): ?>
idPianificazione: = $npa->fascicolo["id_pianificazione"] ?>
Scheda: = $npa->scheda["id_scheda"] ?>
scheda["errore"] == "SI") : ?>
getLastOperation(null, null, "KO");
$dictionary = $npa->getErrorsDictionary();
?>
errori)) { $errori = $errori->errori; }
if(!is_array($errori)) { $errori = [$errori]; }
foreach ($errori as $errore) {
$codice = $errore->codice ?? "SCONOSCIUTO";
$errorMessage = $dictionary[$errore->codice]["descrizione"]["it"] ?? "Errore sconosciuto " . json_encode($errore, JSON_PRETTY_PRINT) ;
$detail = $errore->dettaglio ?? null;
$timestamp = mysql2datetime($operazione["timestamp"]);
$tipoOperazione = ucfirst(strtolower(str_replace("_", " ", $operazione["operazione"])));
$message = "{$codice} - {$errorMessage}";
$message .= " - Errore registrato il {$timestamp} in fase di {$tipoOperazione}";
if(! empty($detail)) { $message .= "
{$detail}"; }
?>
Errore: = $message ?>
Govway Transaction id: = $transactionId ?>
Extra info:
Ultimo cantDoRequest: = $lastCantDoRequest["msg"] ?>
= $status ?>
= htmlspecialchars(json_encode($entry_json, JSON_PRETTY_PRINT)) ?>
= htmlspecialchars($entry) ?>
= htmlspecialchars(json_encode($entry, JSON_PRETTY_PRINT)) ?>
= print_r(htmlspecialchars(json_encode($client_scheda, JSON_PRETTY_PRINT)), true) ?>
= print_r(htmlspecialchars(json_encode($server_scheda, JSON_PRETTY_PRINT)), true) ?>