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.
90 righe
3.1 KiB
90 righe
3.1 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"); |
|
$bind = [":codice_gestore"=>$_SESSION["ente"]->codice ?? 0]; |
|
$sql = "SELECT codice FROM b_documentale WHERE (codice_gestore = :codice_gestore OR codice_gestore = 0) AND soft_delete = 'N'"; |
|
$risultato = $pdo->go($sql,$bind); |
|
?> |
|
<div class="container-fluid pt-5 pb-3"> |
|
<div class="row"> |
|
<div class="col-12"> |
|
<h2> |
|
<?= Modulo::header($radice) ?> |
|
</h2> |
|
</div> |
|
</div> |
|
</div> |
|
<? if ($_SESSION["utente"]->gerarchia <= 10 && !$_SESSION["utente"]->readOnly) { ?> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid"> |
|
<div class="text-right"> |
|
<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> |
|
<? } ?> |
|
<? |
|
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><?= __("Titolo") ?></th> |
|
<th width="200"><?= __("Ultima modifica") ?></th> |
|
<th width="5"></th> |
|
<? if ($_SESSION["utente"]->gerarchia <= 10) { ?> |
|
<th width="5"></th> |
|
<th width="5"></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" |
|
}, |
|
"order": [[1,'desc']], |
|
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, '<?= __("tutti") ?>']], |
|
"columns": [ |
|
null, |
|
null, |
|
null, |
|
{ "orderable": false }, |
|
<? if ($_SESSION["utente"]->gerarchia <= 10) { ?> |
|
{ "orderable": false }, |
|
{ "orderable": false }, |
|
{ "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(); |
|
} |
|
?>
|
|
|