Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
84 righe
3.7 KiB
84 righe
3.7 KiB
<?php |
|
|
|
$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.<br>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(); } |
|
|
|
?> |
|
<div class="row"> |
|
<div class="col-12 mt-3 mb-4"> |
|
<span class="h3">ELENCO OPERATORI ECONOMICI</span> |
|
</div> |
|
</div> |
|
<div class="row"> |
|
<table class="table table-striped"> |
|
<thead> |
|
<tr> |
|
<th>CODICE FISCALE</th> |
|
<th>DENOMINAZIONE</th> |
|
<th></th> |
|
<th></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<?php foreach($participants as $participant) : ?> |
|
<?php $fvoe = FVOE::init([$participant["codice_fiscale"], $npa->lot["codice_lotto_npa"]], FVOEInizializationType::CF_E_CODICE_LOTTO); ?> |
|
<tr> |
|
<td class="align-middle"><?= $participant["codice_fiscale"] ?></td> |
|
<td class="align-middle"><?= $participant["ragione_sociale"] ?></td> |
|
<td class="align-middle"> |
|
<?php if($participant["aggiudicatario"] == "S") : ?><i class="fas fa-trophy mr-3"></i> AGGIUDICATARIO<? endif; ?> |
|
<?php if(isset($participant["isSubAppaltatore"])) : ?><i class="fas fa-level-down-alt mr-3"></i> SUBAPPALTATORE<? endif; ?> |
|
</td> |
|
<td class="text-right"> |
|
<? if($fvoe->isAccessible()) : ?> |
|
<? if (empty($fvoe->info["stato"])) : ?> |
|
<!-- Richiedere accesso --> |
|
<button type="button" class="btn btn-sm btn-info" onclick="showModalWithURL(`/backend/npa/ajax/fvoe-set-deadline.php?codice=<?= $npa->fascicolo['codice'] ?>&codice_lotto=<?= $npa->lot['codice_lotto_npa'] ?>&cf_partecipante=<?= $participant['codice_fiscale'] ?>`)"><?= __("Richiedi accesso FVOE") ?></button> |
|
<? elseif ($fvoe->info["stato"] == 10) : ?> |
|
<!-- Richiedere esito richiesta di accesso --> |
|
<button type="button" class="btn btn-sm btn-info" onclick="requestFvoeAccess('<?= $npa->fascicolo['codice'] ?>', '<?= $npa->lot['codice_lotto_npa'] ?>', '<?= $participant['codice_fiscale'] ?>')"><i class="fas fa-cog fa-spin mr-2"></i><?= __("Ottieni esito accesso FVOE") ?></button> |
|
<? elseif ($fvoe->info["stato"] >= 20) : ?> |
|
<!-- Accedere al pannello FVOE --> |
|
<a class="btn btn-sm btn-info" href="/backend/npa/fvoe/panel.php?codice=<?= $fvoe->info["codice"] ?>"><?= __("Pannello FVOE") ?></a> |
|
<? endif ?> |
|
<? else : ?> |
|
<button type="button" class="btn btn-sm btn-danger disabled" disabled><?= __("FVOE non disponibile") ?></button> |
|
<? endif ?> |
|
</td> |
|
</tr> |
|
<?php endforeach; ?> |
|
</tbody> |
|
</table> |
|
</div> |
|
<? |
|
die();
|