Subversion Repositories ALCASAR

Rev

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

Rev 3026 Rev 3034
1
<?php
1
<?php
2
# $Id: index.php 3026 2022-06-30 21:53:54Z rexy $
2
# $Id: index.php 3034 2022-07-06 09:19:47Z 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 = 'www.euronews.com'; // Default redirection for HTTP interception (beware, this website must run in HTTP)
60
$redirect_link = 'www.euronews.com'; // Default redirection for HTTP interception (beware, this website must run in HTTP)
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'));
-
 
67
$cert_autoissued = ($certificateInfos["subject"]["O"] == $certificateInfos["issuer"]["O"]);
66
 
68
 
67
// Retrieve the user info behind the remote ip
69
// Retrieve the user info behind the remote ip
68
$output = [];
70
$output = [];
69
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);
70
if (!empty($output)) {
72
if (!empty($output)) {
71
	$userRaw = explode(' ', $output[0]);
73
	$userRaw = explode(' ', $output[0]);
72
	$user = (object) [
74
	$user = (object) [
73
		'mac'       =>  $userRaw[0],
75
		'mac'       =>  $userRaw[0],
74
		'connected' => ($userRaw[4] === '1'),
76
		'connected' => ($userRaw[4] === '1'),
75
		'username'  =>  $userRaw[5]
77
		'username'  =>  $userRaw[5]
76
	];
78
	];
77
} else {
79
} else {
78
	// CoovaChilli does not know the user
80
	// CoovaChilli does not know the user
79
	$user = (object) [
81
	$user = (object) [
80
		'mac'       => '',
82
		'mac'       => '',
81
		'connected' => false,
83
		'connected' => false,
82
		'username'  => ''
84
		'username'  => ''
83
	];
85
	];
84
}
86
}
85
 
87
 
86
// Test if it's a direct connection to ALCASAR
88
// Test if it's a direct connection to ALCASAR
87
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))) {
88
	$direct_access = true;
90
	$direct_access = true;
89
}
91
}
90
 
92
 
91
// Function to adapt time connection in seconds to H,M,S
93
// Function to adapt time connection in seconds to H,M,S
92
function secondsToDuration($seconds = null){
94
function secondsToDuration($seconds = null){
93
	if ($seconds == null) return "";
95
	if ($seconds == null) return "";
94
	$temp = $seconds % 3600;
96
	$temp = $seconds % 3600;
95
	$time[0] = ( $seconds - $temp ) / 3600 ;	// hours
97
	$time[0] = ( $seconds - $temp ) / 3600 ;	// hours
96
	$time[2] = $temp % 60 ;				// seconds
98
	$time[2] = $temp % 60 ;				// seconds
97
	$time[1] = ( $temp - $time[2] ) / 60;		// minutes
99
	$time[1] = ( $temp - $time[2] ) / 60;		// minutes
98
	return $time[0].' h '.$time[1].' m '.$time[2].' s';
100
	return $time[0].' h '.$time[1].' m '.$time[2].' s';
99
}
101
}
100
 
102
 
101
// if user need to be warned
103
// if user need to be warned
102
if (isset($_GET['warn']) && isset($_GET['url'])) {
104
if (isset($_GET['warn']) && isset($_GET['url'])) {
103
	$direct_access = false;
105
	$direct_access = false;
104
}
106
}
105
 
107
 
106
if ($user->connected) { // the user is authenticated
108
if ($user->connected) { // the user is authenticated
107
	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
108
		header('Location: '.$_GET['url'], true, 307);
110
		header('Location: '.$_GET['url'], true, 307);
109
		exit();
111
		exit();
110
	}
112
	}
111
 
113
 
112
	// We retrieve his three last connections
114
	// We retrieve his three last connections
113
	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'))){
114
		include_once('/etc/freeradius-web/config.php');
116
		include_once('/etc/freeradius-web/config.php');
115
		include_once('./acc/manager/lib/sql/drivers/mysql/functions.php');
117
		include_once('./acc/manager/lib/sql/drivers/mysql/functions.php');
116
		$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";
117
		$link = @da_sql_pconnect($config);
119
		$link = @da_sql_pconnect($config);
118
		if ($link) {
120
		if ($link) {
119
			$res = @da_sql_query($link,$config,$sql);
121
			$res = @da_sql_query($link,$config,$sql);
120
			if ($res) {
122
			if ($res) {
121
				$connection_history .= '<ul>';
123
				$connection_history .= '<ul>';
122
				while (($row = @da_sql_fetch_array($res,$config))) {
124
				while (($row = @da_sql_fetch_array($res,$config))) {
123
					$connected = '';
125
					$connected = '';
124
					if ($row['acctstoptime'] === '') {
126
					if ($row['acctstoptime'] === '') {
125
						$connected = ' (active)';
127
						$connected = ' (active)';
126
					}
128
					}
127
					$sessionTimeFormated = secondsToDuration($row['acctsessiontime']);
129
					$sessionTimeFormated = secondsToDuration($row['acctsessiontime']);
128
					$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>";
129
				}
131
				}
130
				$connection_history .= '</ul>';
132
				$connection_history .= '</ul>';
131
			}
133
			}
132
		}
134
		}
133
	}
135
	}
134
} else { // the user isn't authenticated
136
} else { // the user isn't authenticated
135
	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")
136
		$redir = 'http://'.$_GET['url'];
138
		$redir = 'http://'.$_GET['url'];
137
		header("Location: $redir", true, 307);
139
		header("Location: $redir", true, 307);
138
		exit();
140
		exit();
139
	}
141
	}
140
}
142
}
141
 
143
 
-
 
144
if(!$cert_autoissued && !isset($_SERVER["HTTPS"])){
-
 
145
    header("Location: https://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"], true, 301);
-
 
146
    exit();
-
 
147
}
-
 
148
 
142
// Choice of language
149
// Choice of language
143
$Language = 'en';
150
$Language = 'en';
144
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
151
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
145
	$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
152
	$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
