Subversion Repositories ALCASAR

Rev

Rev 3002 | Rev 3034 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3002 Rev 3026
1
<?php
1
<?php
2
# $Id: index.php 3002 2022-04-03 21:39:16Z rexy $
2
# $Id: index.php 3026 2022-06-30 21:53:54Z rexy $
3
#
3
#
4
# index.php for ALCASAR by Rexy
4
# index.php for ALCASAR by Rexy
5
# UI & css style by stephane ERARD
5
# UI & css style by Stéphane ERARD & Alexandre VEZIN
6
# The contents of this file may be used under the terms of the GNU
6
# The contents of this file may be used under the terms of the GNU
7
# General Public License Version 2, provided that the above copyright
7
# General Public License Version 2, provided that the above copyright
8
# notice and this permission notice is included in all copies or
8
# notice and this permission notice is included in all copies or
9
# substantial portions of the software.
9
# substantial portions of the software.
10
 
10
 
11
/****************************************************************
11
/****************************************************************
12
*			GLOBAL FILE PATHS			*
12
*			GLOBAL FILE PATHS			*
13
*****************************************************************/
13
*****************************************************************/
14
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
14
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
15
define('DOMAIN_ALLOWED_LIST', '/usr/local/etc/alcasar-uamdomain');
15
define('DOMAIN_ALLOWED_LIST', '/usr/local/etc/alcasar-uamdomain');
16
 
16
 
17
/****************************************************************
17
/****************************************************************
18
*			FILE reading test			*
18
*			FILE reading test			*
19
*****************************************************************/
19
*****************************************************************/
20
$conf_files = array(CONF_FILE, DOMAIN_ALLOWED_LIST);
20
$conf_files = array(CONF_FILE, DOMAIN_ALLOWED_LIST);
21
foreach ($conf_files as $file) {
21
foreach ($conf_files as $file) {
22
	if (!file_exists($file)) {
22
	if (!file_exists($file)) {
23
		exit("Fichier $file non présent");
23
		exit("Fichier $file non présent");
24
	}
24
	}
25
	if (!is_readable($file)) {
25
	if (!is_readable($file)) {
26
		exit("Vous n'avez pas les droits de lecture sur le fichier $file");
26
		exit("Vous n'avez pas les droits de lecture sur le fichier $file");
27
	}
27
	}
28
}
28
}
29
 
29
 
30
/****************************************************************
30
/****************************************************************
31
*			Read CONF_FILE				*
31
*			Read CONF_FILE				*
32
*****************************************************************/
32
*****************************************************************/
33
$file_conf = fopen(CONF_FILE, 'r');
33
$file_conf = fopen(CONF_FILE, 'r');
34
if (!$file_conf) {
34
if (!$file_conf) {
35
	exit('Error opening the file '.CONF_FILE);
35
	exit('Error opening the file '.CONF_FILE);
36
}
36
}
37
while (!feof($file_conf)) {
37
while (!feof($file_conf)) {
38
	$buffer = fgets($file_conf, 4096);
38
	$buffer = fgets($file_conf, 4096);
39
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
39
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
40
		$tmp = explode('=', $buffer, 2);
40
		$tmp = explode('=', $buffer, 2);
41
		$conf[trim($tmp[0])] = trim($tmp[1]);
41
		$conf[trim($tmp[0])] = trim($tmp[1]);
42
	}
42
	}
43
}
43
}
44
fclose($file_conf);
44
fclose($file_conf);
45
 
45
 
-
 
46
$page = "index";
46
$organisme = $conf["ORGANISM"];
47
$organisme = $conf["ORGANISM"];
47
$hostname  = $conf["HOSTNAME"].'.'.$conf["DOMAIN"];
48
$hostname  = $conf["HOSTNAME"].'.'.$conf["DOMAIN"];
48
$ssl_status = ($conf['HTTPS_LOGIN'] === 'on');
49
$ssl_status = ($conf['HTTPS_LOGIN'] === 'on');
49
$protocol = ($ssl_status) ? 'https://' : 'http://';
50
$protocol = ($ssl_status) ? 'https://' : 'http://';
50
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
51
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
51
$network_pb = false;
52
$network_pb = false;
52
$diagnostic = "can't contact the default router";
53
$diagnostic = "can't contact the default router";
53
$certCa_link = (($useHTTPS) ? 'https' : 'http')."://$hostname/certs/certificat_alcasar_ca.crt";
54
$certCa_link = (($useHTTPS) ? 'https' : 'http')."://$hostname/certs/certificat_alcasar_ca.crt";
54
$logout_link = ((($conf['HTTPS_CHILLI'] === 'on') && $useHTTPS) ? 'https://'.$hostname.':3991' : 'http://'.$hostname.':3990').'/logoff';
55
$logout_link = ((($conf['HTTPS_CHILLI'] === 'on') && $useHTTPS) ? 'https://'.$hostname.':3991' : 'http://'.$hostname.':3990').'/logoff';
55
$direct_access = false;
56
$direct_access = false;
56
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
57
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
57
$connection_history = '';
58
$connection_history = '';
58
$nb_connection_history = 3;
59
$nb_connection_history = 3;
59
$redirect_link = 'www.euronews.com'; // Default redirection for HTTP interception (beware, this website must run in HTTP)
60
$redirect_link = 'www.euronews.com'; // Default redirection for HTTP interception (beware, this website must run in HTTP)
60
$service_wifi4eu_status = ($conf['WIFI4EU'] === 'on');
61
$service_wifi4eu_status = ($conf['WIFI4EU'] === 'on');
61
$service_wifi4eu_code = $conf['WIFI4EU_CODE'];
62
$service_wifi4eu_code = $conf['WIFI4EU_CODE'];
62
$service_wifi4eu_server = 'https://collection.wifi4eu.ec.europa.eu/wifi4eu.min.js';
63
$service_wifi4eu_server = 'https://collection.wifi4eu.ec.europa.eu/wifi4eu.min.js';
63
$service_SMS_status = ($conf['SMS'] === 'on');
64
$service_SMS_status = ($conf['SMS'] === 'on');
64
$service_Email_status = ($conf['MAIL'] === 'on');
65
$service_Email_status = ($conf['MAIL'] === 'on');
65
 
66
 
66
// Retrieve the user info behind the remote ip
67
// Retrieve the user info behind the remote ip
67
$output = [];
68
$output = [];
68
exec('sudo /usr/sbin/chilli_query list ip '.escapeshellarg($remote_ip), $output);
69
exec('sudo /usr/sbin/chilli_query list ip '.escapeshellarg($remote_ip), $output);
69
if (!empty($output)) {
70
if (!empty($output)) {
70
	$userRaw = explode(' ', $output[0]);
71
	$userRaw = explode(' ', $output[0]);
71
	$user = (object) [
72
	$user = (object) [
72
		'mac'       =>  $userRaw[0],
73
		'mac'       =>  $userRaw[0],
73
		'connected' => ($userRaw[4] === '1'),
74
		'connected' => ($userRaw[4] === '1'),
74
		'username'  =>  $userRaw[5]
75
		'username'  =>  $userRaw[5]
75
	];
76
	];
76
} else {
77
} else {
77
	// CoovaChilli does not know the user
78
	// CoovaChilli does not know the user
78
	$user = (object) [
79
	$user = (object) [
79
		'mac'       => '',
80
		'mac'       => '',
80
		'connected' => false,
81
		'connected' => false,
81
		'username'  => ''
82
		'username'  => ''
82
	];
83
	];
83
}
84
}
84
 
85
 
85
// Test if it's a direct connection to ALCASAR
86
// Test if it's a direct connection to ALCASAR
86
if (isset($_SERVER['HTTP_HOST']) && (($_SERVER['HTTP_HOST'] === $_SERVER['SERVER_ADDR']) || ($_SERVER['HTTP_HOST'] === 'alcasar') || ($_SERVER['HTTP_HOST'] === $hostname) || ($_SERVER['HTTP_HOST'] === $organisme))) {
87
if (isset($_SERVER['HTTP_HOST']) && (($_SERVER['HTTP_HOST'] === $_SERVER['SERVER_ADDR']) || ($_SERVER['HTTP_HOST'] === 'alcasar') || ($_SERVER['HTTP_HOST'] === $hostname) || ($_SERVER['HTTP_HOST'] === $organisme))) {
87
	$direct_access = true;
88
	$direct_access = true;
88
}
89
}
89
 
90
 
90
// Function to adapt time connection in seconds to H,M,S
91
// Function to adapt time connection in seconds to H,M,S
91
function secondsToDuration($seconds = null){
92
function secondsToDuration($seconds = null){
92
	if ($seconds == null) return "";
93
	if ($seconds == null) return "";
93
	$temp = $seconds % 3600;
94
	$temp = $seconds % 3600;
94
	$time[0] = ( $seconds - $temp ) / 3600 ;	// hours
95
	$time[0] = ( $seconds - $temp ) / 3600 ;	// hours
95
	$time[2] = $temp % 60 ;				// seconds
96
	$time[2] = $temp % 60 ;				// seconds
96
	$time[1] = ( $temp - $time[2] ) / 60;		// minutes
97
	$time[1] = ( $temp - $time[2] ) / 60;		// minutes
97
	return $time[0].' h '.$time[1].' m '.$time[2].' s';
98
	return $time[0].' h '.$time[1].' m '.$time[2].' s';
98
}
99
}
99
 
