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.
152 righe
4.8 KiB
152 righe
4.8 KiB
<? |
|
$_cdir = __DIR__; |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
|
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice)) { |
|
$required_css[] = "/src/css/extra/files.css"; |
|
$required_js[] = "/src/js/extra/files.js"; |
|
|
|
include_once "{$beRoot}/layout/top.php"; |
|
?> |
|
<div class="container-fluid pt-5"> |
|
<div class="row"> |
|
<div class="col-12"> |
|
<p class="d-block display-4"> |
|
<?= Modulo::header($radice) ?> |
|
</p> |
|
</div> |
|
</div> |
|
</div> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands"> |
|
<div class="row"> |
|
<div class="col-12 d-flex justify-content-end"> |
|
<? /* |
|
<a href="javascript:void(0)" onclick="showModalWithURL('/backend/guue/create.php');" class="btn btn-success" title="<?= __guue('Aggiungi nuovo') ?>"><i class="fa fa-plus-circle mr-3"></i><?= __guue('Aggiungi nuovo') ?></a><br> |
|
*/ ?> |
|
<?if ($_SESSION["utente"]->isSupportoOrRoot() || $config["developEnv"]){?> |
|
<a href="javascript:void(0)" onclick="forceUpdate()" class="btn btn-primary mx-2"> |
|
<i class="fas fa-sync"></i> <?=__guue('Aggiorna tutti i form')?> |
|
</a> |
|
<? if ($_SESSION["utente"]->isSupportoOrRoot()) { ?> |
|
<button class="btn btn-warning" onClick="showModalWithURL('/backend/enti/settings.php?gruppo=guue'); return false"><span class="fa fa-cogs"></span> <?= __guue("Impostazioni") ?></button> |
|
<? } ?> |
|
<?}?> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<?php alertManager::printInfoCompact("Le pubblicazioni legate ad appalti trasmessi tramite BDNCP possono essere gestite direttamente nel pannello ANAC di riferimento della procedura"); ?> |
|
<div class="row"> |
|
<div class="col-12"> |
|
<div class="card"> |
|
<div class="card-body"> |
|
<? |
|
$bind = []; |
|
$sql = "SELECT codice FROM b_guue WHERE soft_delete = 'N'"; |
|
|
|
if (! $_SESSION["utente"]->fromHere()) { |
|
|
|
$sql = "{$sql} AND codice_ente = :codice_ente"; |
|
$bind[":codice_ente"] = $_SESSION["utente"]->codice_ente; |
|
|
|
} |
|
|
|
if ($_SESSION["utente"]->gerarchia > 10 && (settingsManager::getValue("visibilitaGUUE",$_SESSION["ente"]->codice) == "N")) { |
|
|
|
$ids = Utente::getPermissionsInModulo($_SESSION["ente"]->codice,$_SESSION["utente"]->codice,"guue"); |
|
$ids = implode(",",$ids); |
|
$sql = "{$sql} AND b_guue.codice IN ({$ids})"; |
|
} |
|
$risultato = $pdo->go($sql,$bind); |
|
if ($risultato->rowCount() > 0) { |
|
?> |
|
<div class="table-responsive"> |
|
<table class="table table-striped table-hover table-condensed" id="tab-data" width="100%"> |
|
<thead> |
|
<tr> |
|
<th width="10"><?= __guue("Stato") ?></th> |
|
<th width="200"><?= __guue("Tipologia") ?></th> |
|
<th width="20">ID</th> |
|
<th><?= __guue("Titolo") ?></th> |
|
<th width="150"></th> |
|
<th width="120"></th> |
|
<th width="10"></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
</tbody> |
|
</table> |
|
</div> |
|
<script> |
|
$("#tab-data").DataTable({ |
|
"processing": true, |
|
"serverSide": true, |
|
"language": { |
|
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang" |
|
}, |
|
"ajax": "table.php", |
|
"order": [[0,'DESC'],[3,'ASC']], |
|
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, '<?= __guue("tutti") ?>']], |
|
"columns": [ |
|
{ "orderable": true }, |
|
{ "orderable": true }, |
|
{ "orderable": true }, |
|
{ "orderable": false }, |
|
{ "orderable": false }, |
|
{ "orderable": false }, |
|
{ "orderable": false } |
|
], |
|
"drawCallback": function(settings, json) { |
|
$('[data-toggle="tooltip"]').tooltip(); |
|
} |
|
}); |
|
</script> |
|
<? |
|
} else { |
|
?> |
|
<h3 class="alert alert-warning text-center"> |
|
<span class="fa fa-exclamation-triangle fa-2x"></span><br> |
|
<?= __guue("Nessun risultato"); ?> |
|
</h3> |
|
<? |
|
} |
|
?> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<?if ($_SESSION["utente"]->isSupportoOrRoot() || $config["developEnv"]){?> |
|
<script type="text/javascript"> |
|
function forceUpdate(codice) { |
|
$.ajax({ |
|
type: "POST", |
|
url: "/backend/guue/sync.php", |
|
dataType: "html", |
|
data: { |
|
codice: codice |
|
}, |
|
beforeSend: function() { |
|
$("#wait_div").show(); |
|
} |
|
}) |
|
.fail(function(response){ |
|
swal(js_dict["error-retry"]); |
|
}) |
|
.done(function(response){ |
|
$("#tab-data").DataTable().ajax.reload(); |
|
}) |
|
.always(function(){ |
|
$("#wait_div").slideUp('fast'); |
|
}) |
|
} |
|
</script> |
|
<?}?> |
|
<? |
|
include_once "{$beRoot}/layout/bottom.php"; |
|
} else { |
|
echo '<meta http-equiv="refresh" content="0;URL=/index.php">'; |
|
die(); |
|
} |
|
?>
|
|
|