146
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
153
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
147
}
154
}
148
if ($Language === 'fr') {		// French
155
if ($Language === 'fr') {		// French
149
	$l_access_denied = "Contrôle d'accès";
156
	$l_access_denied = "Contrôle d'accès";
150
	$l_access_welcome = "Bienvenue sur ALCASAR";
157
	$l_access_welcome = "Bienvenue sur ALCASAR";
151
	$l_access_unavailable = "ACCÈS INDISPONIBLE";
158
	$l_access_unavailable = "ACCÈS INDISPONIBLE";
152
	$l_required_domain = "Site WEB demandé";
159
	$l_required_domain = "Site WEB demandé";
153
	$l_explain_acc_access = "Le centre de gestion permet d'administrer le portail. Vous devez posséder un compte d'administration ou de gestion pour y accéder.";
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.";
154
	$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.";
155
	$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.";
156
	$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.";
157
	$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.";
158
	$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>";
159
	$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>";
160
	$l_install_certif = "Installer le certificat racine";
167
	$l_install_certif = "Installer le certificat racine";
161
	$l_category = "catégorie :";
168
	$l_category = "catégorie :";
162
	if (!$user->connected) {
169
	if (!$user->connected) {
163
		$l_logout_explain = "Aucune session n'est actuellement ouverte";
170
		$l_logout_explain = "Aucune session n'est actuellement ouverte";
164
		$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>";
165
	} else {
172
	} else {
166
		if ($user->username != $user->mac) { // authentication exception or not
173
		if ($user->username != $user->mac) { // authentication exception or not
167
			$l_logout_explain = "Utilisateur connecté : <a href=\"$logout_link\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
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";
168
			$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>";
169
		} else {
176
		} else {
170
			$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";
171
			$l_logout = "<a href=\"\">Information des connexions</a>";
178
			$l_logout = "<a href=\"\">Information des connexions</a>";
172
		}
179
		}
173
	}
180
	}
174
	$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>";
175
	$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>";
176
	$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.";
177
	if (isset($_GET['url'])) {
184
	if (isset($_GET['url'])) {
178
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Je comprends et je souhaite continuer ma navigation.</a>";
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>";
179
	} else {
186
	} else {
180
		$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>";
181
	}
188
	}
182
	$l_title_warn="Cher utilisateur, ";
189
	$l_title_warn="Cher utilisateur, ";
183
	$l_explain_warn_name="Une personne sous le nom de ";
190
	$l_explain_warn_name="Une personne sous le nom de ";
184
	$l_explain_warn_ip="sous cette IP : ";
191
	$l_explain_warn_ip="sous cette IP : ";
185
	$l_explain_warn_date="a consulté vos journaux de connexion le ";
192
	$l_explain_warn_date="a consulté vos journaux de connexion le ";
186
	$l_explain_warn_reason="Raison invoquée : ";
193
	$l_explain_warn_reason="Raison invoquée : ";
187
	$l_uam_domain = "Sites autorisés : ";
194
	$l_uam_domain = "Sites autorisés : ";
188
} else if ($Language === 'pt') {	// Portuguese
195
} else if ($Language === 'pt') {	// Portuguese
189
	$l_access_denied = "Controle de acesso";
196
	$l_access_denied = "Controle de acesso";
190
	$l_access_welcome = "Bem-vindo ao Alcasar";
197
	$l_access_welcome = "Bem-vindo ao Alcasar";
191
	$l_access_unavailable = "ACESSO INDISPONÍVEL";
198
	$l_access_unavailable = "ACESSO INDISPONÍVEL";
192
	$l_required_domain = "Site WEB Obrigatório";
199
	$l_required_domain = "Site WEB Obrigatório";
193
	$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.";
194
	$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.";
195
	$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";
196
	$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.";
197
	$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";
198
	$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>";
199
	$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>";
200
	$l_install_certif = "Instalar Certificado Alcasar AC";
207
	$l_install_certif = "Instalar Certificado Alcasar AC";
201
	$l_category = "categoria :";
208
	$l_category = "categoria :";
202
	if (!$user->connected) {
209
	if (!$user->connected) {
203
		$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?";
204
		$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>";
205
	} else {
212
	} else {
206
		if ($user->username != $user->mac) { // authentication exception or not
213
		if ($user->username != $user->mac) { // authentication exception or not
207
			$l_logout_explain = "Usuário conectado : <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history logins últimos :$connection_history";
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";
208
			$l_logout = "<a href=\"$logout_link\">Sair da Internet</a>";
215
			$l_logout = "<a href=\"$logout_link\">Sair da Internet</a>";
209
		} else {
216
		} else {
210
			$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";
211
			$l_logout = "<a href=\"\">Informações de conexões</a>";
218
			$l_logout = "<a href=\"\">Informações de conexões</a>";
212
		}
219
		}
213
	}
220
	}
214
	$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>";
215
	$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>";
216
	$l_explain_warn = "El administrador ha creado un archivo que contiene los periódicos de inicio de sesión como parte de un proceso judicial.";
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.";
217
	if (isset($_GET['url'])) {
224
	if (isset($_GET['url'])) {
218
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Lo comprendo y deseo continuar mi navegación.</a>";
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>";
219
	} else {
226
	} else {
220
		$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>";
221
	}
228
	}
222
	$l_title_warn="Estimado usuario,";
229
	$l_title_warn="Estimado usuario,";
223
	$l_explain_warn_name="El usario ";
230
	$l_explain_warn_name="El usario ";
224
	$l_explain_warn_ip="con este IP : ";
231
	$l_explain_warn_ip="con este IP : ";
225
	$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 ";
226
	$l_explain_warn_reason="con la siguiente razón : ";
233
	$l_explain_warn_reason="con la siguiente razón : ";
227
	$l_uam_domain = "Sites autorizados : ";
234
	$l_uam_domain = "Sites autorizados : ";
228
} else if ($Language === 'zn') {	// Chinese
235
} else if ($Language === 'zn') {	// Chinese
229
	$l_access_denied = "访问控制";
236
	$l_access_denied = "访问控制";
230
	$l_access_welcome = "欢迎来到ALCASAR";
237
	$l_access_welcome = "欢迎来到ALCASAR";
231
	$l_access_unavailable = "不可访问";
238
	$l_access_unavailable = "不可访问";
232
	$l_required_domain = "访问的网站";
239
	$l_required_domain = "访问的网站";
233
	$l_explain_acc_access = "管理中心能管理门户,您必须通过超级用户或者管理用户来访问。";
240
	$l_explain_acc_access = "管理中心能管理门户,您必须通过超级用户或者管理用户来访问。";
234
	$l_explain_access_deny = "您试图访问一个含有不当信息的资源。";
241
	$l_explain_access_deny = "您试图访问一个含有不当信息的资源。";
235
	$l_explain_net_pb = "您的门户检测因特网不可用。";
242
	$l_explain_net_pb = "您的门户检测因特网不可用。";
236
	$l_contact_access_deny = "如果您认为该过滤不当,请联系安全负责人(OSSI/RSSI)。";
243
	$l_contact_access_deny = "如果您认为该过滤不当,请联系安全负责人(OSSI/RSSI)。";
237
	$l_contact_net_pb = "请联系IT负责人或网络服务商来了解更多信息。";
244
	$l_contact_net_pb = "请联系IT负责人或网络服务商来了解更多信息。";
238
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">通过短信注册</a>";
245
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">通过短信注册</a>";
239
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">通过电子邮件注册</a>";
246
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">通过电子邮件注册</a>";
240
	$l_install_certif = "安装根证书";
247
	$l_install_certif = "安装根证书";
241
	$l_category = "类别 :";
248
	$l_category = "类别 :";
242
	if (!$user->connected) {
249
	if (!$user->connected) {
243
		$l_logout_explain = "您的系统目前没有打开任何网络咨询进程。";
250
		$l_logout_explain = "您的系统目前没有打开任何网络咨询进程。";
244
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">打开一个网络进程</a>";
251
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">打开一个网络进程</a>";
245
	} else {
252
	} else {
246
		if ($user->username != $user->mac) { // authentication exception or not
253
		if ($user->username != $user->mac) { // authentication exception or not
247
			$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";
248
			$l_logout = "<a href=\"$logout_link\">断开网络</a>";
255
			$l_logout = "<a href=\"$logout_link\">断开网络</a>";
249
		} else {
256
		} else {
250
			$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";
251
			$l_logout = "<a href=\"\">连接信息</a>";
258
			$l_logout = "<a href=\"\">连接信息</a>";
252
		}
259
		}
253
	}
260
	}
254
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">更改您的密码</a>";
261
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">更改您的密码</a>";
255
	$l_back_page = "<a href=\"javascript:history.back()\">上一页</a>";
262
	$l_back_page = "<a href=\"javascript:history.back()\">上一页</a>";
256
	$l_explain_warn = "管理员创建了一份可用于司法调查的连接日志文档。";
263
	$l_explain_warn = "管理员创建了一份可用于司法调查的连接日志文档。";
257
	if (isset($_GET['url'])) {
264
	if (isset($_GET['url'])) {
258
		$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>";
259
	} else {
266
	} else {
260
		$l_continue_link = "<a href=\"index.php\" class=\"button\">我明白并希望继续浏览。</a>";
267
		$l_continue_link = "<a href=\"index.php\" class=\"button\">我明白并希望继续浏览。</a>";
261
	}
268
	}
262
	$l_title_warn="亲爱的用户,";
269
	$l_title_warn="亲爱的用户,";
263
	$l_explain_warn_name="一人名为";
270
	$l_explain_warn_name="一人名为";
264
	$l_explain_warn_ip="在此IP:";
271
	$l_explain_warn_ip="在此IP:";
265
	$l_explain_warn_date="查看您的连接日志于";
272
	$l_explain_warn_date="查看您的连接日志于";
266
	$l_explain_warn_reason=" 如下原因:";
273
	$l_explain_warn_reason=" 如下原因:";
267
	$l_uam_domain = "授权网站 : ";
274
	$l_uam_domain = "授权网站 : ";
268
} else if ($Language === 'ar') {	// Arabic
275
} else if ($Language === 'ar') {	// Arabic
269
	$l_access_denied = "مراقبة الدخول";
276
	$l_access_denied = "مراقبة الدخول";
270
	$l_access_welcome = "ALCASAR مرحبا بك في";
277
	$l_access_welcome = "ALCASAR مرحبا بك في";
271
	$l_access_unavailable = "الدخول غير متوفر";
278
	$l_access_unavailable = "الدخول غير متوفر";
272
	$l_required_domain = "موقع إنترنيت مطلوب";
279
	$l_required_domain = "موقع إنترنيت مطلوب";
273
	$l_explain_acc_access = "مركز التحكم يمكنك من إدارة البوابة. يلزمك التوفر على حساب الادارة للدخول.";
280
	$l_explain_acc_access = "مركز التحكم يمكنك من إدارة البوابة. يلزمك التوفر على حساب الادارة للدخول.";
274
	$l_explain_access_deny = "محاولة لدخول موارد تحتوي على معلومات غير ملائمة المحتوى";
281
	$l_explain_access_deny = "محاولة لدخول موارد تحتوي على معلومات غير ملائمة المحتوى";
275
	$l_explain_net_pb = "بوابتك تكتشف ان الدخول على الانترنت غير متوفر";
282
	$l_explain_net_pb = "بوابتك تكتشف ان الدخول على الانترنت غير متوفر";
276
	$l_contact_access_deny = "المرجو الاتصال بضابط أمن (OSS / RSS) إذا اعتقدت ان هذه التصفية غير قانونية";
283
	$l_contact_access_deny = "المرجو الاتصال بضابط أمن (OSS / RSS) إذا اعتقدت ان هذه التصفية غير قانونية";
277
	$l_contact_net_pb = "المرجو الاتصال بمدير المعلومات أو مورد الأنترنت للمزيد من المعلومات";
284
	$l_contact_net_pb = "المرجو الاتصال بمدير المعلومات أو مورد الأنترنت للمزيد من المعلومات";
278
	$auto_save_sms_text = "تسجيل ذاتي على";
285
	$auto_save_sms_text = "تسجيل ذاتي على";
279
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">اشترك عن طريق الرسائل القصيرة</a>";
286
	$l_sms_access = "<a href=\"//$hostname/sms_registration.php\">اشترك عن طريق الرسائل القصيرة</a>";
280
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">通过电子邮件注册</a>";
287
	$l_email_access = "<a href=\"//$hostname/email_registration_front.php\">通过电子邮件注册</a>";
281
	$l_install_certif = "ركب جذر الشهادة";
288
	$l_install_certif = "ركب جذر الشهادة";
282
	$l_category = "فئة :";
289
	$l_category = "فئة :";
283
	if (!$user->connected) {
290
	if (!$user->connected) {
284
		$l_logout_explain = "و لا جلسة استفسار للإنترنت مفتوحة حاليا على نظامك";
291
		$l_logout_explain = "و لا جلسة استفسار للإنترنت مفتوحة حاليا على نظامك";
285
		$close_session_text = "فتح جلسة الإنترنت";
292
		$close_session_text = "فتح جلسة الإنترنت";
286
		$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>";
287
	} else {
294
	} else {
288
		if ($user->username != $user->mac) { // authentication exception or not
295
		if ($user->username != $user->mac) { // authentication exception or not
289
			$close_session_text = "إقفال جلسة المستخدم المتصل حاليا";
296
			$close_session_text = "إقفال جلسة المستخدم المتصل حاليا";
290
			$userlogged_text = "المستخدم متصل";
297
			$userlogged_text = "المستخدم متصل";
291
			$disconnect_user_text = "قطع الاتصال على المستخدم";
298
			$disconnect_user_text = "قطع الاتصال على المستخدم";
292
			$l_logout_explain = "Utilisateur connecté : <a href=\"$logout_link\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
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";
293
			$logout_internet_text = "قطع الاتصال على الإنترنت";
300
			$logout_internet_text = "قطع الاتصال على الإنترنت";
294
			$l_logout = "<a href=\"$logout_link\">$logout_internet_text</a>";
301
			$l_logout = "<a href=\"$logout_link\">$logout_internet_text</a>";
295
		} else {
302
		} else {
296
			$your_system_text = "نظامك";
303
			$your_system_text = "نظامك";
297
			$auth_except_text = "على توثيق استثنائي";
304
			$auth_except_text = "على توثيق استثنائي";
298
			$last_conn_text = "اتصالات مشاركة";
305
			$last_conn_text = "اتصالات مشاركة";
299
			$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";
300
			$l_logout = "<a href=\"\">معلومات على الاتصالات </a>";
307
			$l_logout = "<a href=\"\">معلومات على الاتصالات </a>";
301
		}
308
		}
302
	}
309
	}
303
	$change_pass_text = "غير كلمتك السرية";
310
	$change_pass_text = "غير كلمتك السرية";
304
	$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>";
305
	$redirect_sms_text = "يوجهك على الصفحة التفسيرية للتسجيل الذاتي بطريقة";
312
	$redirect_sms_text = "يوجهك على الصفحة التفسيرية للتسجيل الذاتي بطريقة";
306
	$login_text = "تسجيل الدخول";
313
	$login_text = "تسجيل الدخول";
307
	$your_phone_text = "رقم الهاتف الخاص بك";
314
	$your_phone_text = "رقم الهاتف الخاص بك";
308
	$pass_text = "كلمة السر";
315
	$pass_text = "كلمة السر";
309
	$your_message_text = "رسالتك";
316
	$your_message_text = "رسالتك";
310
	$previous_text = "الصفحة السابقة";
317
	$previous_text = "الصفحة السابقة";
311
	$l_back_page = "<a href=\"javascript:history.back()\">$previous_text</a>";
318
	$l_back_page = "<a href=\"javascript:history.back()\">$previous_text</a>";
312
	$l_explain_warn = "المسؤول أنشأ أرشيفاً تحتوي على سجلات الاتصال في إطار تحقيق قضائي";
319
	$l_explain_warn = "المسؤول أنشأ أرشيفاً تحتوي على سجلات الاتصال في إطار تحقيق قضائي";
313
	$understand_text = "أنا متفهم و أريد ان أواصل التصفح";
320
	$understand_text = "أنا متفهم و أريد ان أواصل التصفح";
314
	if (isset($_GET['url'])) {
321
	if (isset($_GET['url'])) {
315
		$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>";
316
	} else {
323
	} else {
317
		$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>";
318
	}
325
	}
319
	$l_title_warn = "عزيزي المستعمل, ";
326
	$l_title_warn = "عزيزي المستعمل, ";
320
	$l_explain_warn_name = "شخص مسمىٰ ";
327
	$l_explain_warn_name = "شخص مسمىٰ ";
321
	$l_explain_warn_ip = "تحت هذا IP: ";
328
	$l_explain_warn_ip = "تحت هذا IP: ";
322
	$l_explain_warn_date = "إطّلع على سجلات الاتصال الخاصة بك في";
329
	$l_explain_warn_date = "إطّلع على سجلات الاتصال الخاصة بك في";
323
	$l_explain_warn_reason = "السبب المسرّح به: ";
330
	$l_explain_warn_reason = "السبب المسرّح به: ";
324
	$l_uam_domain = ":المواقع المسموحة ";
331
	$l_uam_domain = ":المواقع المسموحة ";
325
} else if ($Language === 'de') {		// German
332
} else if ($Language === 'de') {		// German
326
	$l_access_denied = "Zugangskontrolle";
333
	$l_access_denied = "Zugangskontrolle";
327
	$l_access_welcome = "Willkommen bei ALCASAR";
334
	$l_access_welcome = "Willkommen bei ALCASAR";
328
	$l_access_unavailable = "ZUGANG NICHT MÖGLICH";
335
	$l_access_unavailable = "ZUGANG NICHT MÖGLICH";
329
	$l_required_domain = "Website benötigt";
336
	$l_required_domain = "Website benötigt";
330
	$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.";
331
	$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.";
332
	$l_explain_net_pb = "Offenbar funktioniert ihr Internetzugriff nicht.";
339
	$l_explain_net_pb = "Offenbar funktioniert ihr Internetzugriff nicht.";
333
	$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.";
334
	$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.";
335
	$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>";
336
	$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>";
337
	$l_install_certif = "Das ALCASAR AC Zertifikat installieren";
344
	$l_install_certif = "Das ALCASAR AC Zertifikat installieren";
338
	$l_category = "Kategorie:";
345
	$l_category = "Kategorie:";
339
	if (!$user->connected) {
346
	if (!$user->connected) {
340
		$l_logout_explain = "Zurzeit ist keine Internetsitzung auf Ihrem System aktiv";
347
		$l_logout_explain = "Zurzeit ist keine Internetsitzung auf Ihrem System aktiv";
341
		$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>";
342
	} else {
349
	} else {
343
		if ($user->username != $user->mac) { // authentication exception or not
350
		if ($user->username != $user->mac) { // authentication exception or not
344
			$l_logout_explain = "Aktuell eingeloggter User: <a href=\"$logout_link\" title=\"Ausloggen $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history letzte Verbindungen:$connection_history";
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";
345
			$l_logout = "<a href=\"$logout_link\">Aus dem Internet ausloggen</a>";
352
			$l_logout = "<a href=\"$logout_link\">Aus dem Internet ausloggen</a>";
346
		} else {
353
		} else {
347
			$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";
348
			$l_logout = "<a href=\"\">Informationen zur Verbindung</a>";
355
			$l_logout = "<a href=\"\">Informationen zur Verbindung</a>";
349
		}
356
		}
350
	}
357
	}
351
	$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>";
352
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
359
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
353
	$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.";
354
	if (isset($_GET['url'])) {
361
	if (isset($_GET['url'])) {
355
		$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>";
356
	} else {
363
	} else {
357
		$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>";
358
	}
365
	}
359
	$l_title_warn="Lieber Benutzer,";
366
	$l_title_warn="Lieber Benutzer,";
360
	$l_explain_warn_name="Jemand namens ";
367
	$l_explain_warn_name="Jemand namens ";
361
	$l_explain_warn_ip="mit dieser IP: ";
368
	$l_explain_warn_ip="mit dieser IP: ";
362
	$l_explain_warn_date="hat Ihre Verbindungsdaten eingesehen, für den ";
369
	$l_explain_warn_date="hat Ihre Verbindungsdaten eingesehen, für den ";
363
	$l_explain_warn_reason="Grund: ";
370
	$l_explain_warn_reason="Grund: ";
364
	$l_uam_domain = "Authorisierte Webseiten: ";
371
	$l_uam_domain = "Authorisierte Webseiten: ";
365
} else if ($Language === 'es'){	// Spanish
372
} else if ($Language === 'es'){	// Spanish
366
	$l_access_denied = "Control de Acceso";
373
	$l_access_denied = "Control de Acceso";
367
	$l_access_welcome = "Bienvenido, Ud. está en ALCASAR";
374
	$l_access_welcome = "Bienvenido, Ud. está en ALCASAR";
368
	$l_access_unavailable = "ACCESO NO DISPONIBLE";
375
	$l_access_unavailable = "ACCESO NO DISPONIBLE";
369
	$l_required_domain = "Sitio WEB solicitado";
376
	$l_required_domain = "Sitio WEB solicitado";
370
	$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.";
371
	$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.";
372
	$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.";
373
	$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";
374
	$l_contact_net_pb = "Póngase en contacto con el responsable de la red o con su proveedor de Internet para obtener más información.";
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.";
375
	$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>";
376
	$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>";
377
	$l_install_certif = "Instalar certificado ALCASAR AC";
384
	$l_install_certif = "Instalar certificado ALCASAR AC";
378
	$l_category = "categoría:";
385
	$l_category = "categoría:";
379
	if (!$user->connected) {
386
	if (!$user->connected) {
380
		$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";
381
		$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>";
382
	} else {
389
	} else {
383
		if ($user->username != $user->mac) { // authentication exception or not
390
		if ($user->username != $user->mac) { // authentication exception or not
384
			$l_logout_explain = "Cierre la sesión del usuario actualmente conectado.<br> Usuario conectado: <a href=\"$logout_link\" title=\"Desconectar usuario $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history ultimas sesiones:$connection_history";
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";
385
			$l_logout = "<a href=\"$logout_link\">Desconectarse de internet</a>";
392
			$l_logout = "<a href=\"$logout_link\">Desconectarse de internet</a>";
386
		} else {
393
		} else {
387
			$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";
388
			$l_logout = "Información sobre las conexiones";
395
			$l_logout = "Información sobre las conexiones";
389
		}
396
		}
390
	}
397
	}
391
	$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>";
392
	$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>";
393
	$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.";
394
	if (isset($_GET['url'])) {
401
	if (isset($_GET['url'])) {
395
		$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>";
396
	} else {
403
	} else {
397
		$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>";
398
	}
405
	}
399
	$l_title_warn="Estimado usuario,";
406
	$l_title_warn="Estimado usuario,";
400
	$l_explain_warn_name="Alguien llamado ";
407
	$l_explain_warn_name="Alguien llamado ";
401
	$l_explain_warn_ip="con esta IP: ";
408
	$l_explain_warn_ip="con esta IP: ";
402
	$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 ";
403
	$l_explain_warn_reason="Debido a: ";
410
	$l_explain_warn_reason="Debido a: ";
404
	$l_uam_domain = "Sitios web autorizados: ";
411
	$l_uam_domain = "Sitios web autorizados: ";
405
} else {	// English
412
} else {	// English
406
	$l_access_denied = "Access control";
413
	$l_access_denied = "Access control";
407
	$l_access_welcome = "Welcome to ALCASAR";
414
	$l_access_welcome = "Welcome to ALCASAR";
408
	$l_access_unavailable = "ACCESS UNAVAILABLE";
415
	$l_access_unavailable = "ACCESS UNAVAILABLE";
409
	$l_required_domain = "Required WEB site";
416
	$l_required_domain = "Required WEB site";
410
	$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.";
411
	$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.";
412
	$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";
413
	$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.";
414
	$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.";
415
	$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>";
416
	$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>";
417
	$l_install_certif = "Install ALCASAR AC Certificate";
424
	$l_install_certif = "Install ALCASAR AC Certificate";
418
	$l_category = "category:";
425
	$l_category = "category:";
419
	if (!$user->connected) {
426
	if (!$user->connected) {
420
		$l_logout_explain = "No session is currently open";
427
		$l_logout_explain = "No session is currently open";
421
		$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>";
422
	} else {
429
	} else {
423
		if ($user->username != $user->mac) { // authentication exception or not
430
		if ($user->username != $user->mac) { // authentication exception or not
424
			$l_logout_explain = "User logged-on: <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history last connections:$connection_history";
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";
425
			$l_logout = "<a href=\"$logout_link\">Logoff from the Internet</a>";
432
			$l_logout = "<a href=\"$logout_link\">Logoff from the Internet</a>";
426
		} else {
433
		} else {
427
			$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";
428
			$l_logout = "<a href=\"\">Connections information</a>";
435
			$l_logout = "<a href=\"\">Connections information</a>";
429
		}
436
		}
430
	}
437
	}
431
	$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>";
432
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
439
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
433
	$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.";
434
	if (isset($_GET['url'])) {
441
	if (isset($_GET['url'])) {
435
		$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>";
436
	} else {
443
	} else {
437
		$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>";
438
	}
445
	}
439
	$l_title_warn="Dear user,";
446
	$l_title_warn="Dear user,";
440
	$l_explain_warn_name="Someone called ";
447
	$l_explain_warn_name="Someone called ";
441
	$l_explain_warn_ip="with this IP: ";
448
	$l_explain_warn_ip="with this IP: ";
442
	$l_explain_warn_date="has read your connection logs at ";
449
	$l_explain_warn_date="has read your connection logs at ";
443
	$l_explain_warn_reason="For this reason: ";
450
	$l_explain_warn_reason="For this reason: ";
444
	$l_uam_domain = "Authorized websites: ";
451
	$l_uam_domain = "Authorized websites: ";
445
}
452
}
446
 