100
 
100
// if user need to be warned
101
// if user need to be warned
101
if (isset($_GET['warn']) && isset($_GET['url'])) {
102
if (isset($_GET['warn']) && isset($_GET['url'])) {
102
	$direct_access = false;
103
	$direct_access = false;
103
}
104
}
104
 
105
 
105
if ($user->connected) { // the user is authenticated
106
if ($user->connected) { // the user is authenticated
106
	if (isset($_GET['redirect'])) { // if user has been warned, we redirect him to his website
107
	if (isset($_GET['redirect'])) { // if user has been warned, we redirect him to his website
107
		header('Location: '.$_GET['url'], true, 307);
108
		header('Location: '.$_GET['url'], true, 307);
108
		exit();
109
		exit();
109
	}
110
	}
110
 
111
 
111
	// We retrieve his three last connections
112
	// We retrieve his three last connections
112
	if ((is_file('./acc/manager/lib/sql/drivers/mysql/functions.php'))&&(is_file('/etc/freeradius-web/config.php'))){
113
	if ((is_file('./acc/manager/lib/sql/drivers/mysql/functions.php'))&&(is_file('/etc/freeradius-web/config.php'))){
113
		include_once('/etc/freeradius-web/config.php');
114
		include_once('/etc/freeradius-web/config.php');
114
		include_once('./acc/manager/lib/sql/drivers/mysql/functions.php');
115
		include_once('./acc/manager/lib/sql/drivers/mysql/functions.php');
115
		$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user->username' ORDER BY AcctStartTime DESC LIMIT 0 , $nb_connection_history";
116
		$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user->username' ORDER BY AcctStartTime DESC LIMIT 0 , $nb_connection_history";
116
		$link = @da_sql_pconnect($config);
117
		$link = @da_sql_pconnect($config);
117
		if ($link) {
118
		if ($link) {
118
			$res = @da_sql_query($link,$config,$sql);
119
			$res = @da_sql_query($link,$config,$sql);
119
			if ($res) {
120
			if ($res) {
120
				$connection_history .= '<ul>';
121
				$connection_history .= '<ul>';
121
				while (($row = @da_sql_fetch_array($res,$config))) {
122
				while (($row = @da_sql_fetch_array($res,$config))) {
122
					$connected = '';
123
					$connected = '';
123
					if ($row['acctstoptime'] === '') {
124
					if ($row['acctstoptime'] === '') {
124
						$connected = ' (active)';
125
						$connected = ' (active)';
125
					}
126
					}
126
					$sessionTimeFormated = secondsToDuration($row['acctsessiontime']);
127
					$sessionTimeFormated = secondsToDuration($row['acctsessiontime']);
127
					$connection_history .= "<li title=\"$row[username] $row[acctstarttime] $row[acctstoptime] ($sessionTimeFormated)\">$row[acctstarttime] ($sessionTimeFormated) $connected</li>";
128
					$connection_history .= "<li title=\"$row[username] $row[acctstarttime] $row[acctstoptime] ($sessionTimeFormated)\">$row[acctstarttime] ($sessionTimeFormated) $connected</li>";
128
				}
129
				}
129
				$connection_history .= '</ul>';
130
				$connection_history .= '</ul>';
130
			}
131
			}
131
		}
132
		}
132
	}
133
	}
133
} else { // the user isn't authenticated
134
} else { // the user isn't authenticated
134
	if (isset($_GET['url'])) { // it's the second stage (when user has clicked on the button "open a connection")
135
	if (isset($_GET['url'])) { // it's the second stage (when user has clicked on the button "open a connection")
135
		$redir = 'http://'.$_GET['url'];
136
		$redir = 'http://'.$_GET['url'];
136
		header("Location: $redir", true, 307);
137
		header("Location: $redir", true, 307);
137
		exit();
138
		exit();
138
	}
139
	}
139
}
140
}
140
 
141
 
141
// Choice of language
142
// Choice of language
142
$Language = 'en';
143
$Language = 'en';
143
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
144
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
144
	$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
145
	$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
