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.
 
 
 
 
 

119 righe
4.0 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice)) {
include_once ($beRoot."/layout/top.php");
$stati = consulenza::getStati();
$consulenze = consulenza::getList();
?>
<div class="container-fluid pt-5 pb-3">
<div class="row">
<div class="col-12">
<h2>
<?= Modulo::header($radice) ?>
</h2>
</div>
</div>
</div>
<?
$proceed = false;
if (isset($_SESSION["ente"])) {
$proceed = consulenza::checkLimite($_SESSION["ente"]->codice);
}
?>
<div id="commands" class="mb-5">
<div class="commands container-fluid">
<div class="row justify-content-between">
<?
$col = "";
if (count($consulenze) > 0) {
$col = "col-md-6" ?>
<div class="col-12 col-md-6">
<label><?= __("Stato") ?></label>
<select name="status" id="filtroStatus" onChange="table.draw();">
<option value=""><?= __("Tutti") ?></option>
<?
foreach($stati AS $stat => $stato) {
if (isset($_SESSION["ente"]) || $stat > 0) {
?>
<option style="border-left: 5px solid <?= $stato["color"] ?>" value="<?= $stat ?>">
<?= __($stato["titolo"]) ?>
</option>
<?
}
}
?>
</select>
</div>
<? } ?>
<div class="col-12 <?= $col ?> text-right">
<? if ($proceed) { ?>
<a href="/backend/<?= $radice ?>/edit.php?codice=0" class="btn btn-success" title="<?= __('Aggiungi nuovo') ?>"><span class="fa fa-plus-circle"></span> <?= __('Aggiungi nuovo') ?></a>
<? } ?>
</div>
</div>
</div>
</div>
<?
if (!empty($consulenze)) {
?>
<div class="card mb-2">
<div class="card-body">
<div class="table-responsive">
<h2 id="table-title"></h2>
<table class="table table-striped table-hover" id="tab-data" width="100%">
<thead>
<tr>
<th width="10"></th>
<th width="150"></th>
<th width="10"><?= __("ID") ?></th>
<th><?= __("Oggetto") ?></th>
<th width="100"><?= __("Data creazione") ?></th>
<th width="100"><?= __("Data ultima modifica") ?></th>
<th width="5"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<script>
var table = $("#tab-data").DataTable({
"processing": true,
"serverSide": true,
"language": {
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang"
},
"ajax": {
"url": "table.php",
"data": function (d) {
d.stato = $('#filtroStatus').val();
}
},
"order": [[2,'desc']],
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, '<?= __("tutti") ?>']],
"columns": [
{ "orderable": false },
null,
null,
null,
null,
null,
{ "orderable": false }
]
});
</script>
<?
} else {
alertManager::printWarningBox(__("Nessun risultato"));
}
include_once ($beRoot."/layout/bottom.php");
} else {
echo '<meta http-equiv="refresh" content="0;URL=/index.php">';
die();
}
?>