Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2817 → Rev 2818

/web/acc/manager/htdocs/security.php
27,38 → 27,25
}
$tab = (isset($_GET['tab'])) ? intval($_GET['tab']) : 1;
?>
<!DOCTYPE HTML PUBLIC>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title><?= $l_title ?></title>
<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">
</head>
<body>
<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>
<a href="security.php?tab=3" class="btn btn-default<?= (($tab === 3) ? ' active' : '') ?>" role="button"><?= $l_fail2ban ?></a>
</div>
<br>
<head>
<meta charset="UTF-8">
<title><?= $l_title ?></title>
<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="/css/acc.css">
</head>
<body>
<div class="panel">
<div class="panel-header"><?= $l_title ?></div>
<div class="panel-row">
<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>
<a href="security.php?tab=3" class="btn btn-default<?= (($tab === 3) ? ' active' : '') ?>" role="button"><?= $l_fail2ban ?></a>
</div>
<?php
if ($tab === 1) {
$spoofs = [];
84,34 → 71,34
}
$spoofs = array_reverse($spoofs);
?>
<h3 style="text-align: center;"><?= $l_spoofing ?></h3>
<div class="container">
<table style='font-family: "DejaVu Sans";font-size: small;color: #666650;' class="table table-striped tableBis table-hover" border="1">
<h3><?= $l_spoofing ?></h3>
<div class="container">
<table class="table table-striped table-hover" border="1">
<tr>
<th class="thSecurityBis" >
<th>
Date
</th>
<th class="thSecurityBis">
<th>
<?= $l_ipAddress ?>
</th>
<th class="thSecurityBis">
<th>
MAC
</th>
<th class="thSecurityBis">
<th>
<?= $l_user ?>
</th>
</tr>
<tbody>
<?php if (!empty($spoofs)): ?>
<tbody>
<?php if (!empty($spoofs)): ?>
<?php foreach ($spoofs as $spoof): ?>
<tr><td><?= $spoof->date ?></td><td><?= $spoof->ip ?></td><td><?= $spoof->mac ?></td><td><?= $spoof->user ?></td></tr>
<tr><td><?= $spoof->date ?></td><td><?= $spoof->ip ?></td><td><?= $spoof->mac ?></td><td><?= $spoof->user ?></td></tr>
<?php endforeach; ?>
<?php else: ?>
<?php else: ?>
<tr><td colspan="4" style="text-align: center;"><?= $l_empty ?></td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
<?php endif; ?>
</tbody>
</table>
</div>
<?php
} else if ($tab === 2) {
$filePath = '/var/log/havp/access.log';
119,12 → 106,10
if ($lines === false) {
exit("Cannot open '$filePath'.");
}
 
$lines = array_reverse($lines);
?>
<h3 style="text-align: center;"><?= $l_virus ?></h3>
<h3><?= $l_virus ?></h3>
<div class="container">
 
<table class="table table-striped table-hover">
<tbody>
<?php if (!empty($lines)): ?>
168,20 → 153,20
}
$bans = array_reverse($bans);
?>
<h3 style="text-align: center;"><?= $l_fail2ban ?></h3>
<h3><?= $l_fail2ban ?></h3>
<div class="container" border="1">
<table class="table tableBis table-striped table-hover" border="1">
<table class="table table-striped table-hover" border="1">
<tr >
<th class="thSecurityBis" >
<th>
Date
</th>
<th class="thSecurityBis" >
<th>
Date Unban
</th>
<th class="thSecurityBis" >
<th>
<?= $l_rule ?>
</th>
<th class="thSecurityBis" >
<th>
<?= $l_ipAddress ?>
</th>
</tr>
212,6 → 197,7
echo 'Unknown tab';
}
?>
</div>
</div>
</body>
</html>