145
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
146
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
146
}
147
}
147
if ($Language === 'fr') {		// French
148
if ($Language === 'fr') {		// French
148
	$l_access_denied = "Contrôle d'accès";
149
	$l_access_denied = "Contrôle d'accès";
149
	$l_access_welcome = "Bienvenue sur ALCASAR";
150
	$l_access_welcome = "Bienvenue sur ALCASAR";
150
	$l_access_unavailable = "ACCÈS INDISPONIBLE";
151
	$l_access_unavailable = "ACCÈS INDISPONIBLE";
151
	$l_required_domain = "Site WEB demandé";
152
	$l_required_domain = "Site WEB demandé";
152
	$l_explain_acc_access = "Le centre de gestion permet d'administrer le portail. Vous devez posséder un compte d'administration ou de gestion pour y accéder.";
153
	$l_explain_acc_access = "Le centre de gestion permet d'administrer le portail. Vous devez posséder un compte d'administration ou de gestion pour y accéder.";
153
	$l_explain_access_deny = "Vous tentez d'accéder à une ressource dont le contenu est réputé contenir des informations inappropriées.";
154
	$l_explain_access_deny = "Vous tentez d'accéder à une ressource dont le contenu est réputé contenir des informations inappropriées.";
154
	$l_explain_net_pb = "Votre portail détecte que l'accès à Internet est indisponible.";
155
	$l_explain_net_pb = "Votre portail détecte que l'accès à Internet est indisponible.";
155
	$l_contact_access_deny = "Contactez le responsable de la séurité (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
156
	$l_contact_access_deny = "Contactez le responsable de la séurité (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
156
	$l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information.";
157
	$l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information.";
157
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">Inscrivez-vous par SMS</a>";
158
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">Inscrivez-vous par SMS</a>";
158
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">Inscrivez-vous par Email</a>";
159
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">Inscrivez-vous par Email</a>";
159
	$l_install_certif = "Installer le certificat racine";
160
	$l_install_certif = "Installer le certificat racine";
160
	$l_category = "catégorie :";
161
	$l_category = "catégorie :";
161
	if (!$user->connected) {
162
	if (!$user->connected) {
162
		$l_logout_explain = "Aucune session n'est actuellement ouverte";
163
		$l_logout_explain = "Aucune session n'est actuellement ouverte";
163
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Ouvrir une session</a>";
164
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Ouvrir une session</a>";
164
	} else {
165
	} else {
165
		if ($user->username != $user->mac) { // authentication exception or not
166
		if ($user->username != $user->mac) { // authentication exception or not
166
			$l_logout_explain = "Utilisateur connecté : <a href=\"$logout_link\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
167
			$l_logout_explain = "Utilisateur connecté : <a href=\"$logout_link\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
167
			$l_logout = "<a href=\"$logout_link\">Se déconnecter d'internet</a>";
168
			$l_logout = "<a href=\"$logout_link\">Se déconnecter d'internet</a>";
168
		} else {
169
		} else {
169
			$l_logout_explain = "Votre système ($user->username) est en exception d'authentication.<br><br>$nb_connection_history dernières connexions :$connection_history";
170
			$l_logout_explain = "Votre système ($user->username) est en exception d'authentication.<br><br>$nb_connection_history dernières connexions :$connection_history";
170
			$l_logout = "<a href=\"\">Information des connexions</a>";
171
			$l_logout = "<a href=\"\">Information des connexions</a>";
171
		}
172
		}
172
	}
173
	}
173
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Changer votre mot de passe</a>";
174
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Changer votre mot de passe</a>";
174
	$l_back_page = "<a href=\"javascript:history.back()\">Page précédente</a>";
175
	$l_back_page = "<a href=\"javascript:history.back()\">Page précédente</a>";
175
	$l_explain_warn = "L'administrateur a créé une archive contenant vos journaux de connexion dans le cadre d'une affaire judiciaire.";
176
	$l_explain_warn = "L'administrateur a créé une archive contenant vos journaux de connexion dans le cadre d'une affaire judiciaire.";
176
	if (isset($_GET['url'])) {
177
	if (isset($_GET['url'])) {
177
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Je comprends et je souhaite continuer ma navigation.</a>";
178
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Je comprends et je souhaite continuer ma navigation.</a>";
178
	} else {
179
	} else {
179
		$l_continue_link = "<a href=\"index.php\" class=\"button\">Je comprends et je souhaite continuer ma navigation.</a>";
180
		$l_continue_link = "<a href=\"index.php\" class=\"button\">Je comprends et je souhaite continuer ma navigation.</a>";
180
	}
181
	}
181
	$l_title_warn="Cher utilisateur, ";
182
	$l_title_warn="Cher utilisateur, ";
182
	$l_explain_warn_name="Une personne sous le nom de ";
183
	$l_explain_warn_name="Une personne sous le nom de ";
183
	$l_explain_warn_ip="sous cette IP : ";
184
	$l_explain_warn_ip="sous cette IP : ";
184
	$l_explain_warn_date="a consulté vos journaux de connexion le ";
185
	$l_explain_warn_date="a consulté vos journaux de connexion le ";
185
	$l_explain_warn_reason="Raison invoquée : ";
186
	$l_explain_warn_reason="Raison invoquée : ";
186
	$l_uam_domain = "Sites autorisés : ";
187
	$l_uam_domain = "Sites autorisés : ";
187
} else if ($Language === 'pt') {	// Portuguese
188
} else if ($Language === 'pt') {	// Portuguese
188
	$l_access_denied = "Controle de acesso";
189
	$l_access_denied = "Controle de acesso";
189
	$l_access_welcome = "Bem-vindo ao Alcasar";
190
	$l_access_welcome = "Bem-vindo ao Alcasar";
190
	$l_access_unavailable = "ACESSO INDISPONÍVEL";
191
	$l_access_unavailable = "ACESSO INDISPONÍVEL";
191
	$l_required_domain = "Site WEB Obrigatório";
192
	$l_required_domain = "Site WEB Obrigatório";
192
	$l_explain_acc_access = "Este é o centro de controle do portal para acessar você deve ter uma conta administrativa valida.";
193
	$l_explain_acc_access = "Este é o centro de controle do portal para acessar você deve ter uma conta administrativa valida.";
193
	$l_explain_access_deny = "Você tenta se conectar a um recurso cujo conteúdo é considerado inadequado no conteúdo de informações.";
194
	$l_explain_access_deny = "Você tenta se conectar a um recurso cujo conteúdo é considerado inadequado no conteúdo de informações.";
194
	$l_explain_net_pb = "O sistema detectou que o acesso é de risco, não será permitido o acesso";
195
	$l_explain_net_pb = "O sistema detectou que o acesso é de risco, não será permitido o acesso";
195
	$l_contact_access_deny = "Entre em contato com o administrador do sistema de segurança se acha que essa filtragem é abusiva.";
196
	$l_contact_access_deny = "Entre em contato com o administrador do sistema de segurança se acha que essa filtragem é abusiva.";
196
	$l_contact_net_pb = "Entre em contato com a empresa fornecedora de Internet para mais informações";
197
	$l_contact_net_pb = "Entre em contato com a empresa fornecedora de Internet para mais informações";
197
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">Registar por SMS</a>";
198
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">Registar por SMS</a>";
198
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">Registar por Email</a>";
199
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">Registar por Email</a>";
199
	$l_install_certif = "Instalar Certificado Alcasar AC";
200
	$l_install_certif = "Instalar Certificado Alcasar AC";
200
	$l_category = "categoria :";
201
	$l_category = "categoria :";
201
	if (!$user->connected) {
202
	if (!$user->connected) {
202
		$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
203
		$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
203
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Abrir uma conexão de Internet</a>";
204
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Abrir uma conexão de Internet</a>";
204
	} else {
205
	} else {
205
		if ($user->username != $user->mac) { // authentication exception or not
206
		if ($user->username != $user->mac) { // authentication exception or not
206
			$l_logout_explain = "Usuário conectado : <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history logins últimos :$connection_history";
207
			$l_logout_explain = "Usuário conectado : <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history logins últimos :$connection_history";
207
			$l_logout = "<a href=\"$logout_link\">Sair da Internet</a>";
208
			$l_logout = "<a href=\"$logout_link\">Sair da Internet</a>";
208
		} else {
209
		} else {
209
			$l_logout_explain = "O sistema ($user->username) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history";
210
			$l_logout_explain = "O sistema ($user->username) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history";
210
			$l_logout = "<a href=\"\">Informações de conexões</a>";
211
			$l_logout = "<a href=\"\">Informações de conexões</a>";
211
		}
212
		}
212
	}
213
	}
213
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Mudar sua senha</a>";
214
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Mudar sua senha</a>";
214
	$l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
215
	$l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
215
	$l_explain_warn = "El administrador ha creado un archivo que contiene los periódicos de inicio de sesión como parte de un proceso judicial.";
216
	$l_explain_warn = "El administrador ha creado un archivo que contiene los periódicos de inicio de sesión como parte de un proceso judicial.";
216
	if (isset($_GET['url'])) {
217
	if (isset($_GET['url'])) {
217
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Lo comprendo y deseo continuar mi navegación.</a>";
218
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Lo comprendo y deseo continuar mi navegación.</a>";
218
	} else {
219
	} else {
219
		$l_continue_link = "<a href=\"index.php\" class=\"button\">Lo comprendo y deseo continuar mi navegación.</a>";
220
		$l_continue_link = "<a href=\"index.php\" class=\"button\">Lo comprendo y deseo continuar mi navegación.</a>";
220
	}
221
	}
221
	$l_title_warn="Estimado usuario,";
222
	$l_title_warn="Estimado usuario,";
222
	$l_explain_warn_name="El usario ";
223
	$l_explain_warn_name="El usario ";
223
	$l_explain_warn_ip="con este IP : ";
224
	$l_explain_warn_ip="con este IP : ";
224
	$l_explain_warn_date="consultó a sus registros de conexión el ";
225
	$l_explain_warn_date="consultó a sus registros de conexión el ";
225
	$l_explain_warn_reason="con la siguiente razón : ";
226
	$l_explain_warn_reason="con la siguiente razón : ";
226
	$l_uam_domain = "Sites autorizados : ";
227
	$l_uam_domain = "Sites autorizados : ";
227
} else if ($Language === 'zn') {	// Chinese
228
} else if ($Language === 'zn') {	// Chinese
228
	$l_access_denied = "访问控制";
229
	$l_access_denied = "访问控制";
229
	$l_access_welcome = "欢迎来到ALCASAR";
230
	$l_access_welcome = "欢迎来到ALCASAR";
230
	$l_access_unavailable = "不可访问";
231
	$l_access_unavailable = "不可访问";
231
	$l_required_domain = "访问的网站";
232
	$l_required_domain = "访问的网站";
232
	$l_explain_acc_access = "管理中心能管理门户,您必须通过超级用户或者管理用户来访问。";
233
	$l_explain_acc_access = "管理中心能管理门户,您必须通过超级用户或者管理用户来访问。";
233
	$l_explain_access_deny = "您试图访问一个含有不当信息的资源。";
234
	$l_explain_access_deny = "您试图访问一个含有不当信息的资源。";
234
	$l_explain_net_pb = "您的门户检测因特网不可用。";
235
	$l_explain_net_pb = "您的门户检测因特网不可用。";
235
	$l_contact_access_deny = "如果您认为该过滤不当,请联系安全负责人(OSSI/RSSI)。";
236
	$l_contact_access_deny = "如果您认为该过滤不当,请联系安全负责人(OSSI/RSSI)。";
236
	$l_contact_net_pb = "请联系IT负责人或网络服务商来了解更多信息。";
237
	$l_contact_net_pb = "请联系IT负责人或网络服务商来了解更多信息。";
237
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">通过短信注册</a>";
238
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">通过短信注册</a>";
238
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">通过电子邮件注册</a>";
239
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">通过电子邮件注册</a>";
239
	$l_install_certif = "安装根证书";
240
	$l_install_certif = "安装根证书";
240
	$l_category = "类别 :";
241
	$l_category = "类别 :";
241
	if (!$user->connected) {
242
	if (!$user->connected) {
242
		$l_logout_explain = "您的系统目前没有打开任何网络咨询进程。";
243
		$l_logout_explain = "您的系统目前没有打开任何网络咨询进程。";
243
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">打开一个网络进程</a>";
244
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">打开一个网络进程</a>";
244
	} else {
245
	} else {
245
		if ($user->username != $user->mac) { // authentication exception or not
246
		if ($user->username != $user->mac) { // authentication exception or not
246
			$l_logout_explain = "已连接用户:<a href=\"$logout_link\" title=\" $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history 最后连接 :$connection_history";
247
			$l_logout_explain = "已连接用户:<a href=\"$logout_link\" title=\" $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history 最后连接 :$connection_history";
247
			$l_logout = "<a href=\"$logout_link\">断开网络</a>";
248
			$l_logout = "<a href=\"$logout_link\">断开网络</a>";
248
		} else {
249
		} else {
249
			$l_logout_explain = "您的系统($user->username)验证例外<br><br>$nb_connection_history 最后连接: $connection_history";
250
			$l_logout_explain = "您的系统($user->username)验证例外<br><br>$nb_connection_history 最后连接: $connection_history";
250
			$l_logout = "<a href=\"\">连接信息</a>";
251
			$l_logout = "<a href=\"\">连接信息</a>";
251
		}
252
		}
252
	}
253
	}
253
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">更改您的密码</a>";
254
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">更改您的密码</a>";
254
	$l_back_page = "<a href=\"javascript:history.back()\">上一页</a>";
255
	$l_back_page = "<a href=\"javascript:history.back()\">上一页</a>";
255
	$l_explain_warn = "管理员创建了一份可用于司法调查的连接日志文档。";
256
	$l_explain_warn = "管理员创建了一份可用于司法调查的连接日志文档。";
256
	if (isset($_GET['url'])) {
257
	if (isset($_GET['url'])) {
257
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">我明白并希望继续浏览。</a>";
258
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">我明白并希望继续浏览。</a>";
258
	} else {
259
	} else {
259
		$l_continue_link = "<a href=\"index.php\" class=\"button\">我明白并希望继续浏览。</a>";
260
		$l_continue_link = "<a href=\"index.php\" class=\"button\">我明白并希望继续浏览。</a>";
260
	}
261
	}
261
	$l_title_warn="亲爱的用户,";
262
	$l_title_warn="亲爱的用户,";
262
	$l_explain_warn_name="一人名为";
263
	$l_explain_warn_name="一人名为";
263
	$l_explain_warn_ip="在此IP:";
264
	$l_explain_warn_ip="在此IP:";
264
	$l_explain_warn_date="查看您的连接日志于";
265
	$l_explain_warn_date="查看您的连接日志于";
265
	$l_explain_warn_reason=" 如下原因:";
266
	$l_explain_warn_reason=" 如下原因:";
266
	$l_uam_domain = "授权网站 : ";
267
	$l_uam_domain = "授权网站 : ";
267
} else if ($Language === 'ar') {	// Arabic
268
} else if ($Language === 'ar') {	// Arabic
268
	$l_access_denied = "مراقبة الدخول";
269
	$l_access_denied = "مراقبة الدخول";
269
	$l_access_welcome = "ALCASAR مرحبا بك في";
270
	$l_access_welcome = "ALCASAR مرحبا بك في";
270
	$l_access_unavailable = "الدخول غير متوفر";
271
	$l_access_unavailable = "الدخول غير متوفر";
271
	$l_required_domain = "موقع إنترنيت مطلوب";
272
	$l_required_domain = "موقع إنترنيت مطلوب";
272
	$l_explain_acc_access = "مركز التحكم يمكنك من إدارة البوابة. يلزمك التوفر على حساب الادارة للدخول.";
273
	$l_explain_acc_access = "مركز التحكم يمكنك من إدارة البوابة. يلزمك التوفر على حساب الادارة للدخول.";
273
	$l_explain_access_deny = "محاولة لدخول موارد تحتوي على معلومات غير ملائمة المحتوى";
274
	$l_explain_access_deny = "محاولة لدخول موارد تحتوي على معلومات غير ملائمة المحتوى";
274
	$l_explain_net_pb = "بوابتك تكتشف ان الدخول على الانترنت غير متوفر";
275
	$l_explain_net_pb = "بوابتك تكتشف ان الدخول على الانترنت غير متوفر";
275
	$l_contact_access_deny = "المرجو الاتصال بضابط أمن (OSS / RSS) إذا اعتقدت ان هذه التصفية غير قانونية";
276
	$l_contact_access_deny = "المرجو الاتصال بضابط أمن (OSS / RSS) إذا اعتقدت ان هذه التصفية غير قانونية";
276
	$l_contact_net_pb = "المرجو الاتصال بمدير المعلومات أو مورد الأنترنت للمزيد من المعلومات";
277
	$l_contact_net_pb = "المرجو الاتصال بمدير المعلومات أو مورد الأنترنت للمزيد من المعلومات";
277
	$auto_save_sms_text = "تسجيل ذاتي على";
278
	$auto_save_sms_text = "تسجيل ذاتي على";
278
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">اشترك عن طريق الرسائل القصيرة</a>";
279
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">اشترك عن طريق الرسائل القصيرة</a>";
279
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">通过电子邮件注册</a>";
280
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">通过电子邮件注册</a>";
280
	$l_install_certif = "ركب جذر الشهادة";
281
	$l_install_certif = "ركب جذر الشهادة";
281
	$l_category = "فئة :";
282
	$l_category = "فئة :";
282
	if (!$user->connected) {
283
	if (!$user->connected) {
283
		$l_logout_explain = "و لا جلسة استفسار للإنترنت مفتوحة حاليا على نظامك";
284
		$l_logout_explain = "و لا جلسة استفسار للإنترنت مفتوحة حاليا على نظامك";
284
		$close_session_text = "فتح جلسة الإنترنت";
285
		$close_session_text = "فتح جلسة الإنترنت";
285
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">$close_session_text</a>";
286
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">$close_session_text</a>";
286
	} else {
287
	} else {
287
		if ($user->username != $user->mac) { // authentication exception or not
288
		if ($user->username != $user->mac) { // authentication exception or not
288
			$close_session_text = "إقفال جلسة المستخدم المتصل حاليا";
289
			$close_session_text = "إقفال جلسة المستخدم المتصل حاليا";
289
			$userlogged_text = "المستخدم متصل";
290
			$userlogged_text = "المستخدم متصل";
290
			$disconnect_user_text = "قطع الاتصال على المستخدم";
291
			$disconnect_user_text = "قطع الاتصال على المستخدم";
291
			$l_logout_explain = "Utilisateur connecté : <a href=\"$logout_link\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
292
			$l_logout_explain = "Utilisateur connecté : <a href=\"$logout_link\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
292
			$logout_internet_text = "قطع الاتصال على الإنترنت";
293
			$logout_internet_text = "قطع الاتصال على الإنترنت";
293
			$l_logout = "<a href=\"$logout_link\">$logout_internet_text</a>";
294
			$l_logout = "<a href=\"$logout_link\">$logout_internet_text</a>";
294
		} else {
295
		} else {
295
			$your_system_text = "نظامك";
296
			$your_system_text = "نظامك";
296
			$auth_except_text = "على توثيق استثنائي";
297
			$auth_except_text = "على توثيق استثنائي";
297
			$last_conn_text = "اتصالات مشاركة";
298
			$last_conn_text = "اتصالات مشاركة";
298
			$l_logout_explain = "$connection_history :$last_conn_text $nb_connection_history<br><br>$auth_except_text ($user->username) $your_system_text";
299
			$l_logout_explain = "$connection_history :$last_conn_text $nb_connection_history<br><br>$auth_except_text ($user->username) $your_system_text";
299
			$l_logout = "<a href=\"\">معلومات على الاتصالات </a>";
300
			$l_logout = "<a href=\"\">معلومات على الاتصالات </a>";
300
		}
301
		}
301
	}
302
	}
302
	$change_pass_text = "غير كلمتك السرية";
303
	$change_pass_text = "غير كلمتك السرية";
303
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">$change_pass_text</a>";
304
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">$change_pass_text</a>";
304
	$redirect_sms_text = "يوجهك على الصفحة التفسيرية للتسجيل الذاتي بطريقة";
305
	$redirect_sms_text = "يوجهك على الصفحة التفسيرية للتسجيل الذاتي بطريقة";
305
	$login_text = "تسجيل الدخول";
306
	$login_text = "تسجيل الدخول";
306
	$your_phone_text = "رقم الهاتف الخاص بك";
307
	$your_phone_text = "رقم الهاتف الخاص بك";
307
	$pass_text = "كلمة السر";
308
	$pass_text = "كلمة السر";
308
	$your_message_text = "رسالتك";
309
	$your_message_text = "رسالتك";
309
	$previous_text = "الصفحة السابقة";
310
	$previous_text = "الصفحة السابقة";
310
	$l_back_page = "<a href=\"javascript:history.back()\">$previous_text</a>";
311
	$l_back_page = "<a href=\"javascript:history.back()\">$previous_text</a>";
311
	$l_explain_warn = "المسؤول أنشأ أرشيفاً تحتوي على سجلات الاتصال في إطار تحقيق قضائي";
312
	$l_explain_warn = "المسؤول أنشأ أرشيفاً تحتوي على سجلات الاتصال في إطار تحقيق قضائي";
312
	$understand_text = "أنا متفهم و أريد ان أواصل التصفح";
313
	$understand_text = "أنا متفهم و أريد ان أواصل التصفح";
313
	if (isset($_GET['url'])) {
314
	if (isset($_GET['url'])) {
314
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">$understand_text</a>";
315
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">$understand_text</a>";
315
	} else {
316
	} else {
316
		$l_continue_link = "<a href=\"index.php\" class=\"button\">$understand_text</a>";
317
		$l_continue_link = "<a href=\"index.php\" class=\"button\">$understand_text</a>";
317
	}
318
	}
318
	$l_title_warn = "عزيزي المستعمل, ";
319
	$l_title_warn = "عزيزي المستعمل, ";
319
	$l_explain_warn_name = "شخص مسمىٰ ";
320
	$l_explain_warn_name = "شخص مسمىٰ ";
320
	$l_explain_warn_ip = "تحت هذا IP: ";
321
	$l_explain_warn_ip = "تحت هذا IP: ";
321
	$l_explain_warn_date = "إطّلع على سجلات الاتصال الخاصة بك في";
322
	$l_explain_warn_date = "إطّلع على سجلات الاتصال الخاصة بك في";
322
	$l_explain_warn_reason = "السبب المسرّح به: ";
323
	$l_explain_warn_reason = "السبب المسرّح به: ";
323
	$l_uam_domain = ":المواقع المسموحة ";
324
	$l_uam_domain = ":المواقع المسموحة ";
324
} else if ($Language === 'de') {		// German
325
} else if ($Language === 'de') {		// German
325
	$l_access_denied = "Zugangskontrolle";
326
	$l_access_denied = "Zugangskontrolle";
326
	$l_access_welcome = "Willkommen bei ALCASAR";
327
	$l_access_welcome = "Willkommen bei ALCASAR";
327
	$l_access_unavailable = "ZUGANG NICHT MÖGLICH";
328
	$l_access_unavailable = "ZUGANG NICHT MÖGLICH";
328
	$l_required_domain = "Website benötigt";
329
	$l_required_domain = "Website benötigt";
329
	$l_explain_acc_access = "Hier ist das Kontrollcenter. Sie benötigen einen Account mit Administratorrechten.";
330
	$l_explain_acc_access = "Hier ist das Kontrollcenter. Sie benötigen einen Account mit Administratorrechten.";
330
	$l_explain_access_deny = "Sie haben versucht sich mit einer Seite zu verbinden, die möglicherweise unangemessene Inhalte beinhaltet.";
331
	$l_explain_access_deny = "Sie haben versucht sich mit einer Seite zu verbinden, die möglicherweise unangemessene Inhalte beinhaltet.";
331
	$l_explain_net_pb = "Offenbar funktioniert ihr Internetzugriff nicht.";
332
	$l_explain_net_pb = "Offenbar funktioniert ihr Internetzugriff nicht.";
332
	$l_contact_access_deny = "Kontaktieren Sie ihren Sicherheitsbeauftragten wenn Sie denken dass diese Filterung unangemessen ist.";
333
	$l_contact_access_deny = "Kontaktieren Sie ihren Sicherheitsbeauftragten wenn Sie denken dass diese Filterung unangemessen ist.";
333
	$l_contact_net_pb = "Kontaktieren Sie Ihren Netzwerkbeauftragten oder Ihren Internetanbieter für weitere Informationen.";
334
	$l_contact_net_pb = "Kontaktieren Sie Ihren Netzwerkbeauftragten oder Ihren Internetanbieter für weitere Informationen.";
334
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">Melden Sie sich per SMS an</a>";
335
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">Melden Sie sich per SMS an</a>";
335
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">Melden Sie sich per E-Mail an</a>";
336
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">Melden Sie sich per E-Mail an</a>";
336
	$l_install_certif = "Das ALCASAR AC Zertifikat installieren";
337
	$l_install_certif = "Das ALCASAR AC Zertifikat installieren";
337
	$l_category = "Kategorie:";
338
	$l_category = "Kategorie:";
338
	if (!$user->connected) {
339
	if (!$user->connected) {
339
		$l_logout_explain = "Zurzeit ist keine Internetsitzung auf Ihrem System aktiv";
340
		$l_logout_explain = "Zurzeit ist keine Internetsitzung auf Ihrem System aktiv";
340
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Eine neue Internetzsitzung eröffnen</a>";
341
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Eine neue Internetzsitzung eröffnen</a>";
341
	} else {
342
	} else {
342
		if ($user->username != $user->mac) { // authentication exception or not
343
		if ($user->username != $user->mac) { // authentication exception or not
343
			$l_logout_explain = "Aktuell eingeloggter User: <a href=\"$logout_link\" title=\"Ausloggen $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history letzte Verbindungen:$connection_history";
344
			$l_logout_explain = "Aktuell eingeloggter User: <a href=\"$logout_link\" title=\"Ausloggen $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history letzte Verbindungen:$connection_history";
344
			$l_logout = "<a href=\"$logout_link\">Aus dem Internet ausloggen</a>";
345
			$l_logout = "<a href=\"$logout_link\">Aus dem Internet ausloggen</a>";
345
		} else {
346
		} else {
346
			$l_logout_explain = "Ihr System ($user->username) ist nicht authentifiziert.<br><br>$nb_connection_history Letzte Verbindungen:$connection_history";
347
			$l_logout_explain = "Ihr System ($user->username) ist nicht authentifiziert.<br><br>$nb_connection_history Letzte Verbindungen:$connection_history";
347
			$l_logout = "<a href=\"\">Informationen zur Verbindung</a>";
348
			$l_logout = "<a href=\"\">Informationen zur Verbindung</a>";
348
		}
349
		}
349
	}
350
	}
350
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Passwort ändern</a>";
351
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Passwort ändern</a>";
351
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
352
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
352
	$l_explain_warn = "Der Administrator wird ein Archiv erstellen, welches Ihre Logdaten für den Fall einer gerichtlichen Untersuchung beinhaltet.";
353
	$l_explain_warn = "Der Administrator wird ein Archiv erstellen, welches Ihre Logdaten für den Fall einer gerichtlichen Untersuchung beinhaltet.";
353
	if (isset($_GET['url'])) {
354
	if (isset($_GET['url'])) {
354
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Ich verstehe und möchte fortfahren.</a>";
355
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Ich verstehe und möchte fortfahren.</a>";
355
	} else {
356
	} else {
356
		$l_continue_link = "<a href=\"index.php\" class=\"button\">Ich verstehe und möchte fortfahren.</a>";
357
		$l_continue_link = "<a href=\"index.php\" class=\"button\">Ich verstehe und möchte fortfahren.</a>";
357
	}
358
	}
358
	$l_title_warn="Lieber Benutzer,";
359
	$l_title_warn="Lieber Benutzer,";
359
	$l_explain_warn_name="Jemand namens ";
360
	$l_explain_warn_name="Jemand namens ";
360
	$l_explain_warn_ip="mit dieser IP: ";
361
	$l_explain_warn_ip="mit dieser IP: ";
361
	$l_explain_warn_date="hat Ihre Verbindungsdaten eingesehen, für den ";
362
	$l_explain_warn_date="hat Ihre Verbindungsdaten eingesehen, für den ";
362
	$l_explain_warn_reason="Grund: ";
363
	$l_explain_warn_reason="Grund: ";
363
	$l_uam_domain = "Authorisierte Webseiten: ";
364
	$l_uam_domain = "Authorisierte Webseiten: ";
364
} else if ($Language === 'es'){	// Spanish
365
} else if ($Language === 'es'){	// Spanish
365
	$l_access_denied = "Control de Acceso";
366
	$l_access_denied = "Control de Acceso";
366
	$l_access_welcome = "Bienvenido, Ud. está en ALCASAR";
367
	$l_access_welcome = "Bienvenido, Ud. está en ALCASAR";
367
	$l_access_unavailable = "ACCESO NO DISPONIBLE";
368
	$l_access_unavailable = "ACCESO NO DISPONIBLE";
368
	$l_required_domain = "Sitio WEB solicitado";
369
	$l_required_domain = "Sitio WEB solicitado";
369
	$l_explain_acc_access = "Este acceso gestiona el portal. Tiene que tener una cuenta administrativa.";
370
	$l_explain_acc_access = "Este acceso gestiona el portal. Tiene que tener una cuenta administrativa.";
370
	$l_explain_access_deny = "Intenta conectarse a un recurso cuyo contenido se considera que contiene información inapropiada.";
371
	$l_explain_access_deny = "Intenta conectarse a un recurso cuyo contenido se considera que contiene información inapropiada.";
371
	$l_explain_net_pb = "El sistema informa que el acceso a Internet no esta disponible.";
372
	$l_explain_net_pb = "El sistema informa que el acceso a Internet no esta disponible.";
372
	$l_contact_access_deny = "Por favor póngase en contacto con el administrador de la red si cree que este filtrado es abusivo";
373
	$l_contact_access_deny = "Por favor póngase en contacto con el administrador de la red si cree que este filtrado es abusivo";
373
	$l_contact_net_pb = "Póngase en contacto con el responsable de la red o con su proveedor de Internet para obtener más información.";
374
	$l_contact_net_pb = "Póngase en contacto con el responsable de la red o con su proveedor de Internet para obtener más información.";
374
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">Registro por SMS</a>";
375
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">Registro por SMS</a>";
375
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">Registro por Email</a>";
376
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">Registro por Email</a>";
376
	$l_install_certif = "Instalar certificado ALCASAR AC";
377
	$l_install_certif = "Instalar certificado ALCASAR AC";
377
	$l_category = "categoría:";
378
	$l_category = "categoría:";
378
	if (!$user->connected) {
379
	if (!$user->connected) {
379
		$l_logout_explain = "Actualmente no hay una sesión de acceso a Internet abierta por su sistema";
380
		$l_logout_explain = "Actualmente no hay una sesión de acceso a Internet abierta por su sistema";
380
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Abra una sesión de Internet</a>";
381
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Abra una sesión de Internet</a>";
381
	} else {
382
	} else {
382
		if ($user->username != $user->mac) { // authentication exception or not
383
		if ($user->username != $user->mac) { // authentication exception or not
383
			$l_logout_explain = "Cierre la sesión del usuario actualmente conectado.<br> Usuario conectado: <a href=\"$logout_link\" title=\"Desconectar usuario $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history ultimas sesiones:$connection_history";
384
			$l_logout_explain = "Cierre la sesión del usuario actualmente conectado.<br> Usuario conectado: <a href=\"$logout_link\" title=\"Desconectar usuario $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history ultimas sesiones:$connection_history";
384
			$l_logout = "<a href=\"$logout_link\">Desconectarse de internet</a>";
385
			$l_logout = "<a href=\"$logout_link\">Desconectarse de internet</a>";
385
		} else {
386
		} else {
386
			$l_logout_explain = "El sistema ($user->username) detectó un exceso en las autenticaciones.<br><br>$nb_connection_history Últimas conexiones:$connection_history";
387
			$l_logout_explain = "El sistema ($user->username) detectó un exceso en las autenticaciones.<br><br>$nb_connection_history Últimas conexiones:$connection_history";
387
			$l_logout = "Información sobre las conexiones";
388
			$l_logout = "Información sobre las conexiones";
388
		}
389
		}
389
	}
390
	}
390
	$l_password_change = "<a href=\"https://$hostname/password.php\">Cambie su contraseña</a>";
391
	$l_password_change = "<a href=\"https://$hostname/password.php\">Cambie su contraseña</a>";
391
	$l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
392
	$l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
392
	$l_explain_warn = "El administrador creó un archivo que contiene sus registros de navegacion para una investigación legal.";
393
	$l_explain_warn = "El administrador creó un archivo que contiene sus registros de navegacion para una investigación legal.";
393
	if (isset($_GET['url'])) {
394
	if (isset($_GET['url'])) {
394
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Entiendo y deseo continuar.</a>";
395
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Entiendo y deseo continuar.</a>";
395
	} else {
396
	} else {
396
		$l_continue_link = "<a href=\"index.php\" class=\"button\">Entiendo y deseo continuar.</a>";
397
		$l_continue_link = "<a href=\"index.php\" class=\"button\">Entiendo y deseo continuar.</a>";
397
	}
398
	}
398
	$l_title_warn="Estimado usuario,";
399
	$l_title_warn="Estimado usuario,";
399
	$l_explain_warn_name="Alguien llamado ";
400
	$l_explain_warn_name="Alguien llamado ";
400
	$l_explain_warn_ip="con esta IP: ";
401
	$l_explain_warn_ip="con esta IP: ";
401
	$l_explain_warn_date="ha leído sus registros de conexión el ";
402
	$l_explain_warn_date="ha leído sus registros de conexión el ";
402
	$l_explain_warn_reason="Debido a: ";
403
	$l_explain_warn_reason="Debido a: ";
403
	$l_uam_domain = "Sitios web autorizados: ";
404
	$l_uam_domain = "Sitios web autorizados: ";
404
} else {	// English
405
} else {	// English
405
	$l_access_denied = "Access control";
406
	$l_access_denied = "Access control";
406
	$l_access_welcome = "Welcome to ALCASAR";
407
	$l_access_welcome = "Welcome to ALCASAR";
407
	$l_access_unavailable = "ACCESS UNAVAILABLE";
408
	$l_access_unavailable = "ACCESS UNAVAILABLE";
408
	$l_required_domain = "Required WEB site";
409
	$l_required_domain = "Required WEB site";
409
	$l_explain_acc_access = "This center control the portal. You must have an administrative account.";
410
	$l_explain_acc_access = "This center control the portal. You must have an administrative account.";
410
	$l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
411
	$l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
411
	$l_explain_net_pb = "Your portal has just detected that the Internet access is down";
412
	$l_explain_net_pb = "Your portal has just detected that the Internet access is down";
412
	$l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
413
	$l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
413
	$l_contact_net_pb = "Contact your network responsive or your Internet provider for further information.";
414
	$l_contact_net_pb = "Contact your network responsive or your Internet provider for further information.";
414
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">Register by SMS</a>";
415
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">Register by SMS</a>";
415
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">Register by Email</a>";
416
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">Register by Email</a>";
416
	$l_install_certif = "Install ALCASAR AC Certificate";
417
	$l_install_certif = "Install ALCASAR AC Certificate";
417
	$l_category = "category:";
418
	$l_category = "category:";
418
	if (!$user->connected) {
419
	if (!$user->connected) {
419
		$l_logout_explain = "No session is currently open";
420
		$l_logout_explain = "No session is currently open";
420
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Open an Internet session</a>";
421
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Open an Internet session</a>";
421
	} else {
422
	} else {
422
		if ($user->username != $user->mac) { // authentication exception or not
423
		if ($user->username != $user->mac) { // authentication exception or not
423
			$l_logout_explain = "User logged-on: <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history last connections:$connection_history";
424
			$l_logout_explain = "User logged-on: <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history last connections:$connection_history";
424
			$l_logout = "<a href=\"$logout_link\">Logoff from the Internet</a>";
425
			$l_logout = "<a href=\"$logout_link\">Logoff from the Internet</a>";
425
		} else {
426
		} else {
426
			$l_logout_explain = "Your system ($user->username) is in exception of authentication.<br><br>$nb_connection_history Last logins:$connection_history";
427
			$l_logout_explain = "Your system ($user->username) is in exception of authentication.<br><br>$nb_connection_history Last logins:$connection_history";
427
			$l_logout = "<a href=\"\">Connections information</a>";
428
			$l_logout = "<a href=\"\">Connections information</a>";
428
		}
429
		}
429
	}
430
	}
430
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Change your password</a>";
431
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Change your password</a>";
431
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
432
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
432
	$l_explain_warn = "The administrator created an archive which contains your imputabilities logs for a judicial investigation.";
433
	$l_explain_warn = "The administrator created an archive which contains your imputabilities logs for a judicial investigation.";
433
	if (isset($_GET['url'])) {
434
	if (isset($_GET['url'])) {
434
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">I understand and I wish to continue.</a>";
435
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">I understand and I wish to continue.</a>";
435
	} else {
436
	} else {
436
		$l_continue_link = "<a href=\"index.php\" class=\"button\">I understand and I wish to continue.</a>";
437
		$l_continue_link = "<a href=\"index.php\" class=\"button\">I understand and I wish to continue.</a>";
437
	}
438
	}
438
	$l_title_warn="Dear user,";
439
	$l_title_warn="Dear user,";
439
	$l_explain_warn_name="Someone called ";
440
	$l_explain_warn_name="Someone called ";
440
	$l_explain_warn_ip="with this IP: ";
441
	$l_explain_warn_ip="with this IP: ";
441
	$l_explain_warn_date="has read your connection logs at ";
442
	$l_explain_warn_date="has read your connection logs at ";
442
	$l_explain_warn_reason="For this reason: ";
443
	$l_explain_warn_reason="For this reason: ";
443
	$l_uam_domain = "Authorized websites: ";
444
	$l_uam_domain = "Authorized websites: ";
444
}
445
}
445
 
