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(); ?>

Strumenti di debug

metadataSchede[$npa->scheda["id_scheda"]]; ?> integration["MODULO"] ?? "Sconosciuta"; if(!empty($npa->integration["PROCEDURA"]["titolo"])) { $procedura = $npa->integration["PROCEDURA"]["titolo"]; } if(method_exists($npa->oggetto, "getSogliaGara")) { $soglia = $npa->oggetto->getSogliaGara(); $procedura .= " - $soglia"; } if(method_exists($npa->oggetto, "getRisposteElaborazione")) { $elaborazione = $npa->oggetto->getRisposteElaborazione(); if(!empty($elaborazione["settoreRiferimento"])) { $procedura .= " - Settore {$elaborazione["settoreRiferimento"]}"; } } if(!empty($npa->scheda["info"])) { $infoScheda = unserialize($npa->scheda["info"]); $transactionId = $infoScheda->lastTransactionID ?? ""; $lastCantDoRequest = $infoScheda->lastCantDoRequest ?? []; } ?> Piattaforma:
Tipologia di gara:
Valore economico dell'Appalto: integration["GENERAL"]["prezzoRiferimento"] ?? 0, "EUR " )?>
fascicolo["id_appalto"])): ?> idAppalto: fascicolo["id_appalto"] ?>
fascicolo["id_pianificazione"])): ?> idPianificazione: fascicolo["id_pianificazione"] ?>
Scheda: 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:
Govway Transaction id:

Extra info:
Ultimo cantDoRequest:
fascicolo ?? []) ?> check) ?>
$entry) { if($name === "request") { foreach(explode("\n", $entry) as $line) { if(str_starts_with($line, "Agid-JWT-TrackingEvidence: ")) { $line = str_replace("Agid-JWT-TrackingEvidence: ", "", $line); list($headersB64, $payloadB64, $sig) = explode('.', $line); $log["jwt"] = json_decode(base64_decode($payloadB64), true); foreach(["traceID", "spanID", "aud", "iss", "jti", "iat", "nbf", "exp"] as $e) { if(isset($log["jwt"][$e])) unset($log["jwt"][$e]); } } } } } ?>

$entry): ?> :
$path) : ?>
Log Fascicolo:
$path) : ?>
"danger", "OK" => "success"][$operation["esito"]] ?? "secondary"; // Ottieni info utente (con cache per evitare mille query) $idUtente = $operation["utente_modifica"]; if ($idUtente > 0) { $utente = $__cache_info_utente[$idUtente] ?? false; if ($utente === false) { $utente = Utente::getInfoFromID($idUtente); $__cache_info_utente[$idUtente] = $utente; } } $info_utente = empty($utente) ? $operation["utente_modifica"] : "{$utente["nome"]} {$utente["cognome"]} - ID {$utente["codice"]}"; // Ottieni risultato $risultato = unserialize($operation["risultato"]); // Rendi associativo if (!empty($risultato)) { $risultato = json_decode(json_encode($risultato), true); } ?>
[] -
Effettuata da
Matches: Integration: integration)) dump($npa->integration) ?>