Subversion Repositories ALCASAR

Rev

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

Rev 2992 Rev 2993
1
<?php
1
<?php
2
# $Id: intercept.php 2992 2022-02-24 23:23:41Z rexy $
2
# $Id: intercept.php 2993 2022-03-06 23:02:08Z rexy $
3
#
3
#
4
# intercept.php for ALCASAR captive portal
4
# intercept.php for ALCASAR captive portal
5
# Copyright (C) 2003, 2004 Mondru AB.
5
# Copyright (C) 2003, 2004 Mondru AB.
6
# Modify by REXY & steweb57
6
# Modify by REXY & steweb57
7
# UI & css style by stephane ERARD
7
# UI & css style by stephane ERARD
8
# Help for language translation by B. AUBARD (thanks)
8
# Help for language translation by B. AUBARD (thanks)
9
 
9
 
10
# The contents of this file may be used under the terms of the GNU
10
# The contents of this file may be used under the terms of the GNU
11
# General Public License Version 2, provided that the above copyright
11
# General Public License Version 2, provided that the above copyright
12
# notice and this permission notice is included in all copies or
12
# notice and this permission notice is included in all copies or
13
# substantial portions of the software.
13
# substantial portions of the software.
14
 
14
 
15
# Redirects from CoovaChilli (chilli daemon) :
15
# Redirects from CoovaChilli (chilli daemon) :
16
# Response to login:
16
# Response to login:
17
  # success :	if login successful
17
  # success :	if login successful
18
  # failed :	if login failed
18
  # failed :	if login failed
19
  # logoff :	if logout successful
19
  # logoff :	if logout successful
20
  # already :	if tried to login while already logged in
20
  # already :	if tried to login while already logged in
21
  # notyet :	if not logged in yet
21
  # notyet :	if not logged in yet
22
  # Default :	it was not a form request -> client go to login form
22
  # Default :	it was not a form request -> client go to login form
23
 
23
 
24
/****************************************************************
24
/****************************************************************
25
*			GLOBAL FILE PATHS			*
25
*			GLOBAL FILE PATHS			*
26
*****************************************************************/
26
*****************************************************************/
27
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
27
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
28
define('DOMAIN_ALLOWED_LIST', '/usr/local/etc/alcasar-uamdomain');
28
define('DOMAIN_ALLOWED_LIST', '/usr/local/etc/alcasar-uamdomain');
29
 
29
 
30
/****************************************************************
30
/****************************************************************
31
*			FILE reading test			*
31
*			FILE reading test			*
32
*****************************************************************/
32
*****************************************************************/
33
$conf_files = array(CONF_FILE, DOMAIN_ALLOWED_LIST);
33
$conf_files = array(CONF_FILE, DOMAIN_ALLOWED_LIST);
34
foreach ($conf_files as $file) {
34
foreach ($conf_files as $file) {
35
	if (!file_exists($file)) {
35
	if (!file_exists($file)) {
36
		exit("Fichier $file non présent");
36
		exit("Fichier $file non présent");
37
	}
37
	}
38
	if (!is_readable($file)) {
38
	if (!is_readable($file)) {
39
		exit("Vous n'avez pas les droits de lecture sur le fichier $file");
39
		exit("Vous n'avez pas les droits de lecture sur le fichier $file");
40
	}
40
	}
41
}
41
}
42
/****************************************************************
42
/****************************************************************
43
*			Read CONF_FILE				*
43
*			Read CONF_FILE				*
44
*****************************************************************/
44
*****************************************************************/
45
$file_conf = fopen(CONF_FILE, 'r');
45
$file_conf = fopen(CONF_FILE, 'r');
46
if (!$file_conf) {
46
if (!$file_conf) {
47
	exit('Error opening the file '.CONF_FILE);
47
	exit('Error opening the file '.CONF_FILE);
48
}
48
}
49
while (!feof($file_conf)) {
49
while (!feof($file_conf)) {
50
	$buffer = fgets($file_conf, 4096);
50
	$buffer = fgets($file_conf, 4096);
51
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
51
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
52
		$tmp = explode('=', $buffer, 2);
52
		$tmp = explode('=', $buffer, 2);
53
		$conf[trim($tmp[0])] = trim($tmp[1]);
53
		$conf[trim($tmp[0])] = trim($tmp[1]);
54
	}
54
	}
55
}
55
}
56
fclose($file_conf);
56
fclose($file_conf);
57
 
57
 
58
$organisme = $conf["ORGANISM"];
58
$organisme = $conf["ORGANISM"];
59
$service_SMS_status = ($conf['SMS'] === 'on');
59
$service_SMS_status = ($conf['SMS'] === 'on');
-
 
60
$service_Email_status = ($conf['Email'] === 'on');
60
$service_wifi4eu_status = ($conf['WIFI4EU'] === 'on');
61
$service_wifi4eu_status = ($conf['WIFI4EU'] === 'on');
61
$service_wifi4eu_code = $conf['WIFI4EU_CODE'];
62
$service_wifi4eu_code = $conf['WIFI4EU_CODE'];
62
$service_wifi4eu_server = 'https://collection.wifi4eu.ec.europa.eu/wifi4eu.min.js';
63
$service_wifi4eu_server = 'https://collection.wifi4eu.ec.europa.eu/wifi4eu.min.js';
63
 
64
 
64
// Shared secret used to encrypt password with coova.
65
// Shared secret used to encrypt password with coova.
65
$uamsecret = "";
66
$uamsecret = "";
66
 
67
 
67
// URL loaded after success authenticates (let blank for browser defaults)
68
// URL loaded after success authenticates (let blank for browser defaults)
68
$adminurl = "";
69
$adminurl = "";
69
 
70
 
70
// Our own path
71
// Our own path
71
$loginpath = htmlspecialchars($_SERVER['PHP_SELF']);
72
$loginpath = htmlspecialchars($_SERVER['PHP_SELF']);
72
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
73
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
73
$alcasarpath = (($useHTTPS) ? 'https' : 'http' ).'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'];
74
$alcasarpath = (($useHTTPS) ? 'https' : 'http' ).'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'];
74
$statuspath = (($conf['HTTPS_CHILLI'] === 'on') ? 'https' : 'http' ).'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'].'/status.php';
75
$statuspath = (($conf['HTTPS_CHILLI'] === 'on') ? 'https' : 'http' ).'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'].'/status.php';
75
 
76
 
