permission($radice)) { $enti = $_SESSION["utente"]->getEntiBeneficiari(false); if ($enti !== false) { if (count($enti) > 1 && !isset($_GET["ente"])) { $error = false; ?>
codice])) { ?> $ente) { ?>
codice; } else { if (isset($_GET["ente"])) { if ($_GET["ente"] === "0") { $gestore = true; $ente = $_SESSION["ente"]->codice; } else { $ente = $enti[$_GET["ente"]]["codice"]; } } } if (isset($ente)) { $error = false; $selectAnni = "SELECT anno_riferimento FROM b_simog "; $selectLotti = "SELECT count(b_simog_lotti.codice) AS tot 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' "; if ($gestore) { $selectAnni .= " WHERE codice_gestore = :ente "; $selectLotti .= " AND b_simog.codice_gestore = :ente "; } else { $selectAnni .= " WHERE codice_ente = :ente "; $selectLotti .= " AND b_simog.codice_ente = :ente "; } $selectAnni .= " GROUP BY anno_riferimento ORDER BY anno_riferimento DESC"; $anni = $pdo->go($selectAnni,[":ente"=>$ente]); $lotti = $pdo->prepare($selectLotti); $lotti->bindValue(":ente",$ente); if ($anni->rowCount() > 0) { ?>

fetch(PDO::FETCH_ASSOC)) { $anno = $anno["anno_riferimento"]; $lotti->bindValue(":anno",$anno); $lotti->execute(); if ($lotti->rowCount() > 0) { $path = anac::getXMLPath($ente,$anno,$gestore); ?>
URL
fetch(PDO::FETCH_ASSOC)["tot"] ?>