16,8 → 16,10 |
} |
|
$tab = (isset($_GET['tab'])) ? intval($_GET['tab']) : 1; |
|
?> |
<!DOCTYPE html> |
|
|
<html> |
<head> |
<meta charset="UTF-8"> |
25,6 → 27,7 |
<link rel="stylesheet" href="/css/bootstrap.min.css"> |
<script src="/js/jquery.min.js"></script> |
<script src="/js/bootstrap.min.js"></script> |
<link rel="stylesheet" href="style.css"> |
<style> |
body { |
background-color: #EFEFEF; |
31,8 → 34,25 |
} |
</style> |
</head> |
|
<body> |
<br> |
<table class="tableTop" border=0 cellspacing=0 cellpadding=0 > |
<tbody > |
<tr> |
<th class="thBasicACC"> |
<?echo "$l_title";?> |
</th> |
</tr> |
<tr bgcolor="#FFCC66" class="trSizeACC"> |
<td class="tdSizeACC"> |
<img src="/images/pix.gif" width=1 height=2> |
</td> |
</tr> |
</tbody> |
</table> |
|
<div class="frameBorderACC"> |
|
<div class="btn-group btn-group-justified" role="group" aria-label="Justified button group"> |
<a href="security.php?tab=1" class="btn btn-default<?= (($tab === 1) ? ' active' : '') ?>" role="button"><?= $l_spoofing ?></a> |
<a href="security.php?tab=2" class="btn btn-default<?= (($tab === 2) ? ' active' : '') ?>" role="button"><?= $l_virus ?></a> |
67,12 → 87,23 |
|
$spoofs = array_reverse($spoofs); |
?> |
<h3 style="text-align: center;"><?= $l_spoofing ?></h3> |
<h3 style="text-align: center;"><?= $l_spoofing ?></h3> |
<div class="container"> |
<table class="table table-striped table-hover"> |
<thead> |
<tr><th>Date</th><th><?= $l_ipAddress ?></th><th>MAC</th><th><?= $l_user ?></th></tr> |
</thead> |
<table style='font-family: "DejaVu Sans";font-size: small;color: #666650;' class="table table-striped tableBis table-hover" border="1"> |
<tr> |
<th class="thSecurityBis" > |
Date |
</th> |
<th class="thSecurityBis"> |
<?= $l_ipAddress ?> |
</th> |
<th class="thSecurityBis"> |
MAC |
</th> |
<th class="thSecurityBis"> |
<?= $l_user ?> |
</th> |
</tr> |
<tbody> |
<?php if (!empty($spoofs)): ?> |
<?php foreach ($spoofs as $spoof): ?> |
84,6 → 115,7 |
</tbody> |
</table> |
</div> |
</table> |
<?php |
} else if ($tab === 2) { |
$filePath = '/var/log/havp/access.log'; |
96,6 → 128,7 |
?> |
<h3 style="text-align: center;"><?= $l_virus ?></h3> |
<div class="container"> |
|
<table class="table table-striped table-hover"> |
<tbody> |
<?php if (!empty($lines)): ?> |
141,20 → 174,42 |
$bans = array_reverse($bans); |
?> |
<h3 style="text-align: center;"><?= $l_fail2ban ?></h3> |
<div class="container"> |
<table class="table table-striped table-hover"> |
<thead> |
<tr><th>Date</th><th>Date Unban</th><th><?= $l_rule ?></th><th><?= $l_ipAddress ?></th></tr> |
</thead> |
<tbody> |
<div class="container" border="1"> |
<table class="table tableBis table-striped table-hover" border="1"> |
<tr > |
<th class="thSecurityBis" > |
Date |
</th> |
<th class="thSecurityBis" > |
Date Unban |
</th> |
<th class="thSecurityBis" > |
<?= $l_rule ?> |
</th> |
<th class="thSecurityBis" > |
<?= $l_ipAddress ?> |
</th> |
</tr> |
<?php if (!empty($bans)): ?> |
<?php foreach ($bans as $ban): ?> |
<tr><td><?= $ban->date_ban ?></td><td><?= $ban->date_unban ?></td><td><?= $ban->rule ?></td><td><?= $ban->ip ?></td></tr> |
<tr> |
<td> |
<?= $ban->date_ban ?> |
</td> |
<td> |
<?= $ban->date_unban ?> |
</td> |
<td> |
<?= $ban->rule ?> |
</td> |
<td> |
<?= $ban->ip ?> |
</td> |
</tr> |
<?php endforeach; ?> |
<?php else: ?> |
<tr><td colspan="4" style="text-align: center;"><?= $l_empty ?></td></tr> |
<?php endif; ?> |
</tbody> |
</table> |
</div> |
<?php |
162,5 → 217,6 |
echo 'Unknown tab'; |
} |
?> |
</div> |
</body> |
</html> |