76
// Choice of language
77
// Choice of language
77
$Language = 'en';
78
$Language = 'en';
78
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
79
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
79
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
80
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
80
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
81
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
81
}
82
}
82
if ($Language === 'es') {		// Spanish
83
if ($Language === 'es') {		// Spanish
83
	$l_ChilliError			= "La autenticación debe ser un éxito a través del servicio de portal cautivo.";
84
	$l_ChilliError			= "La autenticación debe ser un éxito a través del servicio de portal cautivo.";
84
	$l_login			= "Autenticación exitosa.<HR>Cerrar ésta ventana interrumpe la sesión.";
85
	$l_login			= "Autenticación exitosa.<HR>Cerrar ésta ventana interrumpe la sesión.";
85
	$l_logout			= "Finalice la conexión";
86
	$l_logout			= "Finalice la conexión";
86
	$l_loginfailed			= "Error de autenticación";
87
	$l_loginfailed			= "Error de autenticación";
87
	$l_loggingin			= "Identificación en el portal cautivo";
88
	$l_loggingin			= "Identificación en el portal cautivo";
88
	$l_loggedcont			= "Control de Acceso";
89
	$l_loggedcont			= "Control de Acceso";
89
	$l_loggedout			= "Su sesión se cierra";
90
	$l_loggedout			= "Su sesión se cierra";
90
	$l_user				= "Usuario";
91
	$l_user				= "Usuario";
91
	$l_password			= "Contraseña";
92
	$l_password			= "Contraseña";
92
	$l_wait				= "Por favor, espere un momento ...";
93
	$l_wait				= "Por favor, espere un momento ...";
93
	$l_onlinetime			= "Tiempo de conexión:";
94
	$l_onlinetime			= "Tiempo de conexión:";
94
	$l_remainingtime		= "Desconexión en:";
95
	$l_remainingtime		= "Desconexión en:";
95
	$l_encrypted			= "La conexión con el portal apertura debe ser cifrada (https)";
96
	$l_encrypted			= "La conexión con el portal apertura debe ser cifrada (https)";
96
	$l_boutonO			= "Autenticación";
97
	$l_boutonO			= "Autenticación";
97
	$l_boutonF			= "Cerrar";
98
	$l_boutonF			= "Cerrar";
98
	$l_loggedin_stringl1		= "Información del Sistema de Seguridad";
99
	$l_loggedin_stringl1		= "Información del Sistema de Seguridad";
99
	$l_loggedin_stringl2		= "El portal fue creado para garantizar la trazabilidad, la rendición de cuentas y el no repudio de las conexiones.";
100
	$l_loggedin_stringl2		= "El portal fue creado para garantizar la trazabilidad, la rendición de cuentas y el no repudio de las conexiones.";
100
	$l_loggedin_stringl3		= "Su actividad en la red es registrada, de conformidad con criterios de privacidad.";
101
	$l_loggedin_stringl3		= "Su actividad en la red es registrada, de conformidad con criterios de privacidad.";
101
	$l_loggedin_stringl4		= "Los datos registrados pueden ser solicitados y suministrados a una autoridad judicial en el curso de una investigación.";
102
	$l_loggedin_stringl4		= "Los datos registrados pueden ser solicitados y suministrados a una autoridad judicial en el curso de una investigación.";
102
	$l_loggedin_stringl5		= "Estos datos se eliminan automáticamente después de un año.";
103
	$l_loggedin_stringl5		= "Estos datos se eliminan automáticamente después de un año.";
103
	$l_loggedin_stringl6		= "Click <a href=\"$alcasarpath\">aquí</a> para cambiar su contraseña o para instalar el certificado de seguridad en su navegador";
104
	$l_loggedin_stringl6		= "Click <a href=\"$alcasarpath\">aquí</a> para cambiar su contraseña o para instalar el certificado de seguridad en su navegador";
104
	$l_loggedout_string		= "Desconectado del portal cautivo!";
105
	$l_loggedout_string		= "Desconectado del portal cautivo!";
105
	$l_reply_0			= "Nombre de usuario o contraseña incorrectos";
106
	$l_reply_0			= "Nombre de usuario o contraseña incorrectos";
106
	$l_reply_1			= "Su cuota diaria ha sido alcanzada (duración o volumen)";
107
	$l_reply_1			= "Su cuota diaria ha sido alcanzada (duración o volumen)";
107
	$l_reply_2			= "Su cuota mensual ha sido alcanzada (duración o volumen)";
108
	$l_reply_2			= "Su cuota mensual ha sido alcanzada (duración o volumen)";
108
	$l_reply_3			= "Intenta conectarse fuera de su intervalo de tiempo permitido";
109
	$l_reply_3			= "Intenta conectarse fuera de su intervalo de tiempo permitido";
109
	$l_reply_4			= "su cuenta expiró";
110
	$l_reply_4			= "su cuenta expiró";
110
	$l_reply_5			= "Ha alcanzado el número máximo de inicios de sesión simultáneos";
111
	$l_reply_5			= "Ha alcanzado el número máximo de inicios de sesión simultáneos";
111
	$l_reply_6			= "Se ha alcanzado su tiempo de conexión autorizado";
112
	$l_reply_6			= "Se ha alcanzado su tiempo de conexión autorizado";
112
	$l_online_time			= "Tiempo en linea";
113
	$l_online_time			= "Tiempo en linea";
113
	$l_remaining_time		= "Tiempo restante";
114
	$l_remaining_time		= "Tiempo restante";
114
	$l_uam_domain			= "Sitios de libre acceso : ";
115
	$l_uam_domain			= "Sitios de libre acceso : ";
115
	$l_sms_registration 		= "Registo autom&aacute;tico";
116
	$l_sms_registration 	= "Registro por SMS";
-
 
117
	$l_email_registration 	= "Registro por E-mail";
116
} else if ($Language === 'pt') {	// Portuguese
118
} else if ($Language === 'pt') {	// Portuguese
117
	$l_ChilliError			= "A autenticação precisa ser bem sucedida através do portal.";
119
	$l_ChilliError			= "A autenticação precisa ser bem sucedida através do portal.";
118
	$l_login			= "Sucesso na autenticação.<HR>Matenha esse pop-up apenas minimizado para não interromper a conexão";
120
	$l_login			= "Sucesso na autenticação.<HR>Matenha esse pop-up apenas minimizado para não interromper a conexão";
119
	$l_logout			= "Encerrar conexão";
121
	$l_logout			= "Encerrar conexão";
120
	$l_loginfailed			= "Falha na autenticação";
122
	$l_loginfailed			= "Falha na autenticação";
121
	$l_loggingin			= "Identificação do portal cativo";
123
	$l_loggingin			= "Identificação do portal cativo";
122
	$l_loggedcont			= "Controle de acesso";
124
	$l_loggedcont			= "Controle de acesso";
123
	$l_loggedout			= "Sua sessão foi fechada";
125
	$l_loggedout			= "Sua sessão foi fechada";
124
	$l_user				= "Usuário";
126
	$l_user				= "Usuário";
125
	$l_password			= "Senha";
127
	$l_password			= "Senha";
126
	$l_wait				= "Por favor, aguarde um momento ...";
128
	$l_wait				= "Por favor, aguarde um momento ...";
127
	$l_onlinetime			= "Tempo de conexão:";
129
	$l_onlinetime			= "Tempo de conexão:";
128
	$l_remainingtime		= "Desconectado em:";
130
	$l_remainingtime		= "Desconectado em:";
129
	$l_encrypted			= "A conexão com o portal deve ser criptografada (https)";
131
	$l_encrypted			= "A conexão com o portal deve ser criptografada (https)";
130
	$l_boutonO			= "Autenticação";
132
	$l_boutonO			= "Autenticação";
131
	$l_boutonF			= "Fechar";
133
	$l_boutonF			= "Fechar";
132
	$l_loggedin_stringl1		= "Sistema de Informação e segurança";
134
	$l_loggedin_stringl1		= "Sistema de Informação e segurança";
133
	$l_loggedin_stringl2		= "Este controle foi criado para garantir acesso seguro.";
135
	$l_loggedin_stringl2		= "Este controle foi criado para garantir acesso seguro.";
134
	$l_loggedin_stringl3		= "A autenticação será criptografada em 256 bits, impedindo captura por escâner de rede.";
136
	$l_loggedin_stringl3		= "A autenticação será criptografada em 256 bits, impedindo captura por escâner de rede.";
135
	$l_loggedin_stringl4		= "Sua atividade na Internet será resguardada de acordo com os regulamentos da lei.";
137
	$l_loggedin_stringl4		= "Sua atividade na Internet será resguardada de acordo com os regulamentos da lei.";
136
	$l_loggedin_stringl5		= "Mantenha o popup da conexão minimizado para não interromper a cessão.";
138
	$l_loggedin_stringl5		= "Mantenha o popup da conexão minimizado para não interromper a cessão.";
137
	$l_loggedin_stringl6		= "Clique <a href=\"$alcasarpath\">aqui</a> para alterar sua senha, instalar certificado ou sair do portal.";
139
	$l_loggedin_stringl6		= "Clique <a href=\"$alcasarpath\">aqui</a> para alterar sua senha, instalar certificado ou sair do portal.";
138
	$l_loggedout_string		= "desconexão do portal cativo";
140
	$l_loggedout_string		= "desconexão do portal cativo";
139
	$l_reply_0			= "Nome de usuário ou senha incorretos";
141
	$l_reply_0			= "Nome de usuário ou senha incorretos";
140
	$l_reply_1			= "Sua cota diária foi alcançada (duração ou volume)";
142
	$l_reply_1			= "Sua cota diária foi alcançada (duração ou volume)";
141
	$l_reply_2			= "Sua cota mensal foi atingida (duração ou volume)";
143
	$l_reply_2			= "Sua cota mensal foi atingida (duração ou volume)";
142
	$l_reply_3			= "Você tenta conectar-se fora do seu período de tempo permitido";
144
	$l_reply_3			= "Você tenta conectar-se fora do seu período de tempo permitido";
143
	$l_reply_4			= "Sua conta expirou";
145
	$l_reply_4			= "Sua conta expirou";
144
	$l_reply_5			= "Você atingiu o número máximo de logins simultâneos";
146
	$l_reply_5			= "Você atingiu o número máximo de logins simultâneos";
145
	$l_reply_6			= "Seu tempo de conexão autorizada finalizou";
147
	$l_reply_6			= "Seu tempo de conexão autorizada finalizou";
146
	$l_online_time			= "Tempo Online";
148
	$l_online_time			= "Tempo Online";
147
	$l_remaining_time		= "Tempo restante";
149
	$l_remaining_time		= "Tempo restante";
148
	$l_uam_domain			= "Sítios de acesso livre : ";
150
	$l_uam_domain			= "Sítios de acesso livre : ";
149
	$l_sms_registration 		= "Registo autom&aacute;tico";
151
	$l_sms_registration 	= "Registo por SMS";
-
 
152
	$l_email_registration 	= "Registro por E-mail";
150
} else if ($Language === 'zh') {	// Chinese
153
} else if ($Language === 'zh') {	// Chinese
151
	$l_ChilliError			= "验证必须通过强制门户服务";
154
	$l_ChilliError			= "验证必须通过强制门户服务";
152
	$l_login			= "验证成功<HR>关闭此窗口中断连接";
155
	$l_login			= "验证成功<HR>关闭此窗口中断连接";
153
	$l_logout			= "关闭连接";
156
	$l_logout			= "关闭连接";
154
	$l_loginfailed			= "验证失败";
157
	$l_loginfailed			= "验证失败";
155
	$l_loggingin			= "强制门户身份识别";
158
	$l_loggingin			= "强制门户身份识别";
156
	$l_loggedcont			= "访问控制";
159
	$l_loggedcont			= "访问控制";
157
	$l_loggedout			= "您的连接已关闭";
160
	$l_loggedout			= "您的连接已关闭";
158
	$l_user				= "用户名";
161
	$l_user				= "用户名";
159
	$l_password			= "密码";
162
	$l_password			= "密码";
160
	$l_wait				= "请等待 ...";
163
	$l_wait				= "请等待 ...";
161
	$l_onlinetime			= "连接时间";
164
	$l_onlinetime			= "连接时间";
162
	$l_remainingtime		= "断开连接于";
165
	$l_remainingtime		= "断开连接于";
163
	$l_encrypted			= "与门户的连接必须加密 (https)";
166
	$l_encrypted			= "与门户的连接必须加密 (https)";
164
	$l_boutonO			= "验证";
167
	$l_boutonO			= "验证";
165
	$l_boutonF			= "关闭";
168
	$l_boutonF			= "关闭";
166
	$l_loggedin_stringl1		= "信息系统安全";
169
	$l_loggedin_stringl1		= "信息系统安全";
167
	$l_loggedin_stringl2		= "这种控制实施以法定保证可追溯性,可归罪性和连接的不否认性.";
170
	$l_loggedin_stringl2		= "这种控制实施以法定保证可追溯性,可归罪性和连接的不否认性.";
168
	$l_loggedin_stringl3		= "您的网络活动是私密登记的.";
171
	$l_loggedin_stringl3		= "您的网络活动是私密登记的.";
169
	$l_loggedin_stringl4		= "记录的数据能被司法机关在调查中操作使用.";
172
	$l_loggedin_stringl4		= "记录的数据能被司法机关在调查中操作使用.";
170
	$l_loggedin_stringl5		= "这些数据将在一年后自动删除.";
173
	$l_loggedin_stringl5		= "这些数据将在一年后自动删除.";
171
	$l_loggedin_stringl6		= "点击 <a href=\"$alcasarpath\"> 这里 </a> 修改密码或安装浏览器安全证书";
174
	$l_loggedin_stringl6		= "点击 <a href=\"$alcasarpath\"> 这里 </a> 修改密码或安装浏览器安全证书";
172
	$l_loggedout_string		= "强制网络门户连接已断开";
175
	$l_loggedout_string		= "强制网络门户连接已断开";
173
	$l_reply_0			= "用户名或密码无效";
176
	$l_reply_0			= "用户名或密码无效";
174
	$l_reply_1			= "您的每日配额已达到(持续时间或数量) ";
177
	$l_reply_1			= "您的每日配额已达到(持续时间或数量) ";
175
	$l_reply_2			= "已达到每月配额(持续时间或数量)";
178
	$l_reply_2			= "已达到每月配额(持续时间或数量)";
176
	$l_reply_3			= "您尝试在授权时间以外连接";
179
	$l_reply_3			= "您尝试在授权时间以外连接";
177
	$l_reply_4			= "您的账号已过期";
180
	$l_reply_4			= "您的账号已过期";
178
	$l_reply_5			= "您已经达到同时连接的最大数量";
181
	$l_reply_5			= "您已经达到同时连接的最大数量";
179
	$l_reply_6			= "已经到达您的允许连接时间";
182
	$l_reply_6			= "已经到达您的允许连接时间";
180
	$l_online_time			= "在线时间";
183
	$l_online_time			= "在线时间";
181
	$l_remaining_time		= "剩余时间";
184
	$l_remaining_time		= "剩余时间";
182
	$l_uam_domain			= " : ";
185
	$l_uam_domain			= " : ";
183
	$l_sms_registration		= "短信注册";
186
	$l_sms_registration		= "SMSで登録する";
-
 
187
	$l_email_registration 	= "メールでの登録";
184
} else if ($Language === 'ar') {	// Arabic
188
} else if ($Language === 'ar') {	// Arabic
185
	$l_ChilliError			= "يجب نجاح المصادقة على البوابة الأسيرة";
189
	$l_ChilliError			= "يجب نجاح المصادقة على البوابة الأسيرة";
186
	$l_login			= "إغلاق هذه النافذة يقطع دورة عملك";
190
	$l_login			= "إغلاق هذه النافذة يقطع دورة عملك";
187
	$l_logout			= "إغلاق الدورة";
191
	$l_logout			= "إغلاق الدورة";
188
	$l_loginfailed			= "فشل المصادقة";
192
	$l_loginfailed			= "فشل المصادقة";
189
	$l_loggingin			= "التعريف على البوابة الأسيرة";
193
	$l_loggingin			= "التعريف على البوابة الأسيرة";
190
	$l_loggedcont			= "مراقبة الدخول";
194
	$l_loggedcont			= "مراقبة الدخول";
191
	$l_loggedout			= "دورتكَ مغلقة";
195
	$l_loggedout			= "دورتكَ مغلقة";
192
	$l_user				= "التعريف";
196
	$l_user				= "التعريف";
193
	$l_password			= "كلمة السر";
197
	$l_password			= "كلمة السر";
194
	$l_wait				= "...إنتظر بعض اللحظات";
198
	$l_wait				= "...إنتظر بعض اللحظات";
195
	$l_onlinetime			= ":مدة الإتصال";
199
	$l_onlinetime			= ":مدة الإتصال";
196
	$l_remainingtime		= ":انقطاع الإتصال في";
200
	$l_remainingtime		= ":انقطاع الإتصال في";
197
	$l_encrypted			= "يجب تشفير الإتصال بالبوابة (https)";
201
	$l_encrypted			= "يجب تشفير الإتصال بالبوابة (https)";
198
	$l_boutonO			= "مصادقة";
202
	$l_boutonO			= "مصادقة";
199
	$l_boutonF			= "أغلق";
203
	$l_boutonF			= "أغلق";
200
	$l_loggedin_stringl1		= "سلامة نظم المعلومات";
204
	$l_loggedin_stringl1		= "سلامة نظم المعلومات";
201
	$l_loggedin_stringl2		= "وُضعت هذه المراقبة للضمان القانوني لتتبع ومساءلة وعدم تنصل الإتصالات";
205
	$l_loggedin_stringl2		= "وُضعت هذه المراقبة للضمان القانوني لتتبع ومساءلة وعدم تنصل الإتصالات";
202
	$l_loggedin_stringl3		= "نشاطك على الشبكة مسجل وفقاً لاحترام الحريات الشخصية";
206
	$l_loggedin_stringl3		= "نشاطك على الشبكة مسجل وفقاً لاحترام الحريات الشخصية";
203
	$l_loggedin_stringl4		= "لا يمكن استغلال البيانات المسجلة إلاّ من قِبل سلطات التحقيق القضائ";
207
	$l_loggedin_stringl4		= "لا يمكن استغلال البيانات المسجلة إلاّ من قِبل سلطات التحقيق القضائ";
204
	$l_loggedin_stringl5		= "سيتم حدف هذه البيانات تلقائياً بعد سنة من الْيَوْمَ";
208
	$l_loggedin_stringl5		= "سيتم حدف هذه البيانات تلقائياً بعد سنة من الْيَوْمَ";
205
	$l_loggedin_stringl6		= "لتغيير كلمة السر أو شهادة الأمان <a href=\"$alcasarpath\">هنا</a> اضغط ";
209
	$l_loggedin_stringl6		= "لتغيير كلمة السر أو شهادة الأمان <a href=\"$alcasarpath\">هنا</a> اضغط ";
206
	$l_loggedout_string		= "تَمّ قطع الإتصال بالبوابة الأسيرة";
210
	$l_loggedout_string		= "تَمّ قطع الإتصال بالبوابة الأسيرة";
207
	$l_reply_0			= "اسم المستخدم أو كلمة المرور غير صالحة";
211
	$l_reply_0			= "اسم المستخدم أو كلمة المرور غير صالحة";
208
	$l_reply_1			= "تم الوصول إلى حصتك اليومية (المدة أو الحجم)";
212
	$l_reply_1			= "تم الوصول إلى حصتك اليومية (المدة أو الحجم)";
209
	$l_reply_2			= "تم الوصول إلى حصتك الشهرية (المدة أو الحجم)";
213
	$l_reply_2			= "تم الوصول إلى حصتك الشهرية (المدة أو الحجم)";
210
	$l_reply_3			= "محاولة اتصال خارج فترتك المأذونة";
214
	$l_reply_3			= "محاولة اتصال خارج فترتك المأذونة";
211
	$l_reply_4			= "انتهت مدة صلاحية حسابك";
215
	$l_reply_4			= "انتهت مدة صلاحية حسابك";
212
	$l_reply_5			= "لقد استكملت العدد الأقصى للإتصالات المتزامنة";
216
	$l_reply_5			= "لقد استكملت العدد الأقصى للإتصالات المتزامنة";
213
	$l_reply_6			= "استكملت مذة الإتصال المسموحة";
217
	$l_reply_6			= "استكملت مذة الإتصال المسموحة";
214
	$l_online_time			= "مذة الإتصال";
218
	$l_online_time			= "مذة الإتصال";
215
	$l_remaining_time		= "الوقت المتبق";
219
	$l_remaining_time		= "الوقت المتبق";
216
	$l_uam_domain			= "مواقع الوصول المجاني";
220
	$l_uam_domain			= "مواقع الوصول المجاني";
217
	$l_sms_registration		= "تسجيل ذاتي (SMS)";
221
	$l_sms_registration		= "التسجيل عن طريق الرسائل القصيرة";
-
 
222
	$l_email_registration 	= "التسجيل عن طريق البريد الإلكتروني";
218
} else if ($Language === 'de') {	// German
223
} else if ($Language === 'de') {	// German
219
	$l_ChilliError			= "Sie wurden erfolgreich durch das Portal authentifiziert.";
224
	$l_ChilliError			= "Sie wurden erfolgreich durch das Portal authentifiziert.";
220
	$l_login			= "Erfolgreiche Authentifizierung.<HR>Schlißen dieses fensters unterbricht die Sitzung";
225
	$l_login			= "Erfolgreiche Authentifizierung.<HR>Schlißen dieses fensters unterbricht die Sitzung";
221
	$l_logout			= "Beenden der Verbindung";
226
	$l_logout			= "Beenden der Verbindung";
222
	$l_loginfailed			= "Authentifizierungsfehler";
227
	$l_loginfailed			= "Authentifizierungsfehler";
223
	$l_loggingin			= "Authentifizierung auf dem Portal";
228
	$l_loggingin			= "Authentifizierung auf dem Portal";
224
	$l_loggedcont			= "Zugangskontrolle";
229
	$l_loggedcont			= "Zugangskontrolle";
225
	$l_loggedout			= "Ihre Sitzung wurde geschlossen";
230
	$l_loggedout			= "Ihre Sitzung wurde geschlossen";
226
	$l_user				= "Benutzer";
231
	$l_user				= "Benutzer";
227
	$l_password			= "Passwort";
232
	$l_password			= "Passwort";
228
	$l_wait				= "Bitte warten Sie einen Moment ...";
233
	$l_wait				= "Bitte warten Sie einen Moment ...";
229
	$l_onlinetime			= "Online-Zeit:";
234
	$l_onlinetime			= "Online-Zeit:";
230
	$l_remainingtime		= "Abmelden:";
235
	$l_remainingtime		= "Abmelden:";
231
	$l_encrypted			= "Die Verbindung muss verschlüsselt sein (https)";
236
	$l_encrypted			= "Die Verbindung muss verschlüsselt sein (https)";
232
	$l_boutonO			= "Authentifizierung";
237
	$l_boutonO			= "Authentifizierung";
233
	$l_boutonF			= "Schließen";
238
	$l_boutonF			= "Schließen";
234
	$l_loggedin_stringl1		= "Information System Security";
239
	$l_loggedin_stringl1		= "Information System Security";
235
	$l_loggedin_stringl2		= "Dieses Portal wurde eingerichtet, um ordnungsgemäß die Rückverfolgbarkeit, die Zurechenbarkeit und die Nicht-Abstreitbarkeit der Verbindungen zu sichern.";
240
	$l_loggedin_stringl2		= "Dieses Portal wurde eingerichtet, um ordnungsgemäß die Rückverfolgbarkeit, die Zurechenbarkeit und die Nicht-Abstreitbarkeit der Verbindungen zu sichern.";
236
	$l_loggedin_stringl3		= "Ihre Tätigkeiten im Netzwerk werden im Hinblick auf den Schutz Ihrer Privatsphäre gespeichert.";
241
	$l_loggedin_stringl3		= "Ihre Tätigkeiten im Netzwerk werden im Hinblick auf den Schutz Ihrer Privatsphäre gespeichert.";
237
	$l_loggedin_stringl4		= "Die gespeicherten Daten können von einer Justizbehörde im Falle einer Untersuchung genutzt werden.";
242
	$l_loggedin_stringl4		= "Die gespeicherten Daten können von einer Justizbehörde im Falle einer Untersuchung genutzt werden.";
238
	$l_loggedin_stringl5		= "Diese Daten werden nach einem Jahr automatisch gelöscht.";
243
	$l_loggedin_stringl5		= "Diese Daten werden nach einem Jahr automatisch gelöscht.";
239
	$l_loggedin_stringl6		= "Klicken Sie <a href=\"$alcasarpath\">hier</a> um Ihr Password zu ändern oder das Sicherheitszertifikat für Ihren Browser herunterzuladen";
244
	$l_loggedin_stringl6		= "Klicken Sie <a href=\"$alcasarpath\">hier</a> um Ihr Password zu ändern oder das Sicherheitszertifikat für Ihren Browser herunterzuladen";
240
	$l_loggedout_string		= "Sie wurden vom Portal getrennt!";
245
	$l_loggedout_string		= "Sie wurden vom Portal getrennt!";
241
	$l_reply_0			= "Falscher Benutzername oder falsches Passwort";
246
	$l_reply_0			= "Falscher Benutzername oder falsches Passwort";
242
	$l_reply_1			= "Ihr Tageskontingent wurde erreicht (Dauer oder Volumen)";
247
	$l_reply_1			= "Ihr Tageskontingent wurde erreicht (Dauer oder Volumen)";
243
	$l_reply_2			= "Ihr monatliches Kontingent wurde erreicht (Dauer oder Volumen)";
248
	$l_reply_2			= "Ihr monatliches Kontingent wurde erreicht (Dauer oder Volumen)";
244
	$l_reply_3			= "Sie haben versucht sich außerhalb der erlaubten Zeiten zu verbinden";
249
	$l_reply_3			= "Sie haben versucht sich außerhalb der erlaubten Zeiten zu verbinden";
245
	$l_reply_4			= "Ihr Account ist abgelaufen";
250
	$l_reply_4			= "Ihr Account ist abgelaufen";
246
	$l_reply_5			= "Sie haben die maximale Anzahl an simultanen Verbindungen erreicht";
251
	$l_reply_5			= "Sie haben die maximale Anzahl an simultanen Verbindungen erreicht";
247
	$l_reply_6			= "Ihre maximale Verbindungszeit wurde erreicht";
252
	$l_reply_6			= "Ihre maximale Verbindungszeit wurde erreicht";
248
	$l_online_time			= "Online-Zeit";
253
	$l_online_time			= "Online-Zeit";
249
	$l_remaining_time		= "Verbleibende Zeit";
254
	$l_remaining_time		= "Verbleibende Zeit";
250
	$l_uam_domain			= "Offen zugängliche Seiten : ";
255
	$l_uam_domain			= "Offen zugängliche Seiten : ";
251
	$l_sms_registration		= "Automatische Registrierung";
256
	$l_sms_registration		= "Per SMS anmelden";
-
 
257
	$l_email_registration 	= "Per E-Mail anmelden";
252
} else if ($Language === 'nl') {	// Dutch
258
} else if ($Language === 'nl') {	// Dutch
253
	$l_ChilliError			= "De authenticatie moet een succes worden via de captive portal dienst.";
259
	$l_ChilliError			= "De authenticatie moet een succes worden via de captive portal dienst.";
254
	$l_login			= "Succesvolle authenticatie.<HR>Dit venster te sluiten onderbreekt uw sessie.";
260
	$l_login			= "Succesvolle authenticatie.<HR>Dit venster te sluiten onderbreekt uw sessie.";
255
	$l_logout			= "Slotkoers verbinding";
261
	$l_logout			= "Slotkoers verbinding";
256
	$l_loginfailed			= "Authenticatie mislukt";
262
	$l_loginfailed			= "Authenticatie mislukt";
257
	$l_loggingin			= "Identificatie van de captive-portaal";
263
	$l_loggingin			= "Identificatie van de captive-portaal";
258
	$l_loggedcont			= "toegangscontrole";
264
	$l_loggedcont			= "toegangscontrole";
259
	$l_loggedout			= "Uw sessie is gesloten";
265
	$l_loggedout			= "Uw sessie is gesloten";
260
	$l_user				= "Gebruiker";
266
	$l_user				= "Gebruiker";
261
	$l_password			= "Wachtwoord";
267
	$l_password			= "Wachtwoord";
262
	$l_wait				= "Wacht een moment ...";
268
	$l_wait				= "Wacht een moment ...";
263
	$l_onlinetime			= "Sluit tijd:";
269
	$l_onlinetime			= "Sluit tijd:";
264
	$l_remainingtime		= "Verbreking in:";
270
	$l_remainingtime		= "Verbreking in:";
265
	$l_encrypted			= "De opening moet gebruiken gecodeerde verbinding (https)";
271
	$l_encrypted			= "De opening moet gebruiken gecodeerde verbinding (https)";
266
	$l_boutonO			= "Authenticatie";
272
	$l_boutonO			= "Authenticatie";
267
	$l_boutonF			= "Sluiten";
273
	$l_boutonF			= "Sluiten";
268
	$l_loggedin_stringl1		= "Information System Security";
274
	$l_loggedin_stringl1		= "Information System Security";
269
	$l_loggedin_stringl2		= "Het portaal werd opgericht verordeningen om de traceerbaarheid, verantwoordelijkheid en onloochenbaarheid van de verbindingen.";
275
	$l_loggedin_stringl2		= "Het portaal werd opgericht verordeningen om de traceerbaarheid, verantwoordelijkheid en onloochenbaarheid van de verbindingen.";
270
	$l_loggedin_stringl3		= "Uw activiteit op het netwerk is geregistreerd in overeenstemming met de persoonlijke levenssfeer.";
276
	$l_loggedin_stringl3		= "Uw activiteit op het netwerk is geregistreerd in overeenstemming met de persoonlijke levenssfeer.";
271
	$l_loggedin_stringl4		= "De geregistreerde gegevens kunnen worden kunnen worden bediend door een rechterlijke instantie in de loop van een onderzoek.";
277
	$l_loggedin_stringl4		= "De geregistreerde gegevens kunnen worden kunnen worden bediend door een rechterlijke instantie in de loop van een onderzoek.";
272
	$l_loggedin_stringl5		= "Deze gegevens worden automatisch verwijderd na een jaar.";
278
	$l_loggedin_stringl5		= "Deze gegevens worden automatisch verwijderd na een jaar.";
273
	$l_loggedin_stringl6		= "Click <a href=\"$alcasarpath\">here</a> to change your password or to integrate the security certificate in your browser";
279
	$l_loggedin_stringl6		= "Click <a href=\"$alcasarpath\">here</a> to change your password or to integrate the security certificate in your browser";
274
	$l_loggedout_string		= "Logout gemaakt intern portaal!";
280
	$l_loggedout_string		= "Logout gemaakt intern portaal!";
275
	$l_reply_0			= "Ongeldige gebruikersnaam of wachtwoord";
281
	$l_reply_0			= "Ongeldige gebruikersnaam of wachtwoord";
276
	$l_reply_1 			= "Uw dagelijkse quotum is bereikt (duur of volume)";
282
	$l_reply_1 			= "Uw dagelijkse quotum is bereikt (duur of volume)";
277
	$l_reply_2			= "Je maandelijkse quotum is bereikt (duur of volume)";
283
	$l_reply_2			= "Je maandelijkse quotum is bereikt (duur of volume)";
278
	$l_reply_3			= "You try to connect outside of your allowed timespan";
284
	$l_reply_3			= "You try to connect outside of your allowed timespan";
279
	$l_reply_4			= "your account expired";
285
	$l_reply_4			= "your account expired";
280
	$l_reply_5			= "You have reached the maximum number of simultaneous logins";
286
	$l_reply_5			= "You have reached the maximum number of simultaneous logins";
281
	$l_reply_6			= "Your authorized connexion time has been reached";
287
	$l_reply_6			= "Your authorized connexion time has been reached";
282
	$l_online_time			= "Online tijd";
288
	$l_online_time			= "Online tijd";
283
	$l_remaining_time		= "Reterende tijd";
289
	$l_remaining_time		= "Reterende tijd";
284
	$l_uam_domain			= "Sites met open toegang : ";
290
	$l_uam_domain			= "Sites met open toegang : ";
285
	$l_sms_registration		= "Automatische registratie";
291
	$l_sms_registration		= "Registreren per SMS";
-
 
292
	$l_email_registration 	= "Registreer per E-mail";
286
} else if ($Language === 'fr') {	// French
293
} else if ($Language === 'fr') {	// French
287
	$l_ChilliError			= "L'authentification doit être réussie sur le portail captif.";
294
	$l_ChilliError			= "L'authentification doit être réussie sur le portail captif.";
288
	$l_login			= "Authentification réussie.<HR>La fermeture de cette fenêtre interrompt votre session.";
295
	$l_login			= "Authentification réussie.<HR>La fermeture de cette fenêtre interrompt votre session.";
289
	$l_logout			= "Fermeture de la session";
296
	$l_logout			= "Fermeture de la session";
290
	$l_loginfailed			= "Echec d'authentification";
297
	$l_loginfailed			= "Echec d'authentification";
291
	$l_loggingin			= "Identification sur le portail captif";
298
	$l_loggingin			= "Identification sur le portail captif";
292
	$l_loggedcont			= "Contrôle d'accès";
299
	$l_loggedcont			= "Contrôle d'accès";
293
	$l_loggedout			= "Votre session est fermée";
300
	$l_loggedout			= "Votre session est fermée";
294
	$l_user				= "Identifiant";
301
	$l_user				= "Identifiant";
295
	$l_password			= "Mot de passe";
302
	$l_password			= "Mot de passe";
296
	$l_wait				= "Patientez un instant ...";
303
	$l_wait				= "Patientez un instant ...";
297
	$l_onlinetime			= "Temps de connexion:";
304
	$l_onlinetime			= "Temps de connexion:";
298
	$l_remainingtime		= "Deconnexion dans :";
305
	$l_remainingtime		= "Deconnexion dans :";
299
	$l_encrypted			= "La connexion avec le portail doit être chiffrée (https)";
306
	$l_encrypted			= "La connexion avec le portail doit être chiffrée (https)";
300
	$l_boutonO			= "Authentification";
307
	$l_boutonO			= "Authentification";
301
	$l_boutonF			= "Fermer";
308
	$l_boutonF			= "Fermer";
302
	$l_loggedin_stringl1		= "Sécurité des Systèmes d'Information";
309
	$l_loggedin_stringl1		= "Sécurité des Systèmes d'Information";
303
	$l_loggedin_stringl2		= "Ce contrôle a été mis en place pour assurer réglementairement la traçabilité, l'imputabilité et la non-répudiation des connexions.";
310
	$l_loggedin_stringl2		= "Ce contrôle a été mis en place pour assurer réglementairement la traçabilité, l'imputabilité et la non-répudiation des connexions.";
304
	$l_loggedin_stringl3		= "Votre activité sur le réseau est enregistrée conformément au respect de la vie privée.";
311
	$l_loggedin_stringl3		= "Votre activité sur le réseau est enregistrée conformément au respect de la vie privée.";
305
	$l_loggedin_stringl4		= "Les données enregistrées ne pourront être exploitées que par une autorité judiciaire dans le cadre d'une enquête.";
312
	$l_loggedin_stringl4		= "Les données enregistrées ne pourront être exploitées que par une autorité judiciaire dans le cadre d'une enquête.";
306
	$l_loggedin_stringl5		= "Ces données seront automatiquement supprimées au bout d'un an.";
313
	$l_loggedin_stringl5		= "Ces données seront automatiquement supprimées au bout d'un an.";
307
	$l_loggedin_stringl6		= "Cliquez <a href=\"$alcasarpath\">ici</a> pour changer votre mot de passe ou pour intégrer le certificat de sécurité à votre navigateur";
314
	$l_loggedin_stringl6		= "Cliquez <a href=\"$alcasarpath\">ici</a> pour changer votre mot de passe ou pour intégrer le certificat de sécurité à votre navigateur";
308
	$l_loggedout_string		= "Déconnexion du portail captif effectuée !";
315
	$l_loggedout_string		= "Déconnexion du portail captif effectuée !";
309
	$l_reply_0			= "Nom d'utilisateur ou mot de passe incorrect";
316
	$l_reply_0			= "Nom d'utilisateur ou mot de passe incorrect";
310
	$l_reply_1			= "Votre quota journalier a été atteint (durée ou volume)";
317
	$l_reply_1			= "Votre quota journalier a été atteint (durée ou volume)";
311
	$l_reply_2			= "Votre quota mensuel a été atteint (durée ou volume)";
318
	$l_reply_2			= "Votre quota mensuel a été atteint (durée ou volume)";
312
	$l_reply_3			= "Vous tentez de vous connecter en dehors de votre période autorisée";
319
	$l_reply_3			= "Vous tentez de vous connecter en dehors de votre période autorisée";
313
	$l_reply_4			= "Votre compte a expiré";
320
	$l_reply_4			= "Votre compte a expiré";
314
	$l_reply_5			= "Vous avez atteint le nombre maximum de connexions simultanées";
321
	$l_reply_5			= "Vous avez atteint le nombre maximum de connexions simultanées";
315
	$l_reply_6			= "Votre durée de connexion autorisée a été atteinte";
322
	$l_reply_6			= "Votre durée de connexion autorisée a été atteinte";
316
	$l_online_time			= "Temps de connexion";
323
	$l_online_time			= "Temps de connexion";
317
	$l_remaining_time		= "Temps restant";
324
	$l_remaining_time		= "Temps restant";
318
	$l_uam_domain			= "Sites en accès libre : ";
325
	$l_uam_domain			= "Sites en accès libre : ";
319
	$l_sms_registration		= "Auto enregistrement (sms)";
326
	$l_sms_registration		= "S'inscrire par SMS";
-
 
327
	$l_email_registration 	= "S'incrire pae E-mail";
320
} else {				// English
328
} else {				// English
321
	$l_ChilliError			= "The authentication must be successful through the captive portal service.";
329
	$l_ChilliError			= "The authentication must be successful through the captive portal service.";
322
	$l_login			= "Successful authentication.<HR>Closing this window interrupts your session";
330
	$l_login			= "Successful authentication.<HR>Closing this window interrupts your session";
323
	$l_logout			= "Closing connection";
331
	$l_logout			= "Closing connection";
324
	$l_loginfailed			= "Authentication Failed";
332
	$l_loginfailed			= "Authentication Failed";
325
	$l_loggingin			= "Identification on the captive portal";
333
	$l_loggingin			= "Identification on the captive portal";
326
	$l_loggedcont			= "Access Control";
334
	$l_loggedcont			= "Access Control";
327
	$l_loggedout			= "Your session is closed";
335
	$l_loggedout			= "Your session is closed";
328
	$l_user				= "User";
336
	$l_user				= "User";
329
	$l_password			= "Password";
337
	$l_password			= "Password";
330
	$l_wait				= "Please wait a moment ...";
338
	$l_wait				= "Please wait a moment ...";
331
	$l_onlinetime			= "Connect time:";
339
	$l_onlinetime			= "Connect time:";
332
	$l_remainingtime		= "Disconnection in:";
340
	$l_remainingtime		= "Disconnection in:";
333
	$l_encrypted			= "The connection with the portal must be encrypted (https)";
341
	$l_encrypted			= "The connection with the portal must be encrypted (https)";
334
	$l_boutonO			= "Authentication";
342
	$l_boutonO			= "Authentication";
335
	$l_boutonF			= "Close";
343
	$l_boutonF			= "Close";
336
	$l_loggedin_stringl1		= "Information System Security";
344
	$l_loggedin_stringl1		= "Information System Security";
337
	$l_loggedin_stringl2		= "That control was set up regulations to ensure traceability, accountability and non-repudiation of connections.";
345
	$l_loggedin_stringl2		= "That control was set up regulations to ensure traceability, accountability and non-repudiation of connections.";
338
	$l_loggedin_stringl3		= "Your activity on the network is registered in accordance with privacy.";
346
	$l_loggedin_stringl3		= "Your activity on the network is registered in accordance with privacy.";
339
	$l_loggedin_stringl4		= "The recorded data can be able to be operated by a judicial authority in the course of an investigation.";
347
	$l_loggedin_stringl4		= "The recorded data can be able to be operated by a judicial authority in the course of an investigation.";
340
	$l_loggedin_stringl5		= "These data will be automatically deleted after one year.";
348
	$l_loggedin_stringl5		= "These data will be automatically deleted after one year.";
341
	$l_loggedin_stringl6		= "Click <a href=\"$alcasarpath\">here</a> to change your password or to integrate the security certificate in your browser";
349
	$l_loggedin_stringl6		= "Click <a href=\"$alcasarpath\">here</a> to change your password or to integrate the security certificate in your browser";
342
	$l_loggedout_string		= "Disconnection of the captive portal made";
350
	$l_loggedout_string		= "Disconnection of the captive portal made";
343
	$l_reply_0			= "Incorrect username or password";
351
	$l_reply_0			= "Incorrect username or password";
344
	$l_reply_1			= "Your daily quota has been reached (duration or volume)";
352
	$l_reply_1			= "Your daily quota has been reached (duration or volume)";
345
	$l_reply_2			= "Your monthly quota has been reached (duration or volume)";
353
	$l_reply_2			= "Your monthly quota has been reached (duration or volume)";
346
	$l_reply_3			= "You try to connect outside of your allowed timespan";
354
	$l_reply_3			= "You try to connect outside of your allowed timespan";
347
	$l_reply_4			= "your account expired";
355
	$l_reply_4			= "your account expired";
348
	$l_reply_5			= "You have reached the maximum number of simultaneous logins";
356
	$l_reply_5			= "You have reached the maximum number of simultaneous logins";
349
	$l_reply_6			= "Your authorized connexion time has been reached";
357
	$l_reply_6			= "Your authorized connexion time has been reached";
350
	$l_online_time			= "Online time";
358
	$l_online_time			= "Online time";
351
	$l_remaining_time		= "Remaining time";
359
	$l_remaining_time		= "Remaining time";
352
	$l_uam_domain			= "Open access websites : ";
360
	$l_uam_domain			= "Open access websites : ";
353
	$l_sms_registration		= "Auto registration (sms)";
361
	$l_sms_registration		= "Register by SMS";
-
 
362
	$l_email_registration 	= "Register by E-mail";
354
}
363
}
355
 
