Subversion Repositories ALCASAR

Rev

Rev 3097 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

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