Subversion Repositories ALCASAR

Rev

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

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