453
 
447
$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));
448
$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));
449
 
456
 
450
// Set the icons
457
// Set the icons
451
$img_rep			= '/images/';
458
$img_rep			= '/images/';
452
$img_organisme		= 'organisme.png';
459
$img_organisme		= 'organisme.png';
453
$img_access			= 'globe_acces_70.png';
460
$img_access			= 'globe_acces_70.png';
454
$img_connect		= 'globe_70.png';
461
$img_connect		= 'globe_70.png';
455
$img_warning		= 'globe_warning_70.png';
462
$img_warning		= 'globe_warning_70.png';
456
$img_pwd			= 'cle_ombre.png';
463
$img_pwd			= 'cle_ombre.png';
457
$img_certificate	= 'certificat.png';
464
$img_certificate	= 'certificat.png';
458
$img_acc			= 'logo-alcasar_70.png';
465
$img_acc			= 'logo-alcasar_70.png';
459
$img_sms			= 'sms.png';
466
$img_sms			= 'sms.png';
460
$img_email			= 'email.png';
467
$img_email			= 'email.png';
461
$img_false			= 'interdit.png';
468
$img_false			= 'interdit.png';
462
$img_adm			= 'adm.png';
469
$img_adm			= 'adm.png';
463
$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));
464
 
471
 
465
if ($direct_access) {
472
if ($direct_access) {
466
	// Read the "Domain allowed" file
473
	// Read the "Domain allowed" file
467
	$domainsAllowed = [];
474
	$domainsAllowed = [];
468
	$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
469
       	foreach ($fileContent as $line) {
476
       	foreach ($fileContent as $line) {
470
			if (!empty(trim($line))) {
477
			if (!empty(trim($line))) {
471
				if (strpos ($line, '#')) { // the domain should be displayed
478
				if (strpos ($line, '#')) { // the domain should be displayed
472
					$domain_fields = explode('#', $line);
479
					$domain_fields = explode('#', $line);
473
					$domain = explode('"', $domain_fields[0]);
480
					$domain = explode('"', $domain_fields[0]);
474
					$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
475
					$domainsAllowed[] = (object) [
482
					$domainsAllowed[] = (object) [
476
						'name'   => trim($domain_fields[1]),
483
						'name'   => trim($domain_fields[1]),
477
						'domain' => trim($domain[1])
484
						'domain' => trim($domain[1])
478
					];
485
					];
479
					
486
					
480
				}
487
				}
481
			}
488
			}
482
		}
489
		}
483
	}
490
	}
