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.
 
 
 
 
 

90 righe
3.3 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
include_once "{$beRoot}/layout/top.php";
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission($radice)) {
?>
<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>
<?
$bind = array();
$sql = "SELECT
b_check_sessions.id,
b_check_sessions.sessionID,
b_check_sessions.ip,
b_check_sessions.timestamp,
b_utenti.cognome,
b_utenti.nome,
b_utenti.cf
FROM b_check_sessions
JOIN b_utenti ON b_check_sessions.codice_utente = b_utenti.codice
WHERE b_utenti.ruolo = 'USR'";
if (!empty($_SESSION["ente"])) {
$utenti = Ente::getUtentiFromModulo("guida",$_SESSION["ente"]->codice);
$sql .= " AND b_utenti.codice IN (".implode(",",$utenti).") ";
}
$ris_log = $pdo->go($sql,$bind);
if ($ris_log->rowCount() > 0) {
?>
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table class="table table-striped table-hover table-condensed" id="log" width="100%">
<thead>
<tr>
<th width="150">ID</th>
<th width="100">IP</th>
<th>User</th>
<th width="140">Timestamp</th>
</tr>
</thead>
<tbody>
<?php while($sess = $ris_log->fetch(PDO::FETCH_ASSOC)) :
$id = substr(simple_decrypt($sess["sessionID"],$config["simple_decrypt"]["session"]),0,6);
?>
<tr>
<td class="text-center"><?= $id ?></td>
<td><?= $sess["ip"] ?></td>
<td><?= $sess["cognome"] ?> <?= $sess["nome"] ?> | <?= $sess["cf"] ?></td>
<td><?= $sess["timestamp"] ?></td>
</tr>
<?php endwhile ?>
</tbody>
</table>
</div>
<script>
$("#log").DataTable({
"ordering": true,
"searching": true,
"info": true,
"processing": true,
"serverSide": false,
"language": {
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang"
},
"lengthMenu": [[25, 50, 100], [25, 50, 100]]
});
</script>
</div>
</div>
</div>
</div>
</div>
<?
}
include_once ($beRoot."/layout/bottom.php");
} else {
echo '<meta http-equiv="refresh" content="0;URL=/index.php">';
die();
}
?>