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.
 
 
 
 
 

100 righe
4.4 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$id_modulo = "partecipanti";
$cmd_info = concorso::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;
$concorso = concorso::init($_GET["codice"],$codice_round);
if (!empty($concorso)) {
$record = $concorso->info;
if ($concorso->setLotto($_GET["codice_lotto"])) {
$lock = $concorso->checkLock($id_modulo);
$round = $concorso->round;
$error = false;
$partecipanti = $concorso->getPartecipanti();
$return = array();
$return["draw"] = (int)$_GET["draw"];
$return["recordsTotal"] = (int)0;
$return["recordsFiltered"] = (int)0;
$return["data"] = [];
if (count($partecipanti) > 0) {
$return["recordsTotal"] = count($partecipanti);
$return["recordsFiltered"] = count($partecipanti);
$i = 0;
foreach($partecipanti AS $partecipante) {
if ($partecipante["flagEncrypted"] == "N") {
$i++;
$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();
$raggruppamento = $concorso->getRaggruppamento($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();
if (!$lock) {
ob_start();
?>
<button onClick="showModalWithURL('edit.php?codice_concorso=<?= $record["codice"] ?>&codice_round=<?= $round["codice"] ?>&codice=<?= $partecipante["codice"] ?>&codice_lotto=<?= $concorso->lotto["codice"] ?>')" class="btn btn-sm btn-warning" title="<?= __('modifica') ?>"><span class="fa fa-edit"></span></button>
<?
$row[] = ob_get_clean();
} else {
$row[] = "";
}
if($_SESSION["ente"]->hasModulo("verifica-art-80")) {
ob_start();
Articolo80::printQuickRequestButton($partecipante["codice_fiscale"], ["cig" => $concorso->lotto["cig"], "cup" => $concorso->lotto["cup"], "valore_appalto" => $concorso->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);
}
}
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}