Subversion Repositories ALCASAR

Rev

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

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