446
 
446
$l_title   = ($direct_access ? $l_access_welcome     : ($network_pb ? $l_access_unavailable : $l_access_denied));
447
$l_title   = ($direct_access ? $l_access_welcome     : ($network_pb ? $l_access_unavailable : $l_access_denied));
447
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb     : $l_explain_access_deny));
448
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb     : $l_explain_access_deny));
448
 
449
 
449
// Set the icons
450
// Set the icons
450
$img_rep			= '/images/';
451
$img_rep			= '/images/';
451
$img_organisme		= 'organisme.png';
452
$img_organisme		= 'organisme.png';
452
$img_access			= 'globe_acces_70.png';
453
$img_access			= 'globe_acces_70.png';
453
$img_connect		= 'globe_70.png';
454
$img_connect		= 'globe_70.png';
454
$img_warning		= 'globe_warning_70.png';
455
$img_warning		= 'globe_warning_70.png';
455
$img_pwd			= 'cle_ombre.png';
456
$img_pwd			= 'cle_ombre.png';
456
$img_certificate	= 'certificat.png';
457
$img_certificate	= 'certificat.png';
457
$img_acc			= 'logo-alcasar_70.png';
458
$img_acc			= 'logo-alcasar_70.png';
458
$img_sms			= 'sms.png';
459
$img_sms			= 'sms.png';
459
$img_email			= 'email.png';
460
$img_email			= 'email.png';
460
$img_false			= 'interdit.png';
461
$img_false			= 'interdit.png';
461
$img_adm			= 'adm.png';
462
$img_adm			= 'adm.png';
462
$img_internet		= (($user->connected) ? $img_connect : ($network_pb ? $img_warning : $img_access));
463
$img_internet		= (($user->connected) ? $img_connect : ($network_pb ? $img_warning : $img_access));
463
 
