gestione gare pubbliche
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.
 
 
 
 
 

85 righe
3.6 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$id_modulo = "partecipanti";
$cmd_info = anac::getInfoModulo($id_modulo);
$error = true;
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice,$_GET["codice"],$id_modulo) && $_SESSION["utente"]->permission($cmd_info["modulo_riferimento"])) {
$anac = anac::init($_GET["codice"]);
if (!empty($anac)) {
$lotto = $_GET["codice_lotto"];
$partecipanti = $anac->getPartecipantiLotto($lotto);
$return = array();
$return["draw"] = (int)$_GET["draw"];
$return["recordsTotal"] = (int)0;
$return["recordsFiltered"] = (int)0;
$return["data"] = [];
if (count($partecipanti) > 0) {
$error = false;
$return["recordsTotal"] = count($partecipanti);
$return["recordsFiltered"] = count($partecipanti);
$i = 0;
foreach($partecipanti AS $partecipante) {
$i++;
$row = [];
$row[] = $i;
$row[] = ($partecipante["aggiudicatario"] == "S") ? "<span class='fa fa-trophy'></span>" : "";
$row[] = $partecipante["codice_fiscale"];
$row[] = (($partecipante["aggiudicatario"] == "S") ? "<span class='badge badge-success'>".__("Aggiudicatario")."</span><br>" : "") . "<strong>{$partecipante["ragione_sociale"]}</strong>";
ob_start();
$raggruppamento = $anac->getRaggruppamento($lotto,$partecipante["codice"]);
if (!empty($raggruppamento)) {
?>
<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) {
?>
<tr>
<td width="200"><?= $membro["ruolo"] ?></td>
<td width="200"><?= $membro["codice_fiscale_impresa"] ?></td>
<td><?= $membro["ragione_sociale"] ?></td>
</tr>
<?
}
?>
</tbody>
</table>
</small>
</div>
<?
}
$row[] = ob_get_clean();
ob_start();
?>
<button type="button" class="btn btn-warning btn-sm" onClick="showModalWithURL('edit.php?codice_simog=<?= $anac->info["codice"] ?>&codice_lotto=<?= $partecipante["codice_lotto"] ?>&codice=<?= $partecipante["codice"] ?>');">
<span class="fa fa-edit"></span>
</button>
<?
$row[] = ob_get_clean();
ob_start();
?>
<button type="button" class="btn btn-danger btn-sm" onClick="elimina(<?= $partecipante["codice"] ?>,'anac/lotti/partecipanti','codice_simog=<?= $anac->info["codice"] ?>&codice_lotto=<?= $partecipante["codice_lotto"] ?>')">
<span class="fa fa-times"></span>
</button>
<?
$row[] = ob_get_clean();
$return["data"][] = $row;
}
echo json_encode($return);
}
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}