364
 
356
# If HTTPS not use, tell it's wrong
365
# If HTTPS not use, tell it's wrong
357
if (($conf['HTTPS_LOGIN'] === 'on') && ((!isset($_SERVER['HTTPS'])) || (empty($_SERVER['HTTPS'])) || ($_SERVER['HTTPS'] === 'off'))) {
366
if (($conf['HTTPS_LOGIN'] === 'on') && ((!isset($_SERVER['HTTPS'])) || (empty($_SERVER['HTTPS'])) || ($_SERVER['HTTPS'] === 'off'))) {
358
	// Cleaning the cache
367
	// Cleaning the cache
359
	header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
368
	header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
360
	header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
369
	header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
361
	header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
370
	header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
362
	header('Cache-Control: post-check=0, pre-check=0', false);
371
	header('Cache-Control: post-check=0, pre-check=0', false);
363
	header('Pragma: no-cache');
372
	header('Pragma: no-cache');
364
	?>
373
	?>
365
	<!DOCTYPE html>
374
	<!DOCTYPE html>
366
	<html>
375
	<html>
367
	<head>
376
	<head>
368
		<meta charset="utf-8">
377
		<meta charset="utf-8">
369
		<title><?= $l_loggedcont ?></title>
378
		<title><?= $l_loggedcont ?></title>
370
	</head>
379
	</head>
371
	<body style="background-color: white;">
380
	<body style="background-color: white;">
372
		<h1 style="text-align: center;"><?= $l_loginfailed ?></h1>
381
		<h1 style="text-align: center;"><?= $l_loginfailed ?></h1>
373
		<center><?= $l_encrypted ?></center> 
382
		<center><?= $l_encrypted ?></center> 
374
	</body>
383
	</body>
375
	</html>
384
	</html>
376
	<?php
385
	<?php
377
	exit();
386
	exit();
378
}
387
}
379
 
