permission($radice,$_GET["codice"],$id_modulo) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"]) && !empty($_GET["codice_lotto"])) { $codice_round = $_GET["codice_round"] ?? NULL; $gara = gara::init($_GET["codice"],$codice_round); if (!empty($gara) && $gara->setLotto($_GET["codice_lotto"])) { $record = $gara->info; $round = $gara->round; $lotto = $gara->lotto; $lock = $gara->checkLock($cmd_info["id"]); $error = false; $partecipanti = $gara->getPartecipanti(); $return = array(); $return["draw"] = (int)$_GET["draw"]; $return["recordsTotal"] = (int)0; $return["recordsFiltered"] = (int)0; $return["data"] = []; if (count($partecipanti) > 0) { $return["recordsTotal"] = count($partecipanti); $return["recordsFiltered"] = count($partecipanti); $tipiBuste = gara::tipologieBusta(); $i = 0; $richieste = []; foreach($partecipanti AS $partecipante) { $i++; $row = []; $row[] = $i; $row[] = $partecipante["codice_fiscale"]; ob_start(); if(!empty($partecipante["codice_operatore"])) { ?> " onclick="showCompany(); return false"> $busta) { $label_locked = "Bloccata"; $color_locked = "warning"; $icon_locked = "lock"; if ($partecipante["escluso"] == "S") { $label_locked = "Non ammesso"; $color_locked = "disabled"; $icon_locked = "ban"; } if (!isset($richieste[$id_busta])) { $richieste[$id_busta] = $gara->getRichieste($id_busta); } if (!empty($richieste[$id_busta])) { ob_start(); reset($richieste[$id_busta]); $block = false; $aperte = 0; $presenti = 0; $emendamenti = false; $oscuramenti = false; $labelEmendamenti = "" . __("Emendamenti gestiti"); $classEmendamenti = "success"; $labelOscuramenti = "" . __("Oscuramenti gestiti"); $classOscuramenti = "success"; foreach($richieste[$id_busta] AS $richiesta) { $busta = $gara->getBusta($partecipante["codice"],$richiesta["codice"]); if (!empty($busta)) { if ($busta["segreta"] == "S") { $secretata = $gara->getBustaSecretata($partecipante["codice"],$richiesta["codice"],"busta"); if (!empty($secretata)) { $oscuramenti = true; if ($secretata["accettata"] == "W") { $labelOscuramenti = "" . __("Oscuramenti richiesti"); $classOscuramenti = "warning"; } } } $emendamento = $gara->getEmendamento($partecipante["codice"],$richiesta["codice"]); if (!empty($emendamento)) { if ($emendamento["segreta"] == "S") { $tmp = $gara->getBustaSecretata($partecipante["codice"],$richiesta["codice"],"emendamento"); if (!empty($tmp)) { $secretata = $tmp; } else { $emendamento = null; } } if (!empty($emendamento)) { $emendamenti = true; if ($emendamento["accettata"] == "W") { $labelEmendamenti = "" . __("Emendamenti richiesti"); $classEmendamenti = "warning"; if (!empty($secretata)) { $oscuramenti = true; if ($secretata["accettata"] == "W") { $labelOscuramenti = "" . __("Oscuramenti richiesti"); $classOscuramenti = "warning"; } } } } } if (!$block) { $block = !$gara->checkOpeningPermission($partecipante["codice"],$richiesta["codice"]); } $presenti++; if ($busta["open"] == "S") { $aperte++; } } } if ($presenti > 0) { if ($aperte == $presenti) { $bg_open = "info"; $label_open = "Visualizza"; $icon_open = "folder-open"; } else { $icon_open = "unlock"; if ($aperte > 0) { $bg_open = "primary"; $label_open = "Continua"; } else { $bg_open = "success"; $label_open = "Apri"; } } } else { $block = true; $label_locked = "Vuota"; $color_locked = "disabled"; $icon_locked = "circle"; } ?>