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.
 
 
 
 
 

149 righe
4.6 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"public_html/"))."config.php";
include_once($configPath);
if (isset($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice)) {
include_once($root."/backend/layout/top.php");
$bind = [":codice_gestore"=>$_SESSION["ente"]->codice];
$sql = "SELECT codice FROM b_simog WHERE codice_gestore = :codice_gestore ";
if ($_SESSION["utente"]->gerarchia > 10) {
$ids = Utente::getPermissionsInModulo($_SESSION["ente"]->codice,$_SESSION["utente"]->codice,"anac");
$ids = implode(",",$ids);
$sql .= " AND codice IN ({$ids}) ";
}
if (!$_SESSION["utente"]->fromHere()) {
$sql .= " AND codice_ente = :codice_ente ";
$bind[":codice_ente"] = $_SESSION["utente"]->codice_ente;
}
$risultato = $pdo->go($sql,$bind);
$stati = anac::getStati();
?>
<div class="container-fluid pt-5 pb-3">
<div class="row">
<div class="col-12">
<h2>
<?= Modulo::header($radice) ?>
</h2>
</div>
</div>
</div>
<div id="commands" class="mb-5">
<div class="commands container-fluid">
<? if ($risultato->rowCount() > 0) { ?>
<div class="row justify-content-between">
<div class="col-12 col-md-3">
<label><?= __("Stato") ?></label>
<select name="status" id="filtroStatus" onChange="table.draw();">
<option value=""><?= __("Tutti") ?></option>
<?
foreach($stati AS $stat => $stato) {
?>
<option style="border-left: 5px solid <?= $stato["color"] ?>" value="<?= $stat ?>">
<?= __($stato["titolo"]) ?>
</option>
<?
}
?>
</select>
</div>
<div class="col-12 col-md-9 text-right">
<? } else { ?>
<div class="text-right">
<?} ?>
<? if (!$_SESSION["utente"]->readOnly) { ?>
<?
if ($_SESSION["utente"]->permission("simog")) {
$anac = new anac;
$anac->printLoginButton();
?>
<button class="btn btn-primary" onClick="showModalWithURL('import.php');"><span class="fa fa-download"></span> <?= __("Importa da CIG") ?></button>
<?
}
?>
<button class="btn btn-info" onClick="showModalWithURL('190/modal.php');"><span class="fa fa-code"></span> XML L. 190/2012</button>
<?
/* if ($_SESSION["utente"]->gerarchia <= 10) {
// $mancanti = count(anac::getProcedureMancanti());
// if (!empty($mancanti)) {
// ?>
// <button class="btn btn-danger" onClick="showModalWithURL('utility/confirmImport.php');"><span class="fa fa-download"></span> <?= __("Importa procedure mancanti") ?> <span class="badge"><?= $mancanti ?></span></button>
// <?
// }
}
*/
if ($_SESSION["utente"]->gerarchia === 1) {
?>
<button class="btn btn-danger" onClick="showModalWithURL('utility/index.php');"><span class="fa fa-cogs"></span> <?= __("Avanzate") ?></button>
<?
}
?>
<? } ?>
</div>
</div>
</div>
</div>
<?
if ($risultato->rowCount() > 0) {
?>
<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><?= __("Oggetto") ?></th>
<th width="150"><?= __("Lotti") ?></th>
<th width="100"><?= __("Anno") ?></th>
<th><?= __("Ente") ?></th>
<th width="10"></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": [[1,'desc']],
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, '<?= __("tutti") ?>']],
"drawCallback": function( settings ) {
$('[data-toggle="tooltip"]').tooltip();
},
"columns": [
null,
null,
null,
{ "class": "text-center", "orderable": false },
{ "class": "text-center" },
null,
{ "orderable": false }
]
});
</script>
<?
} else {
alertManager::printWarningBox(__("Nessun risultato"));
}
include_once($root."/backend/layout/bottom.php");
} else {
echo '<meta http-equiv="refresh" content="0;URL=/index.php">';
die();
}
?>