Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2267 → Rev 2268

/web/acc/admin_log.php
6,13 → 6,15
$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]), 0, 2));
}
 
if ($Language === 'fr') {
$l_title_amdin_log = "Connexion à l'ALCASAR Control Center (ACC)";
$l_title = "Connexion à l'ALCASAR Control Center (ACC)";
$l_user = "Utilisateur";
$l_ip_address = "Adresse IP";
} else {
$l_title_amdin_log = "Connection to ALCASAR Control Center (ACC)";
$l_title = "Connection to ALCASAR Control Center (ACC)";
$l_user = "User";
$l_ip_address = "IP address";
}
 
// Read access log
$accessLogs = [];
$accessLogFilename = '/var/Save/security/acc_access.log';
48,51 → 50,49
}
 
?>
<!doctype html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta charset="utf-8">
<title>Admin Logs</title>
<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<style>
body {
background-color: #EFEFEF;
}
</style>
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<center>
<h3><?= $l_title_amdin_log ?></h3>
</center>
<table class="table table-striped">
<thead>
<tr>
<th>Date</th>
<th>User</th>
<th>IP address</th>
<th>Agent</th>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><? echo "$l_title";?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
<thead>
<tr>
<th>Date</th>
<th><?=$l_user?></th>
<th><?=$l_ip_address?></th>
<th>Agent</th>
</tr>
</thead>
<tbody>
<?php if (empty($accessLogs)): ?>
<tr>
<td colspan="4"><center>Empty</center></td>
</tr>
<?php else: ?>
<?php foreach ($accessLogs as $access): ?>
<tr>
<td><?= $access->date ?></td>
<td><?= $access->username ?></td>
<td><?= $access->ip ?></td>
<td><?= $access->user_agent ?></td>
</tr>
</thead>
<tbody>
<?php if (empty($accessLogs)): ?>
<tr>
<td colspan="3"><center>Empty</center></td>
</tr>
<?php else: ?>
<?php foreach ($accessLogs as $access): ?>
<tr>
<td><?= $access->date ?></td>
<td><?= $access->username ?></td>
<td><?= $access->ip ?></td>
<td><?= $access->user_agent ?></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</body>
</html>