464
 
464
if ($direct_access) {
465
if ($direct_access) {
465
	// Read the "Domain allowed" file
466
	// Read the "Domain allowed" file
466
	$domainsAllowed = [];
467
	$domainsAllowed = [];
467
	$fileContent = file(DOMAIN_ALLOWED_LIST); if ($fileContent) { // the file isn't empty
468
	$fileContent = file(DOMAIN_ALLOWED_LIST); if ($fileContent) { // the file isn't empty
468
       	foreach ($fileContent as $line) {
469
       	foreach ($fileContent as $line) {
469
			if (!empty(trim($line))) {
470
			if (!empty(trim($line))) {
470
				if (strpos ($line, '#')) { // the domain should be displayed
471
				if (strpos ($line, '#')) { // the domain should be displayed
471
					$domain_fields = explode('#', $line);
472
					$domain_fields = explode('#', $line);
472
					$domain = explode('"', $domain_fields[0]);
473
					$domain = explode('"', $domain_fields[0]);
473
					$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
474
					$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
474
					$domainsAllowed[] = (object) [
475
					$domainsAllowed[] = (object) [
475
						'name'   => trim($domain_fields[1]),
476
						'name'   => trim($domain_fields[1]),
476
						'domain' => trim($domain[1])
477
						'domain' => trim($domain[1])
477
					];
478
					];
478
					
479
					
479
				}
480
				}
480
			}
481
			}
481
		}
482
		}
482
	}
483
	}
483
} else {
484
} else {
484
	 if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1') {
485
	 if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1') {
485
		// user need to be warned that someone reads his logs
486
		// user need to be warned that someone reads his logs
486
		$filename = '/var/www/html/acc/backup/log_info.txt';
487
		$filename = '/var/www/html/acc/backup/log_info.txt';
487
		if (file_exists($filename)) {
488
		if (file_exists($filename)) {
488
			$fichier = fopen($filename, 'r');
489
			$fichier = fopen($filename, 'r');
489
			$content = file($filename);
490
			$content = file($filename);
490
			foreach ($content as $line) {
491
			foreach ($content as $line) {
491
				$infos = explode('|||', $line);
492
				$infos = explode('|||', $line);
492
				$log_date   = $infos[0];
493
				$log_date   = $infos[0];
493
				$log_user   = $infos[1];
494
				$log_user   = $infos[1];
494
				$log_reason = $infos[2];
495
				$log_reason = $infos[2];
495
				$log_ip     = $infos[3];
496
				$log_ip     = $infos[3];
496
			}
497
			}
497
			$l_explain_warn = "$l_explain_warn_name$log_user ($l_explain_warn_ip$log_ip) $l_explain_warn_date$log_date.<br>$l_explain_warn_reason<br>$log_reason";
498
			$l_explain_warn = "$l_explain_warn_name$log_user ($l_explain_warn_ip$log_ip) $l_explain_warn_date$log_date.<br>$l_explain_warn_reason<br>$log_reason";
498
		} else {
499
		} else {
499
			$l_explain_warn = 'Log error!';
500
			$l_explain_warn = 'Log error!';
500
		}
501
		}
501
	}
502
	}
