setLotto($lotto["codice"]); $hrefComandoStatus = $hrefComando . "&codice_lotto={$lotto["codice"]}"; if ($gara->pubblicaAtti($lotto["codice"])) { $statuses[] = "status-border-success"; } else if ($lotto["stato"] >= 50) { $statuses[] = "status-border-danger"; $alertManager->addDangerAlert(__("Lotto") . " " . $lotto["numero"] . " - " . __("Accesso agli atti non avviato"),$hrefComandoStatus); } $buste = $gara->getBusteSoggetteAccesso(); $__badgeLotto = 0; if (!empty($buste)) { foreach($buste AS $partecipante => $documenti) { $stato = array_column($documenti,"pubblica"); $stato = array_replace($stato,array_fill_keys(array_keys($stato, null),'W')); $stati = array_count_values($stato); if (!empty($stati["W"])) { $statuses[] = "status-border-danger"; $__badgeLotto += $stati["W"]; $__badgeBusteAccesso += $__badgeLotto; } } } if (!empty($__badgeLotto)) { $alertManager->addDangerAlert(__("Lotto") . " " . $lotto["numero"] . " - " . __("Documenti in attesa di pubblicazione") . ": " . $__badgeLotto,$hrefComandoStatus); } } $statuses = array_unique($statuses); if (count($statuses) === 1) { $status = $statuses[0]; } else { $status = "status-border-warning"; } $gara->lotto = null; } ?>