Subversion Repositories ALCASAR

Rev

Rev 2818 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2818 Rev 2852
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: admin_log.php 2818 2020-05-10 21:53:28Z rexy $
2
# $Id: admin_log.php 2852 2020-07-18 10:08:26Z 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	= "Connexion à l'ALCASAR Control Center (ACC)";
10
	$l_title	= "Connexion à l'ALCASAR Control Center (ACC)";
11
	$l_user		= "Utilisateur";
11
	$l_user		= "Utilisateur";
12
	$l_ip_address	= "Adresse IP";
12
	$l_ip_address	= "Adresse IP";
-
 
13
	$l_date         = "Date";
-
 
14
    $l_agent        = "Agent web";
-
 
15
 
-
 
16
} else if ($Language === 'es') {
-
 
17
	$l_title	= "Conexiones a ALCASAR, Centro de Control (ACC)";
-
 
18
	$l_user		= "Usuario";
-
 
19
	$l_ip_address	= "Dirección IP";
-
 
20
	$l_date         = "Fecha";
-
 
21
    $l_agent        = "Agente web";
13
} else {
22
} else {
14
	$l_title	= "Connection to ALCASAR Control Center (ACC)";
23
	$l_title	= "Connection to ALCASAR Control Center (ACC)";
15
	$l_user		= "User";
24
	$l_user		= "User";
16
	$l_ip_address	= "IP address";
25
	$l_ip_address	= "IP address";
-
 
26
	$l_date         = "Date";
-
 
27
    $l_agent        = "Web user agent";
17
}
28
}
18
// Read access log
29
// Read access log
19
$accessLogs = [];
30
$accessLogs = [];
20
$accessLogFilename = '/var/Save/security/acc_access.log';
31
$accessLogFilename = '/var/Save/security/acc_access.log';
21
$filePtn = fopen($accessLogFilename, 'r');
32
$filePtn = fopen($accessLogFilename, 'r');
Line 63... Line 74...
63
	<div class="panel-row">
74
	<div class="panel-row">
64
		<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
75
		<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
65
		<tr><td>
76
		<tr><td>
66
			<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
77
			<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
67
			<tr>
78
			<tr>
68
				<th>Date</th>
79
				<th><?=$l_date?></th>
69
				<th><?=$l_user?></th>
80
				<th><?=$l_user?></th>
70
				<th><?=$l_ip_address?></th>
81
				<th><?=$l_ip_address?></th>
71
				<th>Agent</th>
82
				<th><?=$l_agent?></th>
72
			</tr>
83
			</tr>
73
			<?php if (empty($accessLogs)): ?>
84
			<?php if (empty($accessLogs)): ?>
74
			<tr>
85
			<tr>
75
				<td colspan="4"><center>Empty</center></td>
86
				<td colspan="4"><center>Empty</center></td>
76
			</tr>
87
			</tr>