388
 
380
# Read form parameters which we care about
389
# Read form parameters which we care about
381
# avoid the "user as a MAC address" attempts
390
# avoid the "user as a MAC address" attempts
382
if ((isset($_POST['username'])) && (preg_match('/^([0-9A-F]{2}-){5}[0-9A-F]{2}$/', $_POST['username']) !== 1))
391
if ((isset($_POST['username'])) && (preg_match('/^([0-9A-F]{2}-){5}[0-9A-F]{2}$/', $_POST['username']) !== 1))
383
				$username	= htmlspecialchars(trim($_POST['username']));	else $username = '';
392
				$username	= htmlspecialchars(trim($_POST['username']));	else $username = '';
384
if (isset($_POST['password']))	$password	= htmlspecialchars($_POST['password']);		else $password = '';
393
if (isset($_POST['password']))	$password	= htmlspecialchars($_POST['password']);		else $password = '';
385
if (isset($_POST['challenge']))	$challenge	= htmlspecialchars($_POST['challenge']);	else $challenge = '';
394
if (isset($_POST['challenge']))	$challenge	= htmlspecialchars($_POST['challenge']);	else $challenge = '';
386
if (isset($_POST['button']))	$button		= htmlspecialchars($_POST['button']);		else $button = '';
395
if (isset($_POST['button']))	$button		= htmlspecialchars($_POST['button']);		else $button = '';
387
// if (isset($_POST['logout']))	$logout		= htmlspecialchars($_POST['logout']);		else $logout = '';
396
// if (isset($_POST['logout']))	$logout		= htmlspecialchars($_POST['logout']);		else $logout = '';
388
// if (isset($_POST['prelogin']))	$prelogin	= htmlspecialchars($_POST['prelogin']);		else $prelogin = '';
397
// if (isset($_POST['prelogin']))	$prelogin	= htmlspecialchars($_POST['prelogin']);		else $prelogin = '';
389
// if (isset($_POST['res']))	$res		= htmlspecialchars($_POST['res']);		else $res = '';
398
// if (isset($_POST['res']))	$res		= htmlspecialchars($_POST['res']);		else $res = '';
390
// if (isset($_POST['uamip']))	$uamip		= htmlspecialchars($_POST['uamip']);		else $uamip = '';
399
// if (isset($_POST['uamip']))	$uamip		= htmlspecialchars($_POST['uamip']);		else $uamip = '';
391
// if (isset($_POST['uamport']))	$uamport	= htmlspecialchars($_POST['uamport']);		else $uamport = '';
400
// if (isset($_POST['uamport']))	$uamport	= htmlspecialchars($_POST['uamport']);		else $uamport = '';
392
if (isset($_POST['userurl']))	$userurl	= htmlspecialchars($_POST['userurl']);		else $userurl = '';
401
if (isset($_POST['userurl']))	$userurl	= htmlspecialchars($_POST['userurl']);		else $userurl = '';
393
// if (isset($_POST['timeleft']))	$timeleft	= htmlspecialchars($_POST['timeleft']);		else $timeleft = '';
402
// if (isset($_POST['timeleft']))	$timeleft	= htmlspecialchars($_POST['timeleft']);		else $timeleft = '';
394
// if (isset($_POST['redirurl']))	$redirurl	= htmlspecialchars($_POST['redirurl']);		else $redirurl = '';
403
// if (isset($_POST['redirurl']))	$redirurl	= htmlspecialchars($_POST['redirurl']);		else $redirurl = '';
395
 