484
} else {
491
} else {
485
	 if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1') {
492
	 if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1') {
486
		// user need to be warned that someone reads his logs
493
		// user need to be warned that someone reads his logs
487
		$filename = '/var/www/html/acc/backup/log_info.txt';
494
		$filename = '/var/www/html/acc/backup/log_info.txt';
488
		if (file_exists($filename)) {
495
		if (file_exists($filename)) {
489
			$fichier = fopen($filename, 'r');
496
			$fichier = fopen($filename, 'r');
490
			$content = file($filename);
497
			$content = file($filename);
491
			foreach ($content as $line) {
498
			foreach ($content as $line) {
492
				$infos = explode('|||', $line);
499
				$infos = explode('|||', $line);
493
				$log_date   = $infos[0];
500
				$log_date   = $infos[0];
494
				$log_user   = $infos[1];
501
				$log_user   = $infos[1];
495
				$log_reason = $infos[2];
502
				$log_reason = $infos[2];
496
				$log_ip     = $infos[3];
503
				$log_ip     = $infos[3];
497
			}
504
			}
498
			$l_explain_warn = "$l_explain_warn_name$log_user ($l_explain_warn_ip$log_ip) $l_explain_warn_date$log_date.<br>$l_explain_warn_reason<br>$log_reason";
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";
499
		} else {
506
		} else {
500
			$l_explain_warn = 'Log error!';
507
			$l_explain_warn = 'Log error!';
501
		}
508
		}
502
	}
