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.
 
 
 
 
 

106 righe
4.0 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
if (isset($_SESSION["utente"]) && !empty($_SESSION["utente"]->oe)) {
if (!empty($_GET["modulo"]) && !empty($_GET["codice_elemento"])) {
$moduloInfo = Modulo::getInfo($_GET["modulo"]);
if (!empty($moduloInfo)) {
$breadcrumb = [];
$breadcrumb["/{$_GET["modulo"]}"] = $moduloInfo["titolo"];
if (is_numeric($_GET["codice_elemento"])) {
$breadcrumb["/{$_GET["modulo"]}/dettaglio.php?codice={$_GET["codice_elemento"]}"] = __("Dettaglio");
}
$breadcrumb[] = __("Richieste e integrazioni");
}
}
include($root."/layout/top.php");
?>
<div class="container-fluid">
<h1><?= __("Richieste e integrazioni") ?></h1>
<?
$manager = new publicRichiesteOE($_GET["modulo"]??null,$_GET["codice_elemento"]??null,$_GET["sub"]??0);
$richieste = $manager->getRichieste();
if (!empty($richieste)) {
$stati = ["attivi"=>["titolo"=>"Attivi","color"=>"#0C0"],"archivio"=>["titolo"=>"Archivio","color"=>"#F33"]];
?>
<div class="btn-group-toggle mb-2" data-toggle="buttons">
<?
$first = true;
foreach($stati AS $stat => $stato) {
?>
<label style="border-bottom: 5px solid <?= $stato["color"] ?>" id="stato-<?= $stat ?>-button" class="btn btn-default">
<input type="radio" name="status" <?= ($first) ? "checked" : "" ?> value="<?= $stat ?>" onChange='tableRichieste.draw();' autocomplete="off">
<span class='label-html'>
<?= __($stato["titolo"]) ?>
</span>
</label>
<?
$first = false;
}
?>
</div>
<div class="card">
<div class="card-body">
<table class="table table-striped table-hover" width="100%" id="table-richiesteOE">
<thead>
<tr>
<th width="10"></th>
<th width="100"></th>
<th width="200"></th>
<th><?= __("Oggetto") ?></th>
<th width="130"><?= __("Data richiesta") ?></th>
<th width="130"><?= __("Scadenza") ?></th>
<th width="10"></th>
</tr>
</thead>
<tbody >
</tbody>
</table>
<script>
var tableRichieste = $("#table-richiesteOE").DataTable({
"processing": true,
"serverSide": true,
"language": {
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang"
},
"ajax": {
"url": "/richieste/table-list.php",
"data": function (d) {
d.modulo = "<?= $manager->modulo ?>",
d.codice_elemento = "<?= $manager->elemento ?>",
d.sub = "<?= $manager->sub ?>",
d.stato = $('input[name=status]:checked').val()
}
},
"order": [[5,"asc"]],
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, '<?= __("tutti") ?>']],
"columns": [
{ "orderable": false },
{ "orderable": false },
{ "orderable": false },
null,
null,
null,
{ "orderable": false }
]
});
</script>
</div>
</div>
<?
} else {
alertManager::printWarningBox(__("Nessun risultato"));
}
?>
</div>
<?
include($root."/layout/bottom.php");
} else {
header('HTTP/1.0 403 Forbidden');
die();
}
?>