Subversion Repositories ALCASAR

Rev

Rev 2810 | Rev 2818 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2810 Rev 2811
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: security.php 2810 2020-04-14 11:30:11Z rexy $
2
# $Id: security.php 2811 2020-04-15 22:07:11Z rexy $
3
 
3
 
4
$language = 'en';
4
$language = 'en';
5
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
5
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
6
	$langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
6
    $langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
7
	$language = strtolower(substr(chop($langue[0]), 0, 2));
7
    $language = strtolower(substr(chop($langue[0]), 0, 2));
8
}
8
}
9
if ($language === 'fr') {
9
if ($language === 'fr') {
10
	$l_title = 'Sécurité';
10
    $l_title = 'Sécurité';
11
    $l_spoofing = "Adresse(s) MAC usurpée(s) (Watchdog)";
11
    $l_spoofing = "Adresse(s) MAC usurpée(s) (Watchdog)";
12
    $l_virus = "Virus bloqué(s) (HAVP)";
12
    $l_virus = "Virus bloqué(s) (HAVP)";
13
    $l_fail2ban = "Adresse(s) IP bloquée(s) (Fail2Ban)";
13
    $l_fail2ban = "Adresse(s) IP bloquée(s) (Fail2Ban)";
14
    $l_ipAddress="Adresse IP";
14
    $l_ipAddress="Adresse IP";
15
    $l_user = "L'utilisateur";
15
    $l_user = "L'utilisateur";
16
    $l_empty="Vide";
16
    $l_empty="Vide";
17
    $l_rule="Règle";
17
    $l_rule="Règle";
18
} else {
18
} else {
19
	$l_title = 'Security';
19
    $l_title = 'Security';
20
	$l_spoofing = "MAC address spoofed (Watchdog)";
20
    $l_spoofing = "MAC address spoofed (Watchdog)";
21
    $l_virus = "Virus blocked (HAVP)";
21
    $l_virus = "Virus blocked (HAVP)";
22
    $l_fail2ban = "IP address blocked (Fail2Ban)";
22
    $l_fail2ban = "IP address blocked (Fail2Ban)";
23
    $l_ipAddress="IP address";
23
    $l_ipAddress="IP address";
24
    $l_user = "User";
24
    $l_user = "User";
25
    $l_empty="Empty";
25
    $l_empty="Empty";
26
    $l_rule="Rule";
26
    $l_rule="Rule";
27
}
27
}
28
$tab = (isset($_GET['tab'])) ? intval($_GET['tab']) : 1;
28
$tab = (isset($_GET['tab'])) ? intval($_GET['tab']) : 1;
29
?>
29
?>
30
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
30
<!DOCTYPE HTML PUBLIC>
31
<html>
31
<html>
32
<head>
32
<head>
33
	<meta charset="UTF-8">
33
	<meta charset="UTF-8">
34
	<title><?= $l_title ?></title>
34
	<title><?= $l_title ?></title>
35
	<link rel="stylesheet" href="/css/bootstrap.min.css">
35
	<link rel="stylesheet" href="/css/bootstrap.min.css">
36
	<script src="/js/jquery.min.js"></script>
36
	<script src="/js/jquery.min.js"></script>
37
	<script src="/js/bootstrap.min.js"></script>
37
	<script src="/js/bootstrap.min.js"></script>
38
	<link rel="stylesheet" href="style.css">
38
	<link rel="stylesheet" href="style.css">
39
	<style>
-
 
40
		body {
-
 
41
			background-color: #EFEFEF;
-
 
42
		}
-
 
43
	</style>
-
 
44
</head>
39
</head>
45
<body>
40
<body>
46
<table  class="tableTop" border=0 cellspacing=0 cellpadding=0 >
41
<table  class="tableTop" border=0 cellspacing=0 cellpadding=0 >
47
	<tbody >	
42
	<tbody >	
48
		<tr>
43
		<tr>
Line 115... Line 110...
115
					<tr><td colspan="4" style="text-align: center;"><?= $l_empty ?></td></tr>
110
					<tr><td colspan="4" style="text-align: center;"><?= $l_empty ?></td></tr>
116
				<?php endif; ?>
111
				<?php endif; ?>
117
			</tbody>
112
			</tbody>
118
		</table>
113
		</table>
119
	</div>
114
	</div>
120
</table>
-
 
121
<?php
115
<?php
122
} else if ($tab === 2) {
116
} else if ($tab === 2) {
123
	$filePath = '/var/log/havp/access.log';
117
	$filePath = '/var/log/havp/access.log';
124
	$lines = file($filePath);
118
	$lines = file($filePath);
125
	if ($lines === false) {
119
	if ($lines === false) {