getLotti(); $ok = 0; $totaleLotti = count($checkLotti); if (!empty($checkLotti)) { foreach($checkLotti AS $checkLotto) { $hrefLotto = $hrefComando . "&codice_lotto=" . $checkLotto["codice"]; if ($gara->setLotto($checkLotto["codice"])) { $contratti = $gara->getContratti(); $signed = 0; if (!empty($contratti)) { $statuses[] = "status-border-warning"; foreach($contratti AS $contratto) { if ($contratto["stato"] >= 30) { $signed++; } } } if (count($contratti) >= count($gara->getImportoAggiudicazionePartecipanti()) && (count($contratti) == $signed)) { $statuses[] = "status-border-success"; } } } $statuses = array_unique($statuses); if (!empty($statuses)) { if (count($statuses) === 1) { $status = $statuses[0]; } else { $status = "status-border-warning"; } } else { $status = "status-border-danger"; } $gara->lotto = null; } } ?>