404
 
396
# Read query parameters which we care about
405
# Read query parameters which we care about
397
if (isset($_GET['res']))	$res		= htmlspecialchars($_GET['res']);		else $res = '';
406
if (isset($_GET['res']))	$res		= htmlspecialchars($_GET['res']);		else $res = '';
398
// if (isset($_GET['reason']))	$reason		= htmlspecialchars($_GET['reason']);		else $reason = '';
407
// if (isset($_GET['reason']))	$reason		= htmlspecialchars($_GET['reason']);		else $reason = '';
399
if (isset($_GET['challenge']))	$challenge	= htmlspecialchars($_GET['challenge']);
408
if (isset($_GET['challenge']))	$challenge	= htmlspecialchars($_GET['challenge']);
400
// if (isset($_GET['uamip']))	$uamip		= htmlspecialchars($_GET['uamip']);
409
// if (isset($_GET['uamip']))	$uamip		= htmlspecialchars($_GET['uamip']);
401
// if (isset($_GET['uamport']))	$uamport	= htmlspecialchars($_GET['uamport']);
410
// if (isset($_GET['uamport']))	$uamport	= htmlspecialchars($_GET['uamport']);
402
if (isset($_GET['timeleft']))	$timeleft	= htmlspecialchars($_GET['timeleft']);		else $timeleft = '';
411
if (isset($_GET['timeleft']))	$timeleft	= htmlspecialchars($_GET['timeleft']);		else $timeleft = '';
403
if (isset($_GET['reply']))	$reply		= htmlspecialchars(trim($_GET['reply']));	else $reply = '';
412
if (isset($_GET['reply']))	$reply		= htmlspecialchars(trim($_GET['reply']));	else $reply = '';
404
if (isset($_GET['redirurl']))	$redirurl	= htmlspecialchars($_GET['redirurl']);		else $redirurl = '';
413
if (isset($_GET['redirurl']))	$redirurl	= htmlspecialchars($_GET['redirurl']);		else $redirurl = '';
405
if (isset($_GET['userurl']))	$userurl	= htmlspecialchars($_GET['userurl']);
414
if (isset($_GET['userurl']))	$userurl	= htmlspecialchars($_GET['userurl']);
406
 
