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.
 
 
 
 
 

121 righe
4.7 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
if (isset($_SESSION["utente"]) && !empty($_SESSION["utente"]->oe)) {
$modulo = modulo::getInfo($radice);
$enti = $_SESSION["ente"]->entiBeneficiari();
$breadcrumb = [];
$breadcrumb["/gare/index.php"] = $modulo["titolo"];
$breadcrumb[""] = __("Area personale");
include_once($root."/layout/top.php");
?>
<div class="container-fluid">
<h1><?= __("Gare e affidamenti") ?></h1>
<?
$list = publicGara::getList($_SESSION["ente"]->codice);
if (!empty($list)) {
$stati = ["bozza"=>["titolo"=>"Bozza","color"=>"#AAA"],"inviti"=>["titolo"=>"Inviti","color"=>"#33F"],"aggiudicati"=>["titolo"=>"Aggiudicati","color"=>"#0C0"],"archivio"=>["titolo"=>"Archivio","color"=>"#F33"]];
?>
<div class="row">
<div class="col-12 col-md-6">
<div class="btn-group-toggle mb-2" data-toggle="buttons">
<?
$first = true;
foreach($stati AS $stat => $stato) {
$count = count(publicGara::getList($_SESSION["ente"]->codice,["b_gare.stato"=>$stat],[],0,-1));
?>
<label style="border-bottom: 5px solid <?= $stato["color"] ?>" id="stato-<?= $stat ?>-button" class="btn btn-default">
<input type="radio" name="status" <?= ($count > 0 && $first) ? "checked" : "" ?> value="<?= $stat ?>" onChange='table.draw();' autocomplete="off">
<span class='label-html'>
<?= __($stato["titolo"]) ?>
<?
if ($count > 0) {
$first = false;
?>
<span class="badge badge-primary"><?= $count ?></span>
<?
}
?>
</span>
</label>
<?
}
?>
</div>
</div>
<div class="col-12 col-md-6 text-right">
<a href="/gare/index.php" class="btn btn-info">
<?= __("Visualizza tutti") ?>
</a>
</div>
</div>
<div class="card card-body m-1">
<div class="table-responsive">
<h2 id="table-title"></h2>
<table class="table table-condensed table-striped table-hover" id="tab-data" width="100%">
<thead>
<tr>
<th width="10"></th>
<th width="10"></th>
<th width="10"><?= __("ID") ?></th>
<th width="10"><?= __("CIG") ?></th>
<th><?= __("Oggetto") ?></th>
<th width="200"><?= __("Valore totale") ?></th>
<th width="100"><?= __("Pubblicazione") ?></th>
<th width="100"><?= __("Scadenza") ?></th>
<? if (count($enti) > 1) { ?><th><?= __("Beneficiario") ?><? } ?>
<th width="10"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<script>
var table = $("#tab-data").DataTable({
"processing": true,
"serverSide": true,
"language": {
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang"
},
"ajax": {
"url": "/gare/table.php",
"data": function (d) {
d.stato = $('input[name=status]:checked').val();
}
},
"order": [[2,'desc']],
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, '<?= __("tutti") ?>']],
"columns": [
{ "orderable": false },
{ "orderable": false },
null,
null,
null,
null,
null,
null,
<? if (count($enti) > 1) { ?>{ "orderable": false },<? } ?>
{ "orderable": false }
]
});
</script>
<?
} else {
?>
<div class="row">
<div class="offset-lg-3 col-lg-6 col-12">
<?= alertManager::printWarningBox(__("Nessun risultato")); ?>
</div>
</div>
<?
}
?>
</div>
<?
include_once($root."/layout/bottom.php");
}
?>