added lastLogins-Logging
This commit is contained in:
@@ -12,6 +12,14 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
|
||||
|
||||
require_once($config['basePath']."/config/cwsvJudo.config.php");
|
||||
require_once($config['basePath']."/config/phpcount.config.php");
|
||||
|
||||
$dbConnection = getPdoDbConnection(
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
$userData = getUserData($dbConnection, $_SESSION['user']['userId']);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -64,6 +72,11 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
|
||||
<li class="bold">
|
||||
<a class="waves-effect waves-teal" href="#Configs">UserInfos</a>
|
||||
</li>
|
||||
<?php if( isUserAdmin($dbConnection, $userData['id']) ){?>
|
||||
<li class="bold">
|
||||
<a class="waves-effect waves-teal" href="#Admin">adminStuff</a>
|
||||
</li>
|
||||
<?php }?>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
@@ -130,6 +143,42 @@ if($_SESSION['login']){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if( isUserAdmin($dbConnection, $userData['id']) ){?>
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="row" id="Admin">
|
||||
<div style="padding:1%;" class="col s12 m6">
|
||||
<div style="margin:1%;" class="card blue-grey darken-1">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">lastLogins</span>
|
||||
<img style="max-height:10vh;" class="responsive-img" src="images/account.svg" />
|
||||
<p>Die letzten Logins der einzelnen User</p>
|
||||
<?php $lastLogins=json_decode( file_get_contents("lastLogins.json"), true);?>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>userName</th>
|
||||
<th>lastLogins</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach( $lastLogins as $userName => $lastLogins ){ ?>
|
||||
<tr>
|
||||
<td><?php echo( $userName );?></td>
|
||||
<td><?php echo( $lastLogins['lastLogins'][0] );?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
||||
</main>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user