415
 
407
// TODO: clean unused query params
416
// TODO: clean unused query params
408
 
417
 
409
$uamip = $conf['HOSTNAME'].'.'.$conf['DOMAIN'];
418
$uamip = $conf['HOSTNAME'].'.'.$conf['DOMAIN'];
410
if (($conf['HTTPS_CHILLI'] === 'on') && $useHTTPS) {
419
if (($conf['HTTPS_CHILLI'] === 'on') && $useHTTPS) {
411
	$uamproto = 'https';
420
	$uamproto = 'https';
412
	$uamport  = 3991;
421
	$uamport  = 3991;
413
} else {
422
} else {
414
	$uamproto = 'http';
423
	$uamproto = 'http';
415
	$uamport  = 3990;
424
	$uamport  = 3990;
416
}
425
}
417
 
426
 
418
# translation of radius replies
427
# translation of radius replies
419
if (!empty($reply)) {
428
if (!empty($reply)) {
420
	switch ($reply) {
429
	switch ($reply) {
421
		case 'Username not found'				: $reply = $l_reply_0; break;
430
		case 'Username not found'				: $reply = $l_reply_0; break;
422
		case 'Login failed'					: $reply = $l_reply_0; break;
431
		case 'Login failed'					: $reply = $l_reply_0; break;
423
		case 'Your maximum daily usage time has been reached'	: $reply = $l_reply_1; break;
432
		case 'Your maximum daily usage time has been reached'	: $reply = $l_reply_1; break;
424
		case 'Your maximum monthly usage time has been reached'	: $reply = $l_reply_2; break;
433
		case 'Your maximum monthly usage time has been reached'	: $reply = $l_reply_2; break;
425
		case 'You are out your allowed time period'		: $reply = $l_reply_3; break;
434
		case 'You are out your allowed time period'		: $reply = $l_reply_3; break;
426
		case 'Your expiration date has been reached'	: $reply = $l_reply_4; break;
435
		case 'Your expiration date has been reached'	: $reply = $l_reply_4; break;
427
		case 'You are already logged in - access denied'	: $reply = $l_reply_5; break;
436
		case 'You are already logged in - access denied'	: $reply = $l_reply_5; break;
428
		case 'Your usage time has been reached'	: 			$reply = $l_reply_6; break;
437
		case 'Your usage time has been reached'	: 			$reply = $l_reply_6; break;
429
	}
438
	}
430
}
439
}
431
 
440
 
432
// If attempt to login
441
// If attempt to login
433
if ($button === $l_boutonO) {
442
if ($button === $l_boutonO) {
434
	//correction password length in coova-chilli
443
	//correction password length in coova-chilli
435
	//thanks to http://www.stochasticgeometry.ie/2009/09/09/maximum-password-length-in-coova-chilli/
444
	//thanks to http://www.stochasticgeometry.ie/2009/09/09/maximum-password-length-in-coova-chilli/
436
	$hexchal = pack('H*', $challenge);
445
	$hexchal = pack('H*', $challenge);
437
	$newchal = pack('H*', md5($hexchal . $uamsecret));
446
	$newchal = pack('H*', md5($hexchal . $uamsecret));
438
 
447
 
439
	// If challenge isn't long enough, repeat it until it is
448
	// If challenge isn't long enough, repeat it until it is
440
	while (strlen($newchal) < strlen($password)) {
449
	while (strlen($newchal) < strlen($password)) {
441
		$newchal .= $newchal;
450
		$newchal .= $newchal;
442
	}
451
	}
443
 
452
 
444
	$newpwd   = pack('a*', $password);
453
	$newpwd   = pack('a*', $password);
445
	// Encode plain text password with challenge
454
	// Encode plain text password with challenge
446
	$pappassword = implode('', unpack('H*', ($newpwd ^ $newchal)));
455
	$pappassword = implode('', unpack('H*', ($newpwd ^ $newchal)));
447
 
456
 
448
	header("Location: $uamproto://$uamip:$uamport/logon?username=$username&password=$pappassword&userurl=$userurl");
457
	header("Location: $uamproto://$uamip:$uamport/logon?username=$username&password=$pappassword&userurl=$userurl");
449
	exit();
458
	exit();
450
}
459
}
451
 
460
 
452
switch($res) {
461
switch($res) {
453
	case 'success':	$result = 1; break; // If login successful
462
	case 'success':	$result = 1; break; // If login successful
454
	case 'failed':	$result = 2; break; // If login failed
463
	case 'failed':	$result = 2; break; // If login failed
455
	case 'logoff':	$result = 3; break; // If logout successful
464
	case 'logoff':	$result = 3; break; // If logout successful
456
	case 'already':	$result = 4; break; // If tried to login while already logged in
465
	case 'already':	$result = 4; break; // If tried to login while already logged in
457
	case 'notyet':	$result = 5; break; // If not logged in yet
466
	case 'notyet':	$result = 5; break; // If not logged in yet
458
	default:	$result = 0; // Default: It was not a form request -> client go to login form
467
	default:	$result = 0; // Default: It was not a form request -> client go to login form
459
}
468
}
460
 
469
 
