Subversion Repositories ALCASAR

Rev

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

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