502
}
503
}
503
 
504
 
504
// Search blacklist categories
505
// Search blacklist categories
505
if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))) {
506
if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))) {
506
	$pattern = str_replace('www.', '', $_SERVER['HTTP_HOST']);
507
	$pattern = str_replace('www.', '', $_SERVER['HTTP_HOST']);
507
	$categories = [];
508
	$categories = [];
508
	exec('grep -Re ' . escapeshellarg('^'.$pattern.'$') . " /etc/e2guardian/lists/blacklists/*/domains | cut -d'/' -f6", $categories);
509
	exec('grep -Re ' . escapeshellarg('^'.$pattern.'$') . " /etc/e2guardian/lists/blacklists/*/domains | cut -d'/' -f6", $categories);
509
	$filteredUrlHtml = $l_required_domain.' : '.htmlspecialchars($_SERVER['HTTP_HOST']);
510
	$filteredUrlHtml = $l_required_domain.' : '.htmlspecialchars($_SERVER['HTTP_HOST']);
510
	if (empty($categories)) { // try again to search the category removing the prefix of the domain name
511
	if (empty($categories)) { // try again to search the category removing the prefix of the domain name
511
		$tiny_pattern = substr(stristr($pattern, '.'), 1);
512
		$tiny_pattern = substr(stristr($pattern, '.'), 1);
512
		exec('grep -Re ' . escapeshellarg('^'.$tiny_pattern.'$') . " /etc/e2guardian/lists/blacklists/*/domains | cut -d'/' -f6", $categories);
513
		exec('grep -Re ' . escapeshellarg('^'.$tiny_pattern.'$') . " /etc/e2guardian/lists/blacklists/*/domains | cut -d'/' -f6", $categories);
513
	}
514
	}
514
	if (!empty($categories)) {
515
	if (!empty($categories)) {
515
		$filteredUrlHtml .= "<br>$l_category ".implode(', ', $categories);
516
		$filteredUrlHtml .= "<br>$l_category ".implode(', ', $categories);
516
	}
517
	}
517
}
518
}
518
////////////////////////////////////////////////////////////////////////
519
////////////////////////////////////////////////////////////////////////
519
/////////////////////////// TEST VARIABLES /////////////////////////////
520
/////////////////////////// TEST VARIABLES /////////////////////////////
520
////////////////////////////////////////////////////////////////////////
521
////////////////////////////////////////////////////////////////////////
521
//$service_SMS_status = true;
522
//$service_SMS_status = true;
522
//$direct_access = true;
523
//$direct_access = true;
523
//$network_pb = false;
524
//$network_pb = false;
524
//$domainsAllowed[] = (object) [
525
//$domainsAllowed[] = (object) [
525
//	'name'   => 'name_test',
526
//	'name'   => 'name_test',
526
//	'domain' => 'domain_test' 
527
//	'domain' => 'domain_test' 
527
//];
528
//];
528
/////////////////////////////////////////////////////////////////////////
529
/////////////////////////////////////////////////////////////////////////
529
 
