permission($radice)) { $enti = $_SESSION["utente"]->getEntiBeneficiari(false); if (!empty($enti[$_GET["ente"]])) { $ente = $enti[$_GET["ente"]]; if (is_numeric($_GET["anno"])) { $error = false; $path = anac::getXMLPath($ente["codice"],$_GET["anno"],(empty($_GET["gestore"])) ? false : true); $errori = anac::validateXML190($path); $linea_attuale = ""; adaptMemoryLimitToFile($path); $file_lines = preg_split("/((\r?\n)|(\r\n?))/", file_get_contents($path)); $messaggi = array(); foreach($errori AS $errore) { if (!isset($messaggi[$errore->line])) { $messaggi[$errore->line] = array(); } $messaggi[$errore->line][] = $errore->message; } $selectLotti = "SELECT b_simog_lotti.codice, b_simog_lotti.codice_simog, b_simog.smart_cig FROM b_simog_lotti JOIN b_simog ON b_simog_lotti.codice_simog = b_simog.codice WHERE b_simog.anno_riferimento = :anno AND b_simog_lotti.eliminato = 'N' AND b_simog.stato <> '90' AND cig = :cig "; if (!empty($_GET["gestore"])) { $selectLotti .= " AND b_simog.codice_gestore = :ente "; } else { $selectLotti .= " AND b_simog.codice_ente = :ente "; } $selectLotti .= " ORDER BY b_simog_lotti.codice "; $lotto = $pdo->prepare($selectLotti); $lotto->bindValue(":anno",$_GET["anno"]); $lotto->bindValue(":ente",$ente["codice"]); ?> ")!==false) { $cig = substr($file_lines[$linea],strpos($file_lines[$linea],"")+5,10); } else { $continue=true; $i = 0; while($continue) { $i++; if (!empty($file_lines[$linea-$i])) { if (strpos($file_lines[$linea-$i],"")!==false) { $cig = substr($file_lines[$linea-$i],strpos($file_lines[$linea-$i],"")+5,10); } else { if ((strpos($file_lines[$linea-$i],"")!==false) || (strpos($file_lines[$linea-$i],"")!==false)) { $continue = false; } } } else { $continue = false; } } } $href = ""; if(!empty($cig)) { $lotto->bindValue(":cig",$cig); $lotto->execute(); if ($lotto->rowCount() === 1) { $lot = $lotto->fetch(PDO::FETCH_ASSOC); if ($lot["smart_cig"] == "S") { $href = "/backend/anac/panel.php?codice={$lot["codice_simog"]}"; } else { $href = "/backend/anac/lotti/panel.php?codice_simog={$lot["codice_simog"]}&codice_lotto={$lot["codice"]}"; } } } ?>
CIG
0; $i--) { if (!empty($file_lines[$linea-$i])) { ?>