$error = true; $configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; include_once($configPath); if (!empty($_SESSION["utente"]) && !empty($_SESSION["ente"]) && !empty($_GET["codice"])) { $comunicazione = Communicator::getMessage($_GET["codice"]); if (!empty($comunicazione) > 0) { $error = false; ?>
if (!empty($_SESSION["utente"]->oe)) { $update = $pdo->prepare("UPDATE r_comunicazioni_utenti SET r_comunicazioni_utenti.letto = 'S' WHERE codice_comunicazione = :codice AND codice_operatore = :codice_operatore "); $update->bindValue(":codice_operatore",$_SESSION["utente"]->oe["codice"]); $update->bindValue(":codice",$comunicazione["codice"]); $update->execute(); if ($update->rowCount() > 0) { ?> } } $comunicazione["corpo"] = preg_replace('/(http.+)\/allegati\/open\.php\?codice\=/',"/allegati/open.php?codice=", $comunicazione["corpo"]); if (strpos($comunicazione["corpo"],"https://www.tuttogare.it/documenti/allegati/")) { // GESTIONE ECCEZIONE PER LINK PRESENTI IN COMUNICAZIONE DERIVANTI DA MIGRAZIONE $re = '/https:\/\/www\.tuttogare\.it\/documenti\/allegati\/([0-9]+)\/(.+)"/m'; preg_match_all($re, $comunicazione["corpo"], $matches, PREG_SET_ORDER, 0); if (!empty($matches)) { foreach($matches AS $match) { $newID = getMatchFrom2($match[1],"b_gare"); if (!empty($newID)) { $newFile = $pdo->go("SELECT * FROM b_fileManager WHERE sourceID = :id AND name = :titolo ",[":id"=>$newID,":titolo"=>$match[2]])->fetch(PDO::FETCH_ASSOC); if (!empty($newFile)) { $url = filesManager::getAttachURL($newFile,$newFile["sourceID"],$newFile["sourceType"],0); if (!empty($url)) { $comunicazione["corpo"] = str_replace($match[0],$url.'"',$comunicazione["corpo"]); } } } } } } if (isset($comunicazione["protocollo_interno"])) { ?>