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.
186 righe
8.6 KiB
186 righe
8.6 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$id_modulo = "partecipanti"; |
|
$cmd_info = gara::getInfoModulo($id_modulo); |
|
$error = true; |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->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)) { |
|
$record = $gara->info; |
|
if ($gara->setLotto($_GET["codice_lotto"])) { |
|
$lock = $gara->checkLock($id_modulo); |
|
$round = $gara->round; |
|
$error = false; |
|
$partecipanti = $gara->getPartecipanti(); |
|
$return = array(); |
|
$return["draw"] = (int)$_GET["draw"]; |
|
$return["recordsTotal"] = (int)0; |
|
$return["recordsFiltered"] = (int)0; |
|
$return["data"] = []; |
|
$export = [["#","codice fiscale","ragione sociale","ruolo","escluso","anomalia","motivazione"]]; |
|
if (count($partecipanti) > 0) { |
|
$return["recordsTotal"] = count($partecipanti); |
|
$return["recordsFiltered"] = count($partecipanti); |
|
|
|
$i = 0; |
|
foreach($partecipanti as $partecipante) { |
|
$raggruppamento = $gara->getRaggruppamento($partecipante["codice"]); |
|
$avvalimento = $gara->getAvvalimento($partecipante["codice"]); |
|
$i++; |
|
$export[] = [ |
|
$i, |
|
$partecipante["codice_fiscale"], |
|
$partecipante["ragione_sociale"], |
|
(!empty($raggruppamento)) ? "04-CAPOGRUPPO" : "", |
|
$partecipante["escluso"], |
|
$partecipante["anomalia"], |
|
($partecipante["motivazione"] . " " . $partecipante["motivazione_anomalia"]) |
|
]; |
|
$row = []; |
|
$row[] = $i; |
|
$row[] = $partecipante["codice_fiscale"]; |
|
ob_start(); |
|
if(!empty($partecipante["codice_operatore"])) { ?> |
|
<a href="#" title="<?= __("visualizza") ?>" onclick="showCompany(<?= $partecipante['codice_operatore'] ?>); return false"> |
|
<? } ?> |
|
<strong><?= $partecipante["ragione_sociale"] ?></strong> |
|
<? if(!empty($partecipante["codice_operatore"])) { ?></a><? } |
|
$row[] = ob_get_clean(); |
|
ob_start(); |
|
if (!empty($raggruppamento)) { |
|
$j = 0; |
|
?> |
|
<div class="card card-body p-1 px-3"> |
|
<div class="m-1"><?= __("Raggruppamento") ?></div> |
|
<small> |
|
<table class="table table-striped table-condensed"> |
|
<thead> |
|
<tr> |
|
<th class="p-1"><?= __("Ruolo") ?></th> |
|
<th class="p-1"><?= __("Codice Fiscale") ?></th> |
|
<th class="p-1"><?= __("Ragione sociale") ?></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? foreach($raggruppamento as $membro) { |
|
$j++; |
|
$export[] = [ |
|
$i.".".$j, |
|
$membro["codice_fiscale_impresa"], |
|
$membro["ragione_sociale"], |
|
$membro["ruolo"], |
|
$partecipante["escluso"], |
|
$partecipante["anomalia"], |
|
($partecipante["motivazione"] . " " . $partecipante["motivazione_anomalia"]) |
|
]; |
|
?> |
|
<tr> |
|
<td width="200"><?= $membro["ruolo"] ?></td> |
|
<td width="200"><?= $membro["codice_fiscale_impresa"] ?></td> |
|
<td><?= $membro["ragione_sociale"] ?> |
|
<? |
|
if($_SESSION["ente"]->hasModulo("verifica-art-80")) { |
|
echo Articolo80::printQuickRequestButton($membro["codice_fiscale_impresa"], ["cig" => $gara->lotto["cig"], "cup" => $gara->lotto["cig"], "valore_appalto" => $gara->lotto["importoAggiudicazione"] ?? "0.00"]); |
|
} |
|
?> |
|
</td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
</small> |
|
</div> |
|
<? |
|
} |
|
if (!empty($avvalimento)) { |
|
$j = 0; |
|
?> |
|
<div class="card card-body p-1 px-3"> |
|
<div class="m-1"><?= __("Avvalimento") ?></div> |
|
<small> |
|
<table class="table table-striped table-condensed"> |
|
<thead> |
|
<tr> |
|
<th class="p-1"><?= __("Ruolo") ?></th> |
|
<th class="p-1"><?= __("Codice Fiscale") ?></th> |
|
<th class="p-1"><?= __("Ragione sociale") ?></th> |
|
<th class="p-1"><?= __("Sogg. Riferimento") ?></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<? foreach($avvalimento as $membro) { |
|
$j++; |
|
$export[] = [ |
|
$i.".".$j, |
|
$membro["codice_fiscale_impresa"], |
|
$membro["ragione_sociale"], |
|
$membro["ruolo"], |
|
$partecipante["escluso"], |
|
$partecipante["anomalia"], |
|
($partecipante["motivazione"] . " " . $partecipante["motivazione_anomalia"]) |
|
]; |
|
?> |
|
<tr> |
|
<td width="200"><?= gara::ruoloAvvalimento($membro["ruolo"]) ?></td> |
|
<td width="200"><?= $membro["codice_fiscale_impresa"] ?></td> |
|
<td><?= $membro["ragione_sociale"] ?> |
|
<? if($_SESSION["ente"]->hasModulo("verifica-art-80")) { |
|
echo Articolo80::printQuickRequestButton($membro["codice_fiscale_impresa"], ["cig" => $gara->lotto["cig"], "cup" => $gara->lotto["cig"], "valore_appalto" => $gara->lotto["importoAggiudicazione"] ?? "0.00"]); |
|
} ?> |
|
</td> |
|
|
|
<td><?= $membro["nome_padre"] ?? $partecipante["ragione_sociale"] ?></td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
</small> |
|
</div> |
|
<? |
|
} |
|
$row[] = ob_get_clean(); |
|
if (!$lock) { |
|
ob_start(); |
|
?> |
|
<button onClick="showModalWithURL('edit.php?codice_gara=<?= $record["codice"] ?>&codice_round=<?= $round["codice"] ?>&codice=<?= $partecipante["codice"] ?>&codice_lotto=<?= $gara->lotto["codice"] ?>')" class="btn btn-sm btn-warning" title="<?= __('modifica') ?>"><span class="fa fa-edit"></span></button> |
|
<? |
|
$row[] = ob_get_clean(); |
|
} else { |
|
$row[] = ""; |
|
} |
|
if (!$gara->getModalita()["online"] && $gara->canAddOrRemovePartecipanti()) { |
|
ob_start(); |
|
?> |
|
<button type="button" class="btn btn-danger btn-sm" onClick="elimina(<?= $partecipante["codice"] ?>,'gare/partecipanti','codice_gara=<?= $gara->info["codice"] ?>&codice_round=<?= $gara->round["codice"] ?>&codice_lotto=<?= $gara->lotto["codice"] ?>')"> |
|
<span class="fa fa-times"></span> |
|
</button> |
|
<? |
|
$row[] = ob_get_clean(); |
|
} else { |
|
$row[] = ""; |
|
} |
|
if($_SESSION["ente"]->hasModulo("verifica-art-80")) { |
|
ob_start(); |
|
Articolo80::printQuickRequestButton($partecipante["codice_fiscale"], ["cig" => $gara->lotto["cig"], "cup" => $gara->lotto["cup"], "valore_appalto" => $gara->lotto["importoAggiudicazione"] ?? "0.00", "button-title" => "Verifica Requisiti", "button-class" => "warning ml-auto"]); |
|
$row[] = ob_get_clean(); |
|
} else { |
|
$row[] = ""; |
|
} |
|
$return["data"][] = $row; |
|
} |
|
echo json_encode($return); |
|
$_SESSION["export-gare-partecipanti"][$_GET["token"]] = $export; |
|
} |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
}
|