permission($radice)) { include_once ($beRoot."/layout/top.php"); $enti = $_SESSION["utente"]->getEntiBeneficiari(); $bind = array(":codice_ente"=>(!empty($_SESSION["utente"]->codice_ente)) ? $_SESSION["utente"]->codice_ente : $_SESSION["ente"]->codice); $sql = "SELECT b_gare.codice FROM b_gare JOIN (SELECT MAX(codice) AS last_round, codice_gara, scadenza FROM b_gare_round GROUP BY codice_gara) AS last_gara_round ON b_gare.codice = last_gara_round.codice_gara JOIN b_gare_round ON last_gara_round.last_round = b_gare_round.codice WHERE b_gare_round.scadenza < NOW() AND b_gare_round.scadenza > 0 AND b_gare.stato = 20"; $scadute = $pdo->go($sql); if ($scadute->rowCount() > 0) { while ($scaduta = $scadute->fetch(PDO::FETCH_ASSOC)) { $pdo->go("UPDATE b_gare SET stato = 21 WHERE stato = 20 AND codice = :codice",[":codice"=>$scaduta["codice"]]); } } ?>

checkLimite($radice,true); if ($proceed) { if (!$_SESSION["utente"]->readOnly) { $proceed = $_SESSION["utente"]->permission("gare.insert"); } else { $proceed = false; } } $bind = [":codice_gestore"=>$_SESSION["ente"]->codice]; $sql = "SELECT utente_creazione FROM b_gare WHERE codice > 0 "; if ($_SESSION["utente"]->gerarchia > 10) { $ids = Utente::getPermissionsInModulo($_SESSION["ente"]->codice,$_SESSION["utente"]->codice,"gare"); $ids = implode(",",$ids); $sql .= " AND codice IN ({$ids}) "; } if (!$_SESSION["utente"]->fromHere()) { $sql .= " AND codice_ente = :codice_ente "; $bind[":codice_ente"] = $_SESSION["utente"]->codice_ente; } $risultato = $pdo->go($sql,$bind); if ($proceed || ($risultato->rowCount() > 0 && !empty($enti))) { $stati = gara::getStati(); $utenti = Utente::getInfoFromID(array_unique($risultato->fetchAll(PDO::FETCH_COLUMN))); if(!empty($utenti)){ usort($utenti, function($a,$b) { return $a["cognome"] > $b["cognome"]; }); } ?>
hasModulo('rda')) : $rda = rda::getList(['codice_stato' => 10]); if(!empty($rda)) : ?> isSupportoOrRoot()) : ?> permission("npa-import")) : ?>
rowCount() > 0 && !empty($enti)) : ?>
1) : ?>
rowCount() > 0) { ?>

'; die(); } ?>