530
 
530
// Cleaning the cache
531
// Cleaning the cache
531
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
532
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
532
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
533
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
533
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
534
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
534
header('Cache-Control: post-check=0, pre-check=0', false);
535
header('Cache-Control: post-check=0, pre-check=0', false);
535
header('Pragma: no-cache');
536
header('Pragma: no-cache');
536
?>
537
?>
537
<!DOCTYPE html>
538
<!DOCTYPE html>
538
<html>
539
<html>
539
	<head>
540
	<head>
540
		<meta charset="UTF-8">
541
		<meta charset="UTF-8">
541
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
542
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
542
		<title><?= $l_title ?></title>
543
		<title><?= $l_title ?></title>
543
		<link rel="stylesheet" type="text/css" href="<?= ((!$direct_access) ? "//$hostname" : '') ?>/css/bootstrap.min.css">
544
		<link rel="stylesheet" type="text/css" href="<?= ((!$direct_access) ? "//$hostname" : '') ?>/css/bootstrap.min.css">
544
		<link rel="stylesheet" type="text/css" href="/css/index.css">
545
		<link rel="stylesheet" type="text/css" href="/css/index.css">
545
		<link rel="icon" href="/images/favicon-48.ico" type="image/ico">
546
		<link rel="icon" href="/images/favicon-48.ico" type="image/ico">
546
<? if ($service_wifi4eu_status): ?>
547
<? if ($service_wifi4eu_status): ?>
547
		<script type="text/javascript">
548
		<script type="text/javascript">
548
			var wifi4euTimerStart = Date.now();
549
			var wifi4euTimerStart = Date.now();
549
			var wifi4euNetworkIdentifier = '<?= $service_wifi4eu_code ?>';
550
			var wifi4euNetworkIdentifier = '<?= $service_wifi4eu_code ?>';
550
			var wifi4euLanguage = '<?= $Language ?>';
551
			var wifi4euLanguage = '<?= $Language ?>';
551
			//var selftestModus = true;
552
			//var selftestModus = true;
552
		</script>
553
		</script>
553
		<script type="text/javascript" src="<?= $service_wifi4eu_server ?>"></script>
554
		<script type="text/javascript" src="<?= $service_wifi4eu_server ?>"></script>
554
<? endif; ?>
555
<? endif; ?>
555
	</head>
556
	</head>
556
	<body>
557
	<body>
557
	<div class="col-xs-12 col-md-10 col-md-offset-1"> 
558
	<div class="col-12 col-lg-10 offset-lg-1">
558
 
559
 
559
		<!-- HeaderBox -->
-
 
560
		<div class="row banner">
-
 
561
			<!-- Logo box -->
-
 
562
			<div class="img_banner hidden-xs col-sm-3 col-md-2 col-lg-2">
-
 
563
				<img class="img-responsive img-organisme" src="<?= ((!$direct_access) ? "//$hostname" : '') ?><?= $img_rep.$img_organisme ?>">
-
 
564
			</div>
-
 
565
 
-
 
566
			<!-- Title -->
-
 
567
			<div id="cadre_titre" class="titre_banner col-xs-12 col-sm-8">
-
 
568
				<?php if ($direct_access): ?>
-
 
569
					<?php if ($service_wifi4eu_status): ?>
-
 
570
						<img id="wifi4eubanner">
-
 
571
					<?php else: ?>
-
 
572
						<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
-
 
573
					<?php endif; ?>
-
 
574
				<?php if ($network_pb): ?>
-
 
575
					<div class="explanation_net_pb"><?= $l_explain_net_pb ?></div>
-
 
576
				<?php endif; ?>
-
 
577
				<?php else: // the user is intercepted ?>
560
		<?php require_once(__DIR__.'/header.php'); ?>
578
					<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'): // if user need to be warm that someone reads his log ?>
-
 
579
						<div id="cadre_titre" class="titre_refus">
-
 
580
							<p id="acces_controle" class="titre_refus"><?= $l_title_warn ?></p>
-
 
581
						</div>
-
 
582
					<?php else: // the user is blacklisted (or whitelisted) ?>
-
 
583
						<div id="cadre_titre" class="titre_refus">
-
 
584
							<p id="acces_controle" class="titre_refus"><?= $l_title ?></p>
-
 
585
						</div>
-
 
586
					<?php endif; ?>