461
//check if we need to warn user about the imputability logs.
470
//check if we need to warn user about the imputability logs.
462
if ($result === 1) {
471
if ($result === 1) {
463
	if ((is_file('./acc/manager/lib/sql/drivers/mysql/functions.php')) && (is_file('/etc/freeradius-web/config.php'))) {
472
	if ((is_file('./acc/manager/lib/sql/drivers/mysql/functions.php')) && (is_file('/etc/freeradius-web/config.php'))) {
464
		include_once('/etc/freeradius-web/config.php');
473
		include_once('/etc/freeradius-web/config.php');
465
		include_once('./acc/manager/lib/sql/drivers/mysql/functions.php');
474
		include_once('./acc/manager/lib/sql/drivers/mysql/functions.php');
466
		$link = @da_sql_pconnect($config); // on affiche pas les erreurs
475
		$link = @da_sql_pconnect($config); // on affiche pas les erreurs
467
		if ($link) {
476
		if ($link) {
468
			$user_uid = da_sql_escape_string($link, $_GET['uid']);
477
			$user_uid = da_sql_escape_string($link, $_GET['uid']);
469
			$sql = "SELECT value FROM radreply WHERE username='$user_uid' AND attribute='Alcasar-Imputability-Warning'";
478
			$sql = "SELECT value FROM radreply WHERE username='$user_uid' AND attribute='Alcasar-Imputability-Warning'";
470
			$res = @da_sql_query($link, $config, $sql); // on affiche pas les erreurs
479
			$res = @da_sql_query($link, $config, $sql); // on affiche pas les erreurs
471
			if ($res) {
480
			if ($res) {
472
				$row = @da_sql_fetch_array($res, $config);
481
				$row = @da_sql_fetch_array($res, $config);
473
				if ($row['value'] === '1') {
482
				if ($row['value'] === '1') {
474
					$sql = "DELETE FROM radreply WHERE username='$user_uid' AND attribute='Alcasar-Imputability-Warning'";
483
					$sql = "DELETE FROM radreply WHERE username='$user_uid' AND attribute='Alcasar-Imputability-Warning'";
475
					@da_sql_query($link, $config, $sql);
484
					@da_sql_query($link, $config, $sql);
476
					header('Location: '.(($conf['HTTPS_LOGIN'] === 'on') ? 'https' : 'http').'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'].'/index.php?warn=1&url='.urlencode($_GET['userurl']));   //we present to user information about imputability logs 
485
					header('Location: '.(($conf['HTTPS_LOGIN'] === 'on') ? 'https' : 'http').'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'].'/index.php?warn=1&url='.urlencode($_GET['userurl']));   //we present to user information about imputability logs 
477
					exit();
486
					exit();
478
				}
487
				}
479
			}
488
			}
480
		}
489
		}
481
	}
490
	}
482
}
491
}
483
 
492
 
484
// By default, redirect to prelogin in order to generate a challenge
493
// By default, redirect to prelogin in order to generate a challenge
485
if ($result === 0) {
494
if ($result === 0) {
486
	header("Location: $uamproto://$uamip:$uamport/prelogin");
495
	header("Location: $uamproto://$uamip:$uamport/prelogin");
487
	exit();
496
	exit();
488
}
497
}
489
 
498
 
490
//////////////////////////////////////////////
499
//////////////////////////////////////////////
491
///////////// TEST VARIABLES /////////////////
500
///////////// TEST VARIABLES /////////////////
492
//////////////////////////////////////////////////////////////////
501
//////////////////////////////////////////////////////////////////
493
//$result = 5;     // = 1/2/3/4/5 
502
//$result = 5;     // = 1/2/3/4/5 
494
// reply is a displayed sentence
503
// reply is a displayed sentence
495
//$reply = 'dsfsdfsdfdsf';    //  = ''/'Incorrect user/password'
504
//$reply = 'dsfsdfsdfdsf';    //  = ''/'Incorrect user/password'
496
//$service_SMS_status = true;    // = true/false
505
//$service_SMS_status = true;    // = true/false
497
// test of domain Allowed
506
// test of domain Allowed
498
//////////////////////////////////////////////////////////////////
507
//////////////////////////////////////////////////////////////////
499
 
508
 
500
// Cleaning the cache
509
// Cleaning the cache
501
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
510
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
502
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
511
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
503
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
512
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
504
header('Cache-Control: post-check=0, pre-check=0', false);
513
header('Cache-Control: post-check=0, pre-check=0', false);
505
header('Pragma: no-cache');
514
header('Pragma: no-cache');
506
?>
515
?>
507
<!DOCTYPE html>
516
<!DOCTYPE html>
508
<html>
517
<html>
509
<head>
518
<head>
510
	<meta charset="utf-8">
519
	<meta charset="utf-8">
511
	<title><?= $l_loggingin ?></title>
520
	<title><?= $l_loggingin ?></title>
512
	<link rel="stylesheet" href="/css/bootstrap.min.css" type="text/css">
521
	<link rel="stylesheet" href="/css/bootstrap.min.css" type="text/css">
513
	<link rel="stylesheet" href="/css/intercept.css" type="text/css">
522
	<link rel="stylesheet" href="/css/intercept.css" type="text/css">
514
	<link rel="icon" href="/images/favicon-48.ico" type="image/ico">
523
	<link rel="icon" href="/images/favicon-48.ico" type="image/ico">
515
<? if ($service_wifi4eu_status): ?>
524
<? if ($service_wifi4eu_status): ?>
516
	<script type="text/javascript">
525
	<script type="text/javascript">
517
		var wifi4euTimerStart = Date.now();
526
		var wifi4euTimerStart = Date.now();
518
		var wifi4euNetworkIdentifier = '<?= $service_wifi4eu_code ?>';
527
		var wifi4euNetworkIdentifier = '<?= $service_wifi4eu_code ?>';
519
		var wifi4euLanguage = '<?= $Language ?>';
528
		var wifi4euLanguage = '<?= $Language ?>';
520
		//var selftestModus = true;
529
		//var selftestModus = true;
521
	</script>
530
	</script>
522
	<script type="text/javascript" src="<?= $service_wifi4eu_server ?>"></script>
531
	<script type="text/javascript" src="<?= $service_wifi4eu_server ?>"></script>
523
<? endif; ?>
532
<? endif; ?>
524
	<script type="text/javascript">
533
	<script type="text/javascript">
525
	function doOnLoad(result, userurl, redirurl, adminurl, timeleft) {
534
	function doOnLoad(result, userurl, redirurl, adminurl, timeleft) {
526
		if ((result === 1) || (result === 4)) {	// success or already
535
		if ((result === 1) || (result === 4)) {	// success or already
527
			var url;
536
			var url;
528
			if (adminurl !== '') {
537
			if (adminurl !== '') {
529
				url = adminurl;
538
				url = adminurl;
530
			} else if (redirurl !== '') {
539
			} else if (redirurl !== '') {
531
				url = redirurl;
540
				url = redirurl;
532
			} else if (userurl !== '') {
541
			} else if (userurl !== '') {
533
				url = userurl;
542
				url = userurl;
534
			}
543
			}
535
 
544
 
536
			if (typeof url !== 'undefined') {
545
			if (typeof url !== 'undefined') {
537
				var win = window.open('<?= $statuspath ?>', '_blank');
546
				var win = window.open('<?= $statuspath ?>', '_blank');
538
 
547
 
539
				if ((win === null) || (typeof win === 'undefined')) { // Pop-up blocked
548
				if ((win === null) || (typeof win === 'undefined')) { // Pop-up blocked
540
					window.location = '<?= $statuspath ?>';
549
					window.location = '<?= $statuspath ?>';
541
				} else {
550
				} else {
542
					window.location = url;
551
					window.location = url;
543
				}
552
				}
544
			} else {
553
			} else {
545
				window.location = '<?= $statuspath ?>';
554
				window.location = '<?= $statuspath ?>';
546
			}
555
			}
547
		}
556
		}
548
		if ((result === 2) || (result === 3) || result === 5) { // failed or logoff or notyet
557
		if ((result === 2) || (result === 3) || result === 5) { // failed or logoff or notyet
549
			document.form1.username.focus();
558
			document.form1.username.focus();
550
		}
559
		}
551
	}
560
	}
552
	</script>
561
	</script>
553
</head>
562
</head>
554
<body onLoad="javascript:doOnLoad(<?= $result ?>,'<?= $userurl ?>','<?= $redirurl ?>','<?= $adminurl ?>','<?= $timeleft ?>')">
563
<body onLoad="javascript:doOnLoad(<?= $result ?>,'<?= $userurl ?>','<?= $redirurl ?>','<?= $adminurl ?>','<?= $timeleft ?>')">
555
	<div class="col-xs-12">	
564
	<div class="col-xs-12">	
556
	<?php if ($result === 2 || $result === 3 || $result === 5): // failed or logoff or notyet ?>
565
	<?php if ($result === 2 || $result === 3 || $result === 5): // failed or logoff or notyet ?>
557
		<div class ="row">
566
		<div class ="row">
558
			<div class="col-xs-12 col-sm-10 col-sm-offset-1">
567
			<div class="col-xs-12 col-sm-10 col-sm-offset-1">
559
				<div class="row banner">
568
				<div class="row banner">
560
					<div class="col-xs-8 col-xs-offset-2 col-sm-12 col-sm-offset-0">
569
					<div class="col-xs-8 col-xs-offset-2 col-sm-12 col-sm-offset-0">
561
				<?php if ($service_wifi4eu_status): ?>
570
				<?php if ($service_wifi4eu_status): ?>
562
					<img id="wifi4eubanner">
571
					<img id="wifi4eubanner">
563
				<?php else: ?>
572
				<?php else: ?>
564
					<h1 class="organisme"><?= $organisme ?></h1>
573
					<h1 class="organisme"><?= $organisme ?></h1>
565
				<?php endif; ?>
574
				<?php endif; ?>
566
					</div>
575
					</div>
567
				</div>
576
				</div>
568
				<div class="row">
577
				<div class="row">
569
					<form name="form1" class="form-horizontal col-xs-12 col-sm-12 col-md-10 col-md-offset-1 background-form" method="post" action="<?= $loginpath ?>">
578
					<form name="form1" class="form-horizontal col-xs-12 col-sm-12 col-md-10 col-md-offset-1 background-form" method="post" action="<?= $loginpath ?>">
570
						<div class="row">
579
						<div class="row">
571
							<div class="col-xs-12 col-sm-12 col-md-6 col-md-offset-3">
580
							<div class="col-xs-12 col-sm-12 col-md-6 col-md-offset-3">
572
								<h2 class="titre-controle-acces"><?= $l_loggedcont ?></h2>
581
								<h2 class="titre-controle-acces"><?= $l_loggedcont ?></h2>
573
							</div>
582
							</div>
574
							<div class="hidden-xs hidden-sm col-md-3">
583
							<div class="hidden-xs hidden-sm col-md-3">
575
							<?php
584
							<?php
576
							// Read the "Domain allowed" file
585
							// Read the "Domain allowed" file
577
							$tab = file(DOMAIN_ALLOWED_LIST);
586
							$tab = file(DOMAIN_ALLOWED_LIST);
