$configPath = substr(__DIR__, 0, strpos(__DIR__, "/public_html")) . "/config.php";
include_once $configPath;
function ___not_available() {
alertManager::printWarningBox("FVOE non disponibile", "Attenzione, il Fascicolo Virtuale dell'Operatore Economico non è disponibile.
Si prega di riprovare");
exit;
}
$codice = $_GET["codice"] ?? null;
$npa = NuovaPiattaformaAppalti::init($codice);
if (empty($npa->fascicolo) || ! $_SESSION["utente"]->permission("fvoe")) { ___not_available(); }
$codice_lotto = $_GET["codice_lotto"] ?? null;
$npa->setLotto($codice_lotto);
if(empty($npa->lot["codice"]) || empty($npa->lot["cig"]) || ! $npa->hasLockOnPartecipanti(false, true, $npa->lot["codice_lotto_npa"])) { ___not_available(); }
$aggiudicatari = false;
$cards = $npa->getConfirmedCards(false);
$schede = array_column($cards, "id_scheda");
foreach ($schede as $scheda) {
if(strpos($scheda, "AD") === 0) {
$aggiudicatari = true;
break;
}
}
$participants = null;
$participants = $npa->getPartecipanti($aggiudicatari, true, true, true);
if(empty($participants)) { ___not_available(); }
$participants = array_column($participants, null, "codice_fiscale");
if(empty($participants[$_GET["cf_partecipante"]])) { ___not_available(); }
$participant = $participants[$_GET["cf_partecipante"]];
?>