-
 
587
				<?php endif; ?>
-
 
588
			</div>
-
 
589
			
-
 
590
			<!-- Logo box -->
-
 
591
			<div class="img_banner hidden-xs col-sm-3 col-md-2 col-lg-2">
-
 
592
				<img class="img-responsive img-organisme" src="<?= ((!$direct_access) ? "//$hostname" : '') ?><?= $img_rep.$img_acc ?>">
-
 
593
			</div>
-
 
594
		</div>
-
 
595
 
561
 
596
		<!-- Main content box -->
562
		<!-- Main content box -->
597
		<div class="row">
563
		<div class="row">
598
			<div id="contenu_acces" class="col-xs-12 col-lg-offset-1 col-lg-10">
564
			<div id="contenu_acces" class="col-12 offset-lg-1 col-lg-10 row">
599
				<?php if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))): // print blacklist categories ?>
565
				<?php if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))): // print blacklist categories ?>
600
				<div id="box_url">
566
				<div id="box_url">
601
					<br>
567
					<br>
602
					<?= $l_explain ?>
568
					<?= $l_explain ?>
603
				</div>
569
				</div>
604
				<?php endif; ?>
570
				<?php endif; ?>
605
 
571
 
606
				<!-- Menu -->
572
				<!-- Menu -->
607
				<div class="menu-container container col_xs_12 col-sm-7">
573
				<div class="menu-container container col-12 col-md-7">
608
					<?php if ($direct_access): ?>
574
					<?php if ($direct_access): ?>
609
						<div class="box_menu<?= (!$network_pb) ? '' : ' box-menu-disabled' ?>" id="box_conn" <?= (!$network_pb) ? '' : 'title=\'Not available\'' ?>>
575
						<div class="box_menu<?= (!$network_pb) ? '' : ' box-menu-disabled' ?>" id="box_conn" <?= (!$network_pb) ? '' : 'title=\'Not available\'' ?>>
610
							<span><?= $l_logout ?></span>
576
							<span><?= $l_logout ?></span>
611
							<div class="menu-image">
577
							<div class="menu-image">
612
								<img class="img-responsive" src="<?= $img_rep.$img_internet ?>">
578
								<img class="img-fluid" src="<?= $img_rep.$img_internet ?>">
613
							</div>
579
							</div>
614
						</div>
580
						</div>
615
 
581
 
616
						<div class="box_menu_right box_menu" id="box_certif">
582
						<div class="box_menu_right box_menu" id="box_certif">
617
							<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
583
							<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
618
							<div class="menu-image">
584
							<div class="menu-image">
619
								<img class="img-responsive" src="<?= $img_rep.$img_certificate ?>">
585
								<img class="img-fluid" src="<?= $img_rep.$img_certificate ?>">
620
							</div>
586
							</div>
621
						</div>
587
						</div>
622
 
588
 
623
						<div class="box_menu" id="box_mdp" >
589
						<div class="box_menu" id="box_mdp" >
624
							<div class="menu-image">
590
							<div class="menu-image">
625
								<img class="img-responsive" src="<?= $img_rep.$img_pwd ?>">
591
								<img class="img-fluid" src="<?= $img_rep.$img_pwd ?>">
626
							</div>
592
							</div>
627
							<span><?= $l_password_change ?></span>
593
							<span><?= $l_password_change ?></span>
628
						</div>
594
						</div>
629
 
595
 
630
					<?php if ($service_SMS_status === true): ?>
596
					<?php if ($service_SMS_status === true): ?>
631
						<div class="box_menu_right box_menu" id="box_sms">
597
						<div class="box_menu_right box_menu" id="box_sms">
632
							<span><?= $l_sms_access ?></span>
598
							<span><?= $l_sms_access ?></span>
633
							<div class="menu-image">
599
							<div class="menu-image">
634
								<img class="img-responsive menu-image" src="<?= $img_rep.$img_sms ?>">
600
								<img class="img-fluid menu-image" src="<?= $img_rep.$img_sms ?>">
635
							</div>
601
							</div>
636
						</div>
602
						</div>
637
					<?php endif; ?>
603
					<?php endif; ?>
638
 
604
 
639
					<?php if ($service_Email_status === true): ?>
605
					<?php if ($service_Email_status === true): ?>
640
						<div class="box_menu_right box_menu" id="box_email">
606
						<div class="box_menu_right box_menu" id="box_email">
641
							<span><?= $l_email_access ?></span>
607
							<span><?= $l_email_access ?></span>
642
							<div class="menu-image">
608
							<div class="menu-image">
643
								<img class="img-responsive menu-image" src="<?= $img_rep.$img_email ?>">
609
								<img class="img-fluid menu-image" src="<?= $img_rep.$img_email ?>">
644
							</div>
610
							</div>
645
						</div>
611
						</div>
646
					<?php endif; ?>
612
					<?php endif; ?>
647
				</div>
613
				</div>
648
 
614
 
649
				<!-- Info Box -->
615
				<!-- Info Box -->
650
				<div class="info-box-container col-sm-5">	
616
				<div class="info-box-container col-md-5">	
651
					<div id="box_infos">
617
					<div id="box_infos">
652
						<p class="box_infos_explanations"><?= $l_logout_explain ?>
618
						<p class="box_infos_explanations"><?= $l_logout_explain ?>
653
							
619
							
654
						<?php if (!empty($domainsAllowed)): ?>
620
						<?php if (!empty($domainsAllowed)): ?>
655
							<p class="domain_allowed_title"><?= $l_uam_domain ?></p>
621
							<p class="domain_allowed_title"><?= $l_uam_domain ?></p>
656
							<ul>
622
							<ul>
657
								<?php foreach ($domainsAllowed as $domainAllowed): ?>
623
								<?php foreach ($domainsAllowed as $domainAllowed): ?>
658
									<li><a href="http://<?= $domainAllowed->domain ?>"><?= $domainAllowed->name ?></a></li>
624
									<li><a href="http://<?= $domainAllowed->domain ?>"><?= $domainAllowed->name ?></a></li>
659
								<?php endforeach; ?>
625
								<?php endforeach; ?>
660
							</ul>
626
							</ul>
661
						<?php endif; ?>
627
						<?php endif; ?>
662
 
628
 
663
						<?php else: // the user is intercepted ?>
629
						<?php else: // the user is intercepted ?>
664
							<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1'): // user need to be warned that someone reads his logs ?>
630
							<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1'): // user need to be warned that someone reads his logs ?>
665
								<div id="box_refuse">
631
								<div id="box_refuse">
666
									<img src="//<?= $hostname.$img_rep.$img_warning ?>">
632
									<img src="//<?= $hostname.$img_rep.$img_warning ?>">
667
									<p><?= $l_explain_warn ?></p>
633
									<p><?= $l_explain_warn ?></p>
668
								</div>
634
								</div>
669
								<div id="liens_redir">
635
								<div id="liens_redir">
670
									<p><?= $l_continue_link ?></p>
636
									<p><?= $l_continue_link ?></p>
671
								</div>
637
								</div>
672
							<?php else: ?>
638
							<?php else: ?>
673
								<table width="80%">
639
								<table width="80%">
674
									<tr>
640
									<tr>
675
										<td><img src="//<?= $hostname.$img_rep.$img_false ?>"></td>
641
										<td><img src="//<?= $hostname.$img_rep.$img_false ?>"></td>
676
										<?php if (($network_pb) && (!$direct_access)): ?>
642
										<?php if (($network_pb) && (!$direct_access)): ?>
677
										<td><?= "Diagnostic : $diagnostic" ?></td>
643
										<td><?= "Diagnostic : $diagnostic" ?></td>
678
										<?php else: ?>
644
										<?php else: ?>
679
										<td><?= $filteredUrlHtml ?></td>
645
										<td><?= $filteredUrlHtml ?></td>
680
										<?php endif; ?>
646
										<?php endif; ?>
681
									</tr><tr>
647
									</tr><tr>
682
										<td></td><td><?= $l_back_page ?></td>
648
										<td></td><td><?= $l_back_page ?></td>
683
									</tr>
649
									</tr>
684
								</table>
650
								</table>
685
							<?php endif; ?>
651
							<?php endif; ?>
686
						<?php endif; ?>
652
						<?php endif; ?>
687
					</div>
653
					</div>
688
				</div>
654
				</div>
689
			</div>
655
			</div>
690
			<?php if ($direct_access): // display the admin logo (wheel) at the bottom right ?>
656
			<?php if ($direct_access): // display the admin logo (wheel) at the bottom right ?>
691
			<div id="corner">
657
			<div id="corner">
692
				<div id="adm" class="corn">
658
				<div id="adm" class="corn">
693
					<a href="<?= "https://$hostname/acc/" ?>"><img src="<?= $img_rep.$img_adm ?>"></a>
659
					<a href="<?= "https://$hostname/acc/" ?>"><img src="<?= $img_rep.$img_adm ?>"></a>
694
				</div>
660
				</div>
695
			</div>
661
			</div>
696
		</div>
662
		</div>
697
		<?php endif; ?>
663
		<?php endif; ?>
698
	</div>
664
	</div>
699
	</body>
665
	</body>
700
</html>
666
</html>
701
 
667