578
							if ($tab) { // the file isn't empty
587
							if ($tab) { // the file isn't empty
579
								echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
588
								echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
580
								echo '<ul>';
589
								echo '<ul>';
581
								foreach ($tab as $line) {
590
								foreach ($tab as $line) {
582
									if (!empty(trim($line))) { // the line isn't empty
591
									if (!empty(trim($line))) { // the line isn't empty
583
										if (strpos ($line, '#')) { // the domain should be displayed
592
										if (strpos ($line, '#')) { // the domain should be displayed
584
											$domain_allowed = explode('#', $line);
593
											$domain_allowed = explode('#', $line);
585
											$domain = explode('"', $domain_allowed[0]);
594
											$domain = explode('"', $domain_allowed[0]);
586
											$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
595
											$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
587
											echo '<li><a href="http://'.trim($domain[1]).'">'.trim($domain_allowed[1]).'</a></li>';
596
											echo '<li><a href="http://'.trim($domain[1]).'">'.trim($domain_allowed[1]).'</a></li>';
588
										}
597
										}
589
									}
598
									}
590
								}
599
								}
591
								echo '</ul>';
600
								echo '</ul>';
592
							}
601
							}
593
							?>
602
							?>
594
 
603
 
595
							</div>
604
							</div>
596
						</div>
605
						</div>
597
						<div>
606
						<div>
598
						<?php if ($result === 2): // failed ?>
607
						<?php if ($result === 2): // failed ?>
599
							<h3 class="titre-erreur"><?= $l_loginfailed ?>
608
							<h3 class="titre-erreur"><?= $l_loginfailed ?>
600
							<?php if ($reply): // traitement du reply ... ?>
609
							<?php if ($reply): // traitement du reply ... ?>
601
								: <?= $reply ?>
610
								: <?= $reply ?>
602
							<?php endif; ?>
611
							<?php endif; ?>
603
							</h3>
612
							</h3>
604
						<?php endif;
613
						<?php endif;
605
						if ($userurl === 'http://logout/') $userurl = 'http://www.google.com'; // Avoid cyclic logout
614
						if ($userurl === 'http://logout/') $userurl = 'http://www.google.com'; // Avoid cyclic logout
606
						?>
615
						?>
607
 
616
 
608
						</div>
617
						</div>
609
 
618
 
610
						<div class="row inputs">
619
						<div class="row inputs">
611
							<div class="hidden-xs col-sm-2">
620
							<div class="hidden-xs col-sm-2">
612
								 <img id="logo-organ" class="img-responsive" src="/images/organisme.png">
621
								 <img id="logo-organ" class="img-responsive" src="/images/organisme.png">
613
							</div>
622
							</div>
614
							<div class="col-xs-12 col-sm-8">
623
							<div class="col-xs-12 col-sm-8">
615
								<input type="hidden" name="challenge" value="<?= $challenge ?>">
624
								<input type="hidden" name="challenge" value="<?= $challenge ?>">
616
								<input type="hidden" name="userurl" value="<?= $userurl ?>">
625
								<input type="hidden" name="userurl" value="<?= $userurl ?>">
617
								<div class="form-group row">
626
								<div class="form-group row">
618
									<div class="col-xs-2 col-sm-2 control-label">
627
									<div class="col-xs-2 col-sm-2 control-label">
619
										<p class="boite-info-text"><?= $l_user ?></p>
628
										<p class="boite-info-text"><?= $l_user ?></p>
620
									</div>
629
									</div>
621
									<div class="col-xs-8 col-sm-8" id="input_username">
630
									<div class="col-xs-8 col-sm-8" id="input_username">
622
										<input type="text" class="form-control boite-info-text" name="username" autocomplete="off" placeholder="<?= $l_user ?>">
631
										<input type="text" class="form-control boite-info-text" name="username" autocomplete="off" placeholder="<?= $l_user ?>">
623
									</div>
632
									</div>
624
								</div>
633
								</div>
625
								<div class="form-group row">
634
								<div class="form-group row">
626
									<div class="col-xs-2 col-sm-2 control-label">
635
									<div class="col-xs-2 col-sm-2 control-label">
627
										<p class="boite-info-text"><?= $l_password ?></p>
636
										<p class="boite-info-text"><?= $l_password ?></p>
628
									</div>
637
									</div>
629
									<div class="col-xs-8 col-sm-8" id="input_password">
638
									<div class="col-xs-8 col-sm-8" id="input_password">
630
										<input type="password" class="form-control boite-info-text" name="password" autocomplete="off" placeholder="<?= $l_password ?>">
639
										<input type="password" class="form-control boite-info-text" name="password" autocomplete="off" placeholder="<?= $l_password ?>">
631
									</div>
640
									</div>
632
								</div>
641
								</div>
633
							</div>
642
							</div>
634
							<div class="hidden-xs col-sm-2">
643
							<div class="hidden-xs col-sm-2">
635
							
644
							
636
							</div>
645
							</div>
637
						</div>
646
						</div>
638
						<div class="row row_button">
647
						<div class="row row_button">
639
							<div class="col-xs-12 text-center">
648
							<div class="col-xs-12 text-center">
640
								<input value="<?= $l_boutonO ?>" class="btn btn-primary button" type="submit" name="button">
649
								<input value="<?= $l_boutonO ?>" class="btn btn-primary button" type="submit" name="button">
641
							</div>	
650
							</div>	
642
						</div>
651
						</div>
643
						<?php if ($service_SMS_status): ?>
652
						<?php if ($service_SMS_status): ?>
644
							<div class= "row sms_registration">
653
							<div class= "row sms_registration">
645
								<a href="sms_registration.php"><?= $l_sms_registration ?></a>
654
								<a href="sms_registration.php"><?= $l_sms_registration ?></a>
646
							</div>
655
							</div>
647
						<?php endif; ?>
656
						<?php endif; ?>
648
					</form>
657
					</form>
649
				</div>
658
				</div>
650
			</div>
659
			</div>
651
		</div>
660
		</div>
652
			<div class="row boite-info-spacing">
661
			<div class="row boite-info-spacing">
653
				<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 boite-info-spacing">
662
				<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 boite-info-spacing">
654
					<table id="boite-info" cellSpacing="0" cellPadding="0">
663
					<table id="boite-info" cellSpacing="0" cellPadding="0">
655
						<tr class="boite-info-titre">
664
						<tr class="boite-info-titre">
656
							<td align="center"><font color="red"><b><?= $l_loggedin_stringl1 ?></b></font></td>
665
							<td align="center"><font color="red"><b><?= $l_loggedin_stringl1 ?></b></font></td>
657
						</tr>
666
						</tr>
658
						<tr class="boite-info-text">
667
						<tr class="boite-info-text">
659
							<td align="left">
668
							<td align="left">
660
								<ul>
669
								<ul>
661
									<li><?= $l_loggedin_stringl2 ?></li>
670
									<li><?= $l_loggedin_stringl2 ?></li>
662
									<li><?= $l_loggedin_stringl4 ?></li>
671
									<li><?= $l_loggedin_stringl4 ?></li>
663
									<li><?= $l_loggedin_stringl3 ?></li>
672
									<li><?= $l_loggedin_stringl3 ?></li>
664
									<li><?= $l_loggedin_stringl5 ?></li>
673
									<li><?= $l_loggedin_stringl5 ?></li>
665
									<li><?= $l_loggedin_stringl6 ?></li>
674
									<li><?= $l_loggedin_stringl6 ?></li>
666
								</ul>
675
								</ul>
667
							</td>
676
							</td>
668
						</tr>
677
						</tr>
669
					</table>
678
					</table>
670
				</div>
679
				</div>
671
				<div class="hidden-xs hidden-sm col-md-2">
680
				<div class="hidden-xs hidden-sm col-md-2">
672
					<img id="logo-alcasar" class="img-responsive" src="/images/logo-alcasar.png">
681
					<img id="logo-alcasar" class="img-responsive" src="/images/logo-alcasar.png">
673
				</div>
682
				</div>
674
			</div>
683
			</div>
675
			<div class="row">
684
			<div class="row">
676
				<div class="col-xs-6 col-sm-12 hidden-md hidden-lg">
685
				<div class="col-xs-6 col-sm-12 hidden-md hidden-lg">
677
						<img id="logo-alcasar" class="img-responsive img-xs-bottom" src="/images/logo-alcasar.png">
686
						<img id="logo-alcasar" class="img-responsive img-xs-bottom" src="/images/logo-alcasar.png">
678
					</div>
687
					</div>
679
 
688
 
680
				<div class="col-xs-6 hidden-sm hidden-md hidden-lg">
689
				<div class="col-xs-6 hidden-sm hidden-md hidden-lg">
681
					<img id="logo-organ" class="img-responsive img-xs-bottom" src="/images/organisme.png">
690
					<img id="logo-organ" class="img-responsive img-xs-bottom" src="/images/organisme.png">
682
 
691
 
683
				</div>
692
				</div>
684
			</div>
693
			</div>
685
		<div class="row" style="text-align: center">
694
		<div class="row" style="text-align: center">
686
			<div class="col-xs-8 col-xs-offset-2 col-sm-6 col-sm-offset-3 hidden-md hidden-lg">
695
			<div class="col-xs-8 col-xs-offset-2 col-sm-6 col-sm-offset-3 hidden-md hidden-lg">
687
			<?php
696
			<?php
688
			// Read the "Domain allowed" file
697
			// Read the "Domain allowed" file
689
			$tab = file(DOMAIN_ALLOWED_LIST);
698
			$tab = file(DOMAIN_ALLOWED_LIST);
690
			if ($tab) { // the file isn't empty
699
			if ($tab) { // the file isn't empty
691
				echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
700
				echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
692
				echo '<ul>';
701
				echo '<ul>';
693
				foreach ($tab as $line) {
702
				foreach ($tab as $line) {
694
					if (!empty(trim($line))) { // the line isn't empty
703
					if (!empty(trim($line))) { // the line isn't empty
695
						if (strpos ($line, '#')) { // the domain should be displayed
704
						if (strpos ($line, '#')) { // the domain should be displayed
696
							$domain_allowed = explode('#', $line);
705
							$domain_allowed = explode('#', $line);
697
							$domain = explode('"', $domain_allowed[0]);
706
							$domain = explode('"', $domain_allowed[0]);
698
							$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
707
							$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
699
							echo '<li><a href="http://'.trim($domain[1]).'">'.trim($domain_allowed[1]).'</a></li>';
708
							echo '<li><a href="http://'.trim($domain[1]).'">'.trim($domain_allowed[1]).'</a></li>';
700
						}
709
						}
701
					}
710
					}
702
				}
711
				}
703
				echo '</ul>';
712
				echo '</ul>';
704
			}
713
			}
705
			?>
714
			?>
706
			</div>
715
			</div>
707
		</div>
716
		</div>
708
	</div>
717
	</div>
709
	<?php endif; ?>
718
	<?php endif; ?>
710
</body>
719
</body>
711
</html>
720
</html>
712
 
721