509
	}
503
}
510
}
504
 
511
 
505
// Search blacklist categories
512
// Search blacklist categories
506
if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))) {
513
if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))) {
507
	$pattern = str_replace('www.', '', $_SERVER['HTTP_HOST']);
514
	$pattern = str_replace('www.', '', $_SERVER['HTTP_HOST']);
508
	$categories = [];
515
	$categories = [];
509
	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);
510
	$filteredUrlHtml = $l_required_domain.' : '.htmlspecialchars($_SERVER['HTTP_HOST']);
517
	$filteredUrlHtml = $l_required_domain.' : '.htmlspecialchars($_SERVER['HTTP_HOST']);
511
	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
512
		$tiny_pattern = substr(stristr($pattern, '.'), 1);
519
		$tiny_pattern = substr(stristr($pattern, '.'), 1);
513
		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);
514
	}
521
	}
515
	if (!empty($categories)) {
522
	if (!empty($categories)) {
516
		$filteredUrlHtml .= "<br>$l_category ".implode(', ', $categories);
523
		$filteredUrlHtml .= "<br>$l_category ".implode(', ', $categories);
517
	}
524
	}
518
}
525
}
519
////////////////////////////////////////////////////////////////////////
526
////////////////////////////////////////////////////////////////////////
520
/////////////////////////// TEST VARIABLES /////////////////////////////
527
/////////////////////////// TEST VARIABLES /////////////////////////////
521
////////////////////////////////////////////////////////////////////////
528
////////////////////////////////////////////////////////////////////////
522
//$service_SMS_status = true;
529
//$service_SMS_status = true;
523
//$direct_access = true;
530
//$direct_access = true;
524
//$network_pb = false;
531
//$network_pb = false;
525
//$domainsAllowed[] = (object) [
532
//$domainsAllowed[] = (object) [
526
//	'name'   => 'name_test',
533
//	'name'   => 'name_test',
527
//	'domain' => 'domain_test' 
534
//	'domain' => 'domain_test' 
528
//];
535
//];
529
/////////////////////////////////////////////////////////////////////////
536
/////////////////////////////////////////////////////////////////////////
530
 
537
 
531
// Cleaning the cache
538
// Cleaning the cache
532
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
539
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
533
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');
534
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');
535
header('Cache-Control: post-check=0, pre-check=0', false);
542
header('Cache-Control: post-check=0, pre-check=0', false);
536
header('Pragma: no-cache');
543
header('Pragma: no-cache');
537
?>
544
?>
538
<!DOCTYPE html>
545
<!DOCTYPE html>
539
<html>
546
<html>
540
	<head>
547
	<head>
541
		<meta charset="UTF-8">
548
		<meta charset="UTF-8">
542
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
549
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
543
		<title><?= $l_title ?></title>
550
		<title><?= $l_title ?></title>
544
		<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">
545
		<link rel="stylesheet" type="text/css" href="/css/index.css">
552
		<link rel="stylesheet" type="text/css" href="/css/index.css">
546
		<link rel="icon" href="/images/favicon-48.ico" type="image/ico">
553
		<link rel="icon" href="/images/favicon-48.ico" type="image/ico">
547
<? if ($service_wifi4eu_status): ?>
554
<? if ($service_wifi4eu_status): ?>
548
		<script type="text/javascript">
555
		<script type="text/javascript">
549
			var wifi4euTimerStart = Date.now();
556
			var wifi4euTimerStart = Date.now();
550
			var wifi4euNetworkIdentifier = '<?= $service_wifi4eu_code ?>';
557
			var wifi4euNetworkIdentifier = '<?= $service_wifi4eu_code ?>';
551
			var wifi4euLanguage = '<?= $Language ?>';
558
			var wifi4euLanguage = '<?= $Language ?>';
552
			//var selftestModus = true;
559
			//var selftestModus = true;
553
		</script>
560
		</script>
554
		<script type="text/javascript" src="<?= $service_wifi4eu_server ?>"></script>
561
		<script type="text/javascript" src="<?= $service_wifi4eu_server ?>"></script>
555
<? endif; ?>
562
<? endif; ?>
556
	</head>
563
	</head>
557
	<body>
564
	<body>
558
	<div class="col-12 col-lg-10 offset-lg-1">
565
	<div class="col-12 col-lg-10 offset-lg-1">
559
 
566
 
560
		<?php require_once(__DIR__.'/header.php'); ?>
567
		<?php require_once(__DIR__.'/header.php'); ?>
561
 
568
 
562
		<!-- Main content box -->
569
		<!-- Main content box -->
563
		<div class="row">
570
		<div class="row">
564
			<div id="contenu_acces" class="col-12 offset-lg-1 col-lg-10 row">
571
			<div id="contenu_acces" class="col-12 offset-lg-1 col-lg-10 row">
565
				<?php if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))): // print blacklist categories ?>
572
				<?php if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))): // print blacklist categories ?>
566
				<div id="box_url">
573
				<div id="box_url">
567
					<br>
574
					<br>
568
					<?= $l_explain ?>
575
					<?= $l_explain ?>
569
				</div>
576
				</div>
570
				<?php endif; ?>
577
				<?php endif; ?>
571
 
578
 
572
				<!-- Menu -->
579
				<!-- Menu -->
573
				<div class="menu-container container col-12 col-md-7">
580
				<div class="menu-container container col-12 col-md-7">
574
					<?php if ($direct_access): ?>
581
					<?php if ($direct_access): ?>
575
						<div class="box_menu<?= (!$network_pb) ? '' : ' box-menu-disabled' ?>" id="box_conn" <?= (!$network_pb) ? '' : 'title=\'Not available\'' ?>>
582
						<div class="box_menu<?= (!$network_pb) ? '' : ' box-menu-disabled' ?>" id="box_conn" <?= (!$network_pb) ? '' : 'title=\'Not available\'' ?>>
576
							<span><?= $l_logout ?></span>
583
							<span><?= $l_logout ?></span>
577
							<div class="menu-image">
584
							<div class="menu-image">
578
								<img class="img-fluid" src="<?= $img_rep.$img_internet ?>">
585
								<img class="img-fluid" src="<?= $img_rep.$img_internet ?>">
579
							</div>
586
							</div>
580
						</div>
587
						</div>
581
 
588
 
-
 
589
						<?php if ($cert_autoissued): ?>
582
						<div class="box_menu_right box_menu" id="box_certif">
590
							<div class="box_menu_right box_menu" id="box_certif">
583
							<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
591
								<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
584
							<div class="menu-image">
592
								<div class="menu-image">
585
								<img class="img-fluid" src="<?= $img_rep.$img_certificate ?>">
593
									<img class="img-fluid" src="<?= $img_rep.$img_certificate ?>">
-
 
594
								</div>
586
							</div>
595
							</div>
587
						</div>
596
						<?php endif; ?>
588
 
597
 
589
						<div class="box_menu" id="box_mdp" >
598
						<div class="box_menu" id="box_mdp" >
590
							<div class="menu-image">
599
							<div class="menu-image">
591
								<img class="img-fluid" src="<?= $img_rep.$img_pwd ?>">
600
								<img class="img-fluid" src="<?= $img_rep.$img_pwd ?>">
592
							</div>
601
							</div>
593
							<span><?= $l_password_change ?></span>
602
							<span><?= $l_password_change ?></span>
594
						</div>
603
						</div>
595
 
604
 
596
					<?php if ($service_SMS_status === true): ?>
605
					<?php if ($service_SMS_status === true): ?>
597
						<div class="box_menu_right box_menu" id="box_sms">
606
						<div class="box_menu_right box_menu" id="box_sms">
598
							<span><?= $l_sms_access ?></span>
607
							<span><?= $l_sms_access ?></span>
599
							<div class="menu-image">
608
							<div class="menu-image">
600
								<img class="img-fluid menu-image" src="<?= $img_rep.$img_sms ?>">
609
								<img class="img-fluid menu-image" src="<?= $img_rep.$img_sms ?>">
601
							</div>
610
							</div>
602
						</div>
611
						</div>
603
					<?php endif; ?>
612
					<?php endif; ?>
604
 
613
 
605
					<?php if ($service_Email_status === true): ?>
614
					<?php if ($service_Email_status === true): ?>
606
						<div class="box_menu_right box_menu" id="box_email">
615
						<div class="box_menu_right box_menu" id="box_email">
607
							<span><?= $l_email_access ?></span>
616
							<span><?= $l_email_access ?></span>
608
							<div class="menu-image">
617
							<div class="menu-image">
609
								<img class="img-fluid menu-image" src="<?= $img_rep.$img_email ?>">
618
								<img class="img-fluid menu-image" src="<?= $img_rep.$img_email ?>">
610
							</div>
619
							</div>
611
						</div>
620
						</div>
612
					<?php endif; ?>
621
					<?php endif; ?>
613
				</div>
622
				</div>
614
 
623
 
615
				<!-- Info Box -->
624
				<!-- Info Box -->
616
				<div class="info-box-container col-md-5">	
625
				<div class="info-box-container col-md-5">	
617
					<div id="box_infos">
626
					<div id="box_infos">
618
						<p class="box_infos_explanations"><?= $l_logout_explain ?>
627
						<p class="box_infos_explanations"><?= $l_logout_explain ?>
619
							
628
							
620
						<?php if (!empty($domainsAllowed)): ?>
629
						<?php if (!empty($domainsAllowed)): ?>
621
							<p class="domain_allowed_title"><?= $l_uam_domain ?></p>
630
							<p class="domain_allowed_title"><?= $l_uam_domain ?></p>
622
							<ul>
631
							<ul>
623
								<?php foreach ($domainsAllowed as $domainAllowed): ?>
632
								<?php foreach ($domainsAllowed as $domainAllowed): ?>
624
									<li><a href="http://<?= $domainAllowed->domain ?>"><?= $domainAllowed->name ?></a></li>
633
									<li><a href="http://<?= $domainAllowed->domain ?>"><?= $domainAllowed->name ?></a></li>
625
								<?php endforeach; ?>
634
								<?php endforeach; ?>
626
							</ul>
635
							</ul>
627
						<?php endif; ?>
636
						<?php endif; ?>
628
 
637
 
629
						<?php else: // the user is intercepted ?>
638
						<?php else: // the user is intercepted ?>
630
							<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1'): // user need to be warned that someone reads his logs ?>
639
							<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1'): // user need to be warned that someone reads his logs ?>
631
								<div id="box_refuse">
640
								<div id="box_refuse">
632
									<img src="//<?= $hostname.$img_rep.$img_warning ?>">
641
									<img src="//<?= $hostname.$img_rep.$img_warning ?>">
633
									<p><?= $l_explain_warn ?></p>
642
									<p><?= $l_explain_warn ?></p>
634
								</div>
643
								</div>
635
								<div id="liens_redir">
644
								<div id="liens_redir">
636
									<p><?= $l_continue_link ?></p>
645
									<p><?= $l_continue_link ?></p>
637
								</div>
646
								</div>
638
							<?php else: ?>
647
							<?php else: ?>
639
								<table width="80%">
648
								<table width="80%">
640
									<tr>
649
									<tr>
641
										<td><img src="//<?= $hostname.$img_rep.$img_false ?>"></td>
650
										<td><img src="//<?= $hostname.$img_rep.$img_false ?>"></td>
642
										<?php if (($network_pb) && (!$direct_access)): ?>
651
										<?php if (($network_pb) && (!$direct_access)): ?>
643
										<td><?= "Diagnostic : $diagnostic" ?></td>
652
										<td><?= "Diagnostic : $diagnostic" ?></td>
644
										<?php else: ?>
653
										<?php else: ?>
645
										<td><?= $filteredUrlHtml ?></td>
654
										<td><?= $filteredUrlHtml ?></td>
646
										<?php endif; ?>
655
										<?php endif; ?>
647
									</tr><tr>
656
									</tr><tr>
648
										<td></td><td><?= $l_back_page ?></td>
657
										<td></td><td><?= $l_back_page ?></td>
649
									</tr>
658
									</tr>
650
								</table>
659
								</table>
651
							<?php endif; ?>
660
							<?php endif; ?>
652
						<?php endif; ?>
661
						<?php endif; ?>
653
					</div>
662
					</div>
654
				</div>
663
				</div>
655
			</div>
664
			</div>
656
			<?php if ($direct_access): // display the admin logo (wheel) at the bottom right ?>
665
			<?php if ($direct_access): // display the admin logo (wheel) at the bottom right ?>
657
			<div id="corner">
666
			<div id="corner">
658
				<div id="adm" class="corn">
667
				<div id="adm" class="corn">
659
					<a href="<?= "https://$hostname/acc/" ?>"><img src="<?= $img_rep.$img_adm ?>"></a>
668
					<a href="<?= "https://$hostname/acc/" ?>"><img src="<?= $img_rep.$img_adm ?>"></a>
660
				</div>
669
				</div>
661
			</div>
670
			</div>
662
		</div>
671
		</div>
663
		<?php endif; ?>
672
		<?php endif; ?>
664
	</div>
673
	</div>
665
	</body>
674
	</body>
666
</html>
675
</html>
667
 
676