Subversion Repositories ALCASAR

Rev

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

Rev 3174 Rev 3185
1
<?php
1
<?php
2
# $Id: intercept.php 3174 2024-02-28 17:10:02Z rexy $
2
# $Id: intercept.php 3185 2024-03-08 23:56:49Z rexy $
3
#
3
#
4
# intercept.php for ALCASAR captive portal
4
# intercept.php for ALCASAR captive portal
5
# by Rexy & steweb57
5
# by Rexy & steweb57
6
# UI & css style by Stéphane ERARD & Alexandre VEZIN
6
# UI & css style by Stéphane ERARD & Alexandre VEZIN
7
# Help for language translation by B. AUBARD (thanks)
7
# Help for language translation by B. AUBARD (thanks)
8
 
8
 
9
# Redirects from CoovaChilli (chilli daemon) :
9
# Redirects from CoovaChilli (chilli daemon) :
10
# Response to login:
10
# Response to login:
11
  # success :	if login successful
11
  # success :	if login successful
12
  # failed :	if login failed
12
  # failed :	if login failed
13
  # logoff :	if logout successful
13
  # logoff :	if logout successful
14
  # already :	if tried to login while already logged in
14
  # already :	if tried to login while already logged in
15
  # notyet :	if not logged in yet
15
  # notyet :	if not logged in yet
16
  # 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
17
 
17
 
18
/****************************************************************
18
/****************************************************************
19
*			GLOBAL FILE PATHS			*
19
*			GLOBAL FILE PATHS			*
20
*****************************************************************/
20
*****************************************************************/
21
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
21
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
22
define('DOMAIN_ALLOWED_LIST', '/usr/local/etc/alcasar-uamdomain');
22
define('DOMAIN_ALLOWED_LIST', '/usr/local/etc/alcasar-uamdomain');
23
 
23
 
24
/****************************************************************
24
/****************************************************************
25
*			FILE reading test			*
25
*			FILE reading test			*
26
*****************************************************************/
26
*****************************************************************/
27
$conf_files = array(CONF_FILE, DOMAIN_ALLOWED_LIST);
27
$conf_files = array(CONF_FILE, DOMAIN_ALLOWED_LIST);
28
foreach ($conf_files as $file) {
28
foreach ($conf_files as $file) {
29
	if (!file_exists($file)) {
29
	if (!file_exists($file)) {
30
		exit("Fichier $file non présent");
30
		exit("Fichier $file non présent");
31
	}
31
	}
32
	if (!is_readable($file)) {
32
	if (!is_readable($file)) {
33
		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");
34
	}
34
	}
35
}
35
}
36
/****************************************************************
36
/****************************************************************
37
*			Read CONF_FILE				*
37
*			Read CONF_FILE				*
38
*****************************************************************/
38
*****************************************************************/
39
$file_conf = fopen(CONF_FILE, 'r');
39
$file_conf = fopen(CONF_FILE, 'r');
40
if (!$file_conf) {
40
if (!$file_conf) {
41
	exit('Error opening the file '.CONF_FILE);
41
	exit('Error opening the file '.CONF_FILE);
42
}
42
}
43
while (!feof($file_conf)) {
43
while (!feof($file_conf)) {
44
	$buffer = fgets($file_conf, 4096);
44
	$buffer = fgets($file_conf, 4096);
45
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
45
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
46
		$tmp = explode('=', $buffer, 2);
46
		$tmp = explode('=', $buffer, 2);
47
		$conf[trim($tmp[0])] = trim($tmp[1]);
47
		$conf[trim($tmp[0])] = trim($tmp[1]);
48
	}
48
	}
49
}
49
}
50
fclose($file_conf);
50
fclose($file_conf);
51
 
51
 
52
$organisme = $conf["ORGANISM"];
52
$organisme = $conf["ORGANISM"];
53
$service_SMS_status = ($conf['SMS'] === 'on');
53
$service_SMS_status = ($conf['SMS'] === 'on');
54
$service_Email_status = ($conf['MAIL'] === 'on');
54
$service_Email_status = ($conf['MAIL'] === 'on');
55
$service_wifi4eu_status = ($conf['WIFI4EU'] === 'on');
55
$service_wifi4eu_status = ($conf['WIFI4EU'] === 'on');
56
$service_wifi4eu_code = $conf['WIFI4EU_CODE'];
56
$service_wifi4eu_code = $conf['WIFI4EU_CODE'];
57
$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';
58
 
58
 
59
// Shared secret used to encrypt password with coova.
59
// Shared secret used to encrypt password with coova.
60
$uamsecret = "";
60
$uamsecret = "";
61
 
61
 
62
// URL loaded after success authenticates (let blank for browser defaults)
62
// URL loaded after success authenticates (let blank for browser defaults)
63
$adminurl = "";
63
$adminurl = "";
64
 
64
 
65
// Our own path
65
// Our own path
66
$loginpath = htmlspecialchars($_SERVER['PHP_SELF']);
66
$loginpath = htmlspecialchars($_SERVER['PHP_SELF']);
67
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
67
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
68
$alcasarpath = (($useHTTPS) ? 'https' : 'http' ).'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'];
68
$alcasarpath = (($useHTTPS) ? 'https' : 'http' ).'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'];
69
$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';
70
 
70
 
71
# Redirection if HTTPS needed and not used
71
# Redirection if HTTPS needed and not used
72
if (($conf['HTTPS_LOGIN'] === 'on') && (!$useHTTPS)) {
72
if (($conf['HTTPS_LOGIN'] === 'on') && (!$useHTTPS)) {
73
	header('HTTP/1.1 301 Moved Permanently');
73
	header('HTTP/1.1 301 Moved Permanently');
74
	header('Location: https://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'].'/intercept.php');
74
	header('Location: https://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'].'/intercept.php');
75
	exit();
75
	exit();
76
}
76
}
77
 
77
 
78
// Choice of language
78
// Choice of language
79
$Language = 'en';
79
$Language = 'en';
80
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
80
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
81
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
81
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
82
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
82
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
83
}
83
}
84
if ($Language === 'es') {		// Spanish
84
if ($Language === 'es') {		// Spanish
85
	$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.";
86
	$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.";
87
	$l_logout			= "Finalice la conexión";
87
	$l_logout			= "Finalice la conexión";
88
	$l_loginfailed			= "Error de autenticación";
88
	$l_loginfailed			= "Error de autenticación";
89
	$l_loggingin			= "Identificación en el portal cautivo";
89
	$l_loggingin			= "Identificación en el portal cautivo";
90
	$l_loggedcont			= "Control de Acceso";
90
	$l_loggedcont			= "Control de Acceso";
91
	$l_loggedout			= "Su sesión se cierra";
91
	$l_loggedout			= "Su sesión se cierra";
92
	$l_user				= "Usuario";
92
	$l_user				= "Usuario";
93
	$l_password			= "Contraseña";
93
	$l_password			= "Contraseña";
94
	$l_mandatory			= "* Campos requeridos";
94
	$l_mandatory			= "* Campos requeridos";
95
	$l_wait				= "Por favor, espere un momento ...";
95
	$l_wait				= "Por favor, espere un momento ...";
96
	$l_onlinetime			= "Tiempo de conexión:";
96
	$l_onlinetime			= "Tiempo de conexión:";
97
	$l_remainingtime		= "Desconexión en:";
97
	$l_remainingtime		= "Desconexión en:";
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_boutonO			= "Autenticação";
133
	$l_boutonO			= "Autenticação";
134
	$l_boutonF			= "Fechar";
134
	$l_boutonF			= "Fechar";
135
	$l_loggedin_stringl1		= "Sistema de Informação e segurança";
135
	$l_loggedin_stringl1		= "Sistema de Informação e segurança";
136
	$l_loggedin_stringl2		= "Este controle foi criado para garantir acesso seguro.";
136
	$l_loggedin_stringl2		= "Este controle foi criado para garantir acesso seguro.";
137
	$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.";
138
	$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.";
139
	$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.";
140
	$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.";
141
	$l_loggedout_string		= "desconexão do portal cativo";
141
	$l_loggedout_string		= "desconexão do portal cativo";
142
	$l_reply_0			= "Nome de usuário ou senha incorretos";
142
	$l_reply_0			= "Nome de usuário ou senha incorretos";
143
	$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)";
144
	$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)";
145
	$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";
146
	$l_reply_4			= "Sua conta expirou";
146
	$l_reply_4			= "Sua conta expirou";
147
	$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";
148
	$l_reply_6			= "Seu tempo de conexão autorizada finalizou";
148
	$l_reply_6			= "Seu tempo de conexão autorizada finalizou";
149
	$l_online_time			= "Tempo Online";
149
	$l_online_time			= "Tempo Online";
150
	$l_remaining_time		= "Tempo restante";
150
	$l_remaining_time		= "Tempo restante";
151
	$l_uam_domain			= "Sítios de acesso livre : ";
151
	$l_uam_domain			= "Sítios de acesso livre : ";
152
	$l_sms_registration		= "Registo por SMS";
152
	$l_sms_registration		= "Registo por SMS";
153
	$l_email_registration		= "Registro por E-mail";
153
	$l_email_registration		= "Registro por E-mail";
154
} else if ($Language === 'zh') {	// Chinese
154
} else if ($Language === 'zh') {	// Chinese
155
	$l_ChilliError			= "验证必须通过强制门户服务";
155
	$l_ChilliError			= "验证必须通过强制门户服务";
156
	$l_login			= "验证成功<HR>关闭此窗口中断连接";
156
	$l_login			= "验证成功<HR>关闭此窗口中断连接";
157
	$l_logout			= "关闭连接";
157
	$l_logout			= "关闭连接";
158
	$l_loginfailed			= "验证失败";
158
	$l_loginfailed			= "验证失败";
159
	$l_loggingin			= "强制门户身份识别";
159
	$l_loggingin			= "强制门户身份识别";
160
	$l_loggedcont			= "访问控制";
160
	$l_loggedcont			= "访问控制";
161
	$l_loggedout			= "您的连接已关闭";
161
	$l_loggedout			= "您的连接已关闭";
162
	$l_user				= "用户名";
162
	$l_user				= "用户名";
163
	$l_password			= "密码";
163
	$l_password			= "密码";
164
	$l_mandatory			= "* 必须填写";
164
	$l_mandatory			= "* 必须填写";
165
	$l_wait				= "请等待 ...";
165
	$l_wait				= "请等待 ...";
166
	$l_onlinetime			= "连接时间";
166
	$l_onlinetime			= "连接时间";
167
	$l_remainingtime		= "断开连接于";
167
	$l_remainingtime		= "断开连接于";
168
	$l_boutonO			= "验证";
168
	$l_boutonO			= "验证";
169
	$l_boutonF			= "关闭";
169
	$l_boutonF			= "关闭";
170
	$l_loggedin_stringl1		= "信息系统安全";
170
	$l_loggedin_stringl1		= "信息系统安全";
171
	$l_loggedin_stringl2		= "这种控制实施以法定保证可追溯性,可归罪性和连接的不否认性.";
171
	$l_loggedin_stringl2		= "这种控制实施以法定保证可追溯性,可归罪性和连接的不否认性.";
172
	$l_loggedin_stringl3		= "您的网络活动是私密登记的.";
172
	$l_loggedin_stringl3		= "您的网络活动是私密登记的.";
173
	$l_loggedin_stringl4		= "记录的数据能被司法机关在调查中操作使用.";
173
	$l_loggedin_stringl4		= "记录的数据能被司法机关在调查中操作使用.";
174
	$l_loggedin_stringl5		= "这些数据将在一年后自动删除.";
174
	$l_loggedin_stringl5		= "这些数据将在一年后自动删除.";
175
	$l_loggedin_stringl6		= "点击 <a href=\"$alcasarpath\"> 这里 </a> 修改密码或安装浏览器安全证书";
175
	$l_loggedin_stringl6		= "点击 <a href=\"$alcasarpath\"> 这里 </a> 修改密码或安装浏览器安全证书";
176
	$l_loggedout_string		= "强制网络门户连接已断开";
176
	$l_loggedout_string		= "强制网络门户连接已断开";
177
	$l_reply_0			= "用户名或密码无效";
177
	$l_reply_0			= "用户名或密码无效";
178
	$l_reply_1			= "您的每日配额已达到(持续时间或数量) ";
178
	$l_reply_1			= "您的每日配额已达到(持续时间或数量) ";
179
	$l_reply_2			= "已达到每月配额(持续时间或数量)";
179
	$l_reply_2			= "已达到每月配额(持续时间或数量)";
180
	$l_reply_3			= "您尝试在授权时间以外连接";
180
	$l_reply_3			= "您尝试在授权时间以外连接";
181
	$l_reply_4			= "您的账号已过期";
181
	$l_reply_4			= "您的账号已过期";
182
	$l_reply_5			= "您已经达到同时连接的最大数量";
182
	$l_reply_5			= "您已经达到同时连接的最大数量";
183
	$l_reply_6			= "已经到达您的允许连接时间";
183
	$l_reply_6			= "已经到达您的允许连接时间";
184
	$l_online_time			= "在线时间";
184
	$l_online_time			= "在线时间";
185
	$l_remaining_time		= "剩余时间";
185
	$l_remaining_time		= "剩余时间";
186
	$l_uam_domain			= " : ";
186
	$l_uam_domain			= " : ";
187
	$l_sms_registration		= "SMSで登録する";
187
	$l_sms_registration		= "SMSで登録する";
188
	$l_email_registration		= "メールでの登録";
188
	$l_email_registration		= "メールでの登録";
189
} else if ($Language === 'ar') {	// Arabic
189
} else if ($Language === 'ar') {	// Arabic
190
	$l_ChilliError			= "يجب نجاح المصادقة على البوابة الأسيرة";
190
	$l_ChilliError			= "يجب نجاح المصادقة على البوابة الأسيرة";
191
	$l_login			= "إغلاق هذه النافذة يقطع دورة عملك";
191
	$l_login			= "إغلاق هذه النافذة يقطع دورة عملك";
192
	$l_logout			= "إغلاق الدورة";
192
	$l_logout			= "إغلاق الدورة";
193
	$l_loginfailed			= "فشل المصادقة";
193
	$l_loginfailed			= "فشل المصادقة";
194
	$l_loggingin			= "التعريف على البوابة الأسيرة";
194
	$l_loggingin			= "التعريف على البوابة الأسيرة";
195
	$l_loggedcont			= "مراقبة الدخول";
195
	$l_loggedcont			= "مراقبة الدخول";
196
	$l_loggedout			= "دورتكَ مغلقة";
196
	$l_loggedout			= "دورتكَ مغلقة";
197
	$l_user				= "التعريف";
197
	$l_user				= "التعريف";
198
	$l_password			= "كلمة السر";
198
	$l_password			= "كلمة السر";
199
	$l_mandatory			="* الحقول المطلوبة";
199
	$l_mandatory			="* الحقول المطلوبة";
200
	$l_wait				= "...إنتظر بعض اللحظات";
200
	$l_wait				= "...إنتظر بعض اللحظات";
201
	$l_onlinetime			= ":مدة الإتصال";
201
	$l_onlinetime			= ":مدة الإتصال";
202
	$l_remainingtime		= ":انقطاع الإتصال في";
202
	$l_remainingtime		= ":انقطاع الإتصال في";
203
	$l_boutonO			= "مصادقة";
203
	$l_boutonO			= "مصادقة";
204
	$l_boutonF			= "أغلق";
204
	$l_boutonF			= "أغلق";
205
	$l_loggedin_stringl1		= "سلامة نظم المعلومات";
205
	$l_loggedin_stringl1		= "سلامة نظم المعلومات";
206
	$l_loggedin_stringl2		= "وُضعت هذه المراقبة للضمان القانوني لتتبع ومساءلة وعدم تنصل الإتصالات";
206
	$l_loggedin_stringl2		= "وُضعت هذه المراقبة للضمان القانوني لتتبع ومساءلة وعدم تنصل الإتصالات";
207
	$l_loggedin_stringl3		= "نشاطك على الشبكة مسجل وفقاً لاحترام الحريات الشخصية";
207
	$l_loggedin_stringl3		= "نشاطك على الشبكة مسجل وفقاً لاحترام الحريات الشخصية";
208
	$l_loggedin_stringl4		= "لا يمكن استغلال البيانات المسجلة إلاّ من قِبل سلطات التحقيق القضائ";
208
	$l_loggedin_stringl4		= "لا يمكن استغلال البيانات المسجلة إلاّ من قِبل سلطات التحقيق القضائ";
209
	$l_loggedin_stringl5		= "سيتم حدف هذه البيانات تلقائياً بعد سنة من الْيَوْمَ";
209
	$l_loggedin_stringl5		= "سيتم حدف هذه البيانات تلقائياً بعد سنة من الْيَوْمَ";
210
	$l_loggedin_stringl6		= "لتغيير كلمة السر أو شهادة الأمان <a href=\"$alcasarpath\">هنا</a> اضغط ";
210
	$l_loggedin_stringl6		= "لتغيير كلمة السر أو شهادة الأمان <a href=\"$alcasarpath\">هنا</a> اضغط ";
211
	$l_loggedout_string		= "تَمّ قطع الإتصال بالبوابة الأسيرة";
211
	$l_loggedout_string		= "تَمّ قطع الإتصال بالبوابة الأسيرة";
212
	$l_reply_0			= "اسم المستخدم أو كلمة المرور غير صالحة";
212
	$l_reply_0			= "اسم المستخدم أو كلمة المرور غير صالحة";
213
	$l_reply_1			= "تم الوصول إلى حصتك اليومية (المدة أو الحجم)";
213
	$l_reply_1			= "تم الوصول إلى حصتك اليومية (المدة أو الحجم)";
214
	$l_reply_2			= "تم الوصول إلى حصتك الشهرية (المدة أو الحجم)";
214
	$l_reply_2			= "تم الوصول إلى حصتك الشهرية (المدة أو الحجم)";
215
	$l_reply_3			= "محاولة اتصال خارج فترتك المأذونة";
215
	$l_reply_3			= "محاولة اتصال خارج فترتك المأذونة";
216
	$l_reply_4			= "انتهت مدة صلاحية حسابك";
216
	$l_reply_4			= "انتهت مدة صلاحية حسابك";
217
	$l_reply_5			= "لقد استكملت العدد الأقصى للإتصالات المتزامنة";
217
	$l_reply_5			= "لقد استكملت العدد الأقصى للإتصالات المتزامنة";
218
	$l_reply_6			= "استكملت مذة الإتصال المسموحة";
218
	$l_reply_6			= "استكملت مذة الإتصال المسموحة";
219
	$l_online_time			= "مذة الإتصال";
219
	$l_online_time			= "مذة الإتصال";
220
	$l_remaining_time		= "الوقت المتبق";
220
	$l_remaining_time		= "الوقت المتبق";
221
	$l_uam_domain			= "مواقع الوصول المجاني";
221
	$l_uam_domain			= "مواقع الوصول المجاني";
222
	$l_sms_registration		= "التسجيل عن طريق الرسائل القصيرة";
222
	$l_sms_registration		= "التسجيل عن طريق الرسائل القصيرة";
223
	$l_email_registration		= "التسجيل عن طريق البريد الإلكتروني";
223
	$l_email_registration		= "التسجيل عن طريق البريد الإلكتروني";
224
} else if ($Language === 'de') {	// German
224
} else if ($Language === 'de') {	// German
225
	$l_ChilliError			= "Sie wurden erfolgreich durch das Portal authentifiziert.";
225
	$l_ChilliError			= "Sie wurden erfolgreich durch das Portal authentifiziert.";
226
	$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";
227
	$l_logout			= "Beenden der Verbindung";
227
	$l_logout			= "Beenden der Verbindung";
228
	$l_loginfailed			= "Authentifizierungsfehler";
228
	$l_loginfailed			= "Authentifizierungsfehler";
229
	$l_loggingin			= "Authentifizierung auf dem Portal";
229
	$l_loggingin			= "Authentifizierung auf dem Portal";
230
	$l_loggedcont			= "Zugangskontrolle";
230
	$l_loggedcont			= "Zugangskontrolle";
231
	$l_loggedout			= "Ihre Sitzung wurde geschlossen";
231
	$l_loggedout			= "Ihre Sitzung wurde geschlossen";
232
	$l_user				= "Benutzer";
232
	$l_user				= "Benutzer";
233
	$l_password			= "Passwort";
233
	$l_password			= "Passwort";
234
	$l_mandatory			= "* Benötigte Felder";
234
	$l_mandatory			= "* Benötigte Felder";
235
	$l_wait				= "Bitte warten Sie einen Moment ...";
235
	$l_wait				= "Bitte warten Sie einen Moment ...";
236
	$l_onlinetime			= "Online-Zeit:";
236
	$l_onlinetime			= "Online-Zeit:";
237
	$l_remainingtime		= "Abmelden:";
237
	$l_remainingtime		= "Abmelden:";
238
	$l_boutonO			= "Authentifizierung";
238
	$l_boutonO			= "Authentifizierung";
239
	$l_boutonF			= "Schließen";
239
	$l_boutonF			= "Schließen";
240
	$l_loggedin_stringl1		= "Information System Security";
240
	$l_loggedin_stringl1		= "Information System Security";
241
	$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.";
242
	$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.";
243
	$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.";
244
	$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.";
245
	$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";
246
	$l_loggedout_string		= "Sie wurden vom Portal getrennt!";
246
	$l_loggedout_string		= "Sie wurden vom Portal getrennt!";
247
	$l_reply_0			= "Falscher Benutzername oder falsches Passwort";
247
	$l_reply_0			= "Falscher Benutzername oder falsches Passwort";
248
	$l_reply_1			= "Ihr Tageskontingent wurde erreicht (Dauer oder Volumen)";
248
	$l_reply_1			= "Ihr Tageskontingent wurde erreicht (Dauer oder Volumen)";
249
	$l_reply_2			= "Ihr monatliches Kontingent wurde erreicht (Dauer oder Volumen)";
249
	$l_reply_2			= "Ihr monatliches Kontingent wurde erreicht (Dauer oder Volumen)";
250
	$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";
251
	$l_reply_4			= "Ihr Account ist abgelaufen";
251
	$l_reply_4			= "Ihr Account ist abgelaufen";
252
	$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";
253
	$l_reply_6			= "Ihre maximale Verbindungszeit wurde erreicht";
253
	$l_reply_6			= "Ihre maximale Verbindungszeit wurde erreicht";
254
	$l_online_time			= "Online-Zeit";
254
	$l_online_time			= "Online-Zeit";
255
	$l_remaining_time		= "Verbleibende Zeit";
255
	$l_remaining_time		= "Verbleibende Zeit";
256
	$l_uam_domain			= "Offen zugängliche Seiten : ";
256
	$l_uam_domain			= "Offen zugängliche Seiten : ";
257
	$l_sms_registration		= "Per SMS anmelden";
257
	$l_sms_registration		= "Per SMS anmelden";
258
	$l_email_registration		= "Per E-Mail anmelden";
258
	$l_email_registration		= "Per E-Mail anmelden";
259
} else if ($Language === 'nl') {	// Dutch
259
} else if ($Language === 'nl') {	// Dutch
260
	$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.";
261
	$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.";
262
	$l_logout			= "Slotkoers verbinding";
262
	$l_logout			= "Slotkoers verbinding";
263
	$l_loginfailed			= "Authenticatie mislukt";
263
	$l_loginfailed			= "Authenticatie mislukt";
264
	$l_loggingin			= "Identificatie van de captive-portaal";
264
	$l_loggingin			= "Identificatie van de captive-portaal";
265
	$l_loggedcont			= "toegangscontrole";
265
	$l_loggedcont			= "toegangscontrole";
266
	$l_loggedout			= "Uw sessie is gesloten";
266
	$l_loggedout			= "Uw sessie is gesloten";
267
	$l_user				= "Gebruiker";
267
	$l_user				= "Gebruiker";
268
	$l_password			= "Wachtwoord";
268
	$l_password			= "Wachtwoord";
269
	$l_mandatory			= "* Verplichte velden";
269
	$l_mandatory			= "* Verplichte velden";
270
	$l_wait				= "Wacht een moment ...";
270
	$l_wait				= "Wacht een moment ...";
271
	$l_onlinetime			= "Sluit tijd:";
271
	$l_onlinetime			= "Sluit tijd:";
272
	$l_remainingtime		= "Verbreking in:";
272
	$l_remainingtime		= "Verbreking in:";
273
	$l_boutonO			= "Authenticatie";
273
	$l_boutonO			= "Authenticatie";
274
	$l_boutonF			= "Sluiten";
274
	$l_boutonF			= "Sluiten";
275
	$l_loggedin_stringl1		= "Information System Security";
275
	$l_loggedin_stringl1		= "Information System Security";
276
	$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.";
277
	$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.";
278
	$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.";
279
	$l_loggedin_stringl5		= "Deze gegevens worden automatisch verwijderd na een jaar.";
279
	$l_loggedin_stringl5		= "Deze gegevens worden automatisch verwijderd na een jaar.";
280
	$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";
281
	$l_loggedout_string		= "Logout gemaakt intern portaal!";
281
	$l_loggedout_string		= "Logout gemaakt intern portaal!";
282
	$l_reply_0			= "Ongeldige gebruikersnaam of wachtwoord";
282
	$l_reply_0			= "Ongeldige gebruikersnaam of wachtwoord";
283
	$l_reply_1 			= "Uw dagelijkse quotum is bereikt (duur of volume)";
283
	$l_reply_1 			= "Uw dagelijkse quotum is bereikt (duur of volume)";
284
	$l_reply_2			= "Je maandelijkse quotum is bereikt (duur of volume)";
284
	$l_reply_2			= "Je maandelijkse quotum is bereikt (duur of volume)";
285
	$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";
286
	$l_reply_4			= "your account expired";
286
	$l_reply_4			= "your account expired";
287
	$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";
288
	$l_reply_6			= "Your authorized connexion time has been reached";
288
	$l_reply_6			= "Your authorized connexion time has been reached";
289
	$l_online_time			= "Online tijd";
289
	$l_online_time			= "Online tijd";
290
	$l_remaining_time		= "Reterende tijd";
290
	$l_remaining_time		= "Reterende tijd";
291
	$l_uam_domain			= "Sites met open toegang : ";
291
	$l_uam_domain			= "Sites met open toegang : ";
292
	$l_sms_registration		= "Registreren per SMS";
292
	$l_sms_registration		= "Registreren per SMS";
293
	$l_email_registration		= "Registreer per E-mail";
293
	$l_email_registration		= "Registreer per E-mail";
294
} else if ($Language === 'fr') {	// French
294
} else if ($Language === 'fr') {	// French
295
	$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.";
296
	$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.";
297
	$l_logout			= "Fermeture de la session";
297
	$l_logout			= "Fermeture de la session";
298
	$l_loginfailed			= "Echec d'authentification";
298
	$l_loginfailed			= "Echec d'authentification";
299
	$l_loggingin			= "Identification sur le portail captif";
299
	$l_loggingin			= "Identification sur le portail captif";
300
	$l_loggedcont			= "Contrôle d'accès";
300
	$l_loggedcont			= "Contrôle d'accès";
301
	$l_loggedout			= "Votre session est fermée";
301
	$l_loggedout			= "Votre session est fermée";
302
	$l_user				= "Identifiant";
302
	$l_user				= "Identifiant";
303
	$l_password			= "Mot de passe";
303
	$l_password			= "Mot de passe";
304
	$l_mandatory			= "* champs requis";
304
	$l_mandatory			= "* champs requis";
305
	$l_wait				= "Patientez un instant ...";
305
	$l_wait				= "Patientez un instant ...";
306
	$l_onlinetime			= "Temps de connexion:";
306
	$l_onlinetime			= "Temps de connexion:";
307
	$l_remainingtime		= "Deconnexion dans :";
307
	$l_remainingtime		= "Deconnexion dans :";
308
	$l_boutonO			= "Authentification";
308
	$l_boutonO			= "Authentification";
309
	$l_boutonF			= "Fermer";
309
	$l_boutonF			= "Fermer";
310
	$l_loggedin_stringl1		= "Sécurité des Systèmes d'Information";
310
	$l_loggedin_stringl1		= "Sécurité des Systèmes d'Information";
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.";
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.";
312
	$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.";
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.";
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.";
314
	$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.";
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";
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";
316
	$l_loggedout_string		= "Déconnexion du portail captif effectuée !";
316
	$l_loggedout_string		= "Déconnexion du portail captif effectuée !";
317
	$l_reply_0			= "Nom d'utilisateur ou mot de passe incorrect";
317
	$l_reply_0			= "Nom d'utilisateur ou mot de passe incorrect";
318
	$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)";
319
	$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)";
320
	$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";
321
	$l_reply_4			= "Votre compte a expiré";
321
	$l_reply_4			= "Votre compte a expiré";
322
	$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";
323
	$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";
324
	$l_online_time			= "Temps de connexion";
324
	$l_online_time			= "Temps de connexion";
325
	$l_remaining_time		= "Temps restant";
325
	$l_remaining_time		= "Temps restant";
326
	$l_uam_domain			= "Sites en accès libre : ";
326
	$l_uam_domain			= "Sites en accès libre : ";
327
	$l_sms_registration		= "S'inscrire par SMS";
327
	$l_sms_registration		= "S'inscrire par SMS";
328
	$l_email_registration		= "S'incrire par E-mail";
328
	$l_email_registration		= "S'incrire par E-mail";
329
} else {				// English
329
} else {				// English
330
	$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.";
331
	$l_login			= "Successful authentication.<HR>Closing this window interrupts your session";
331
	$l_login			= "Successful authentication.<HR>Closing this window interrupts your session";
332
	$l_logout			= "Closing connection";
332
	$l_logout			= "Closing connection";
333
	$l_loginfailed			= "Authentication Failed";
333
	$l_loginfailed			= "Authentication Failed";
334
	$l_loggingin			= "Identification on the captive portal";
334
	$l_loggingin			= "Identification on the captive portal";
335
	$l_loggedcont			= "Access Control";
335
	$l_loggedcont			= "Access Control";
336
	$l_loggedout			= "Your session is closed";
336
	$l_loggedout			= "Your session is closed";
337
	$l_user				= "User";
337
	$l_user				= "User";
338
	$l_password			= "Password";
338
	$l_password			= "Password";
339
	$l_mandatory			= "* field required";
339
	$l_mandatory			= "* field required";
340
	$l_wait				= "Please wait a moment ...";
340
	$l_wait				= "Please wait a moment ...";
341
	$l_onlinetime			= "Connect time:";
341
	$l_onlinetime			= "Connect time:";
342
	$l_remainingtime		= "Disconnection in:";
342
	$l_remainingtime		= "Disconnection in:";
343
	$l_boutonO			= "Authentication";
343
	$l_boutonO			= "Authentication";
344
	$l_boutonF			= "Close";
344
	$l_boutonF			= "Close";
345
	$l_loggedin_stringl1		= "Information System Security";
345
	$l_loggedin_stringl1		= "Information System Security";
346
	$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.";
347
	$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.";
348
	$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.";
349
	$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.";
350
	$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";
351
	$l_loggedout_string		= "Disconnection of the captive portal made";
351
	$l_loggedout_string		= "Disconnection of the captive portal made";
352
	$l_reply_0			= "Incorrect username or password";
352
	$l_reply_0			= "Incorrect username or password";
353
	$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)";
354
	$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)";
355
	$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";
356
	$l_reply_4			= "your account expired";
356
	$l_reply_4			= "your account expired";
357
	$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";
358
	$l_reply_6			= "Your authorized connexion time has been reached";
358
	$l_reply_6			= "Your authorized connexion time has been reached";
359
	$l_online_time			= "Online time";
359
	$l_online_time			= "Online time";
360
	$l_remaining_time		= "Remaining time";
360
	$l_remaining_time		= "Remaining time";
361
	$l_uam_domain			= "Open access websites : ";
361
	$l_uam_domain			= "Open access websites : ";
362
	$l_sms_registration		= "Register by SMS";
362
	$l_sms_registration		= "Register by SMS";
363
	$l_email_registration		= "Register by E-mail";
363
	$l_email_registration		= "Register by E-mail";
364
}
364
}
365
 
365
 
366
# Read form parameters which we care about
366
# Read form parameters which we care about
367
# avoid the "user as a MAC address" attempts
367
# avoid the "user as a MAC address" attempts
368
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))
369
				$username	= htmlspecialchars(trim($_POST['username']));	else $username = '';
369
				$username	= htmlspecialchars(trim($_POST['username']));	else $username = '';
370
if (isset($_POST['password']))	$password	= htmlspecialchars($_POST['password']);		else $password = '';
370
if (isset($_POST['password']))	$password	= htmlspecialchars($_POST['password']);		else $password = '';
371
if (isset($_POST['challenge']))	$challenge	= htmlspecialchars($_POST['challenge']);	else $challenge = '';
371
if (isset($_POST['challenge']))	$challenge	= htmlspecialchars($_POST['challenge']);	else $challenge = '';
372
if (isset($_POST['button']))	$button		= htmlspecialchars($_POST['button']);		else $button = '';
372
if (isset($_POST['button']))	$button		= htmlspecialchars($_POST['button']);		else $button = '';
373
// if (isset($_POST['logout']))	$logout		= htmlspecialchars($_POST['logout']);		else $logout = '';
373
// if (isset($_POST['logout']))	$logout		= htmlspecialchars($_POST['logout']);		else $logout = '';
374
// if (isset($_POST['prelogin']))	$prelogin	= htmlspecialchars($_POST['prelogin']);		else $prelogin = '';
374
// if (isset($_POST['prelogin']))	$prelogin	= htmlspecialchars($_POST['prelogin']);		else $prelogin = '';
375
// if (isset($_POST['res']))	$res		= htmlspecialchars($_POST['res']);		else $res = '';
375
// if (isset($_POST['res']))	$res		= htmlspecialchars($_POST['res']);		else $res = '';
376
// if (isset($_POST['uamip']))	$uamip		= htmlspecialchars($_POST['uamip']);		else $uamip = '';
376
// if (isset($_POST['uamip']))	$uamip		= htmlspecialchars($_POST['uamip']);		else $uamip = '';
377
// if (isset($_POST['uamport']))	$uamport	= htmlspecialchars($_POST['uamport']);		else $uamport = '';
377
// if (isset($_POST['uamport']))	$uamport	= htmlspecialchars($_POST['uamport']);		else $uamport = '';
378
if (isset($_POST['userurl']))	$userurl	= htmlspecialchars($_POST['userurl']);		else $userurl = '';
378
if (isset($_POST['userurl']))	$userurl	= htmlspecialchars($_POST['userurl']);		else $userurl = '';
379
// if (isset($_POST['timeleft']))	$timeleft	= htmlspecialchars($_POST['timeleft']);		else $timeleft = '';
379
// if (isset($_POST['timeleft']))	$timeleft	= htmlspecialchars($_POST['timeleft']);		else $timeleft = '';
380
// if (isset($_POST['redirurl']))	$redirurl	= htmlspecialchars($_POST['redirurl']);		else $redirurl = '';
380
// if (isset($_POST['redirurl']))	$redirurl	= htmlspecialchars($_POST['redirurl']);		else $redirurl = '';
381
 
381
 
382
# Read query parameters which we care about
382
# Read query parameters which we care about
383
if (isset($_GET['res']))	$res		= htmlspecialchars($_GET['res']);		else $res = '';
383
if (isset($_GET['res']))	$res		= htmlspecialchars($_GET['res']);		else $res = '';
384
// if (isset($_GET['reason']))	$reason		= htmlspecialchars($_GET['reason']);		else $reason = '';
384
// if (isset($_GET['reason']))	$reason		= htmlspecialchars($_GET['reason']);		else $reason = '';
385
if (isset($_GET['challenge']))	$challenge	= htmlspecialchars($_GET['challenge']);
385
if (isset($_GET['challenge']))	$challenge	= htmlspecialchars($_GET['challenge']);
386
// if (isset($_GET['uamip']))	$uamip		= htmlspecialchars($_GET['uamip']);
386
// if (isset($_GET['uamip']))	$uamip		= htmlspecialchars($_GET['uamip']);
387
// if (isset($_GET['uamport']))	$uamport	= htmlspecialchars($_GET['uamport']);
387
// if (isset($_GET['uamport']))	$uamport	= htmlspecialchars($_GET['uamport']);
388
if (isset($_GET['timeleft']))	$timeleft	= htmlspecialchars($_GET['timeleft']);		else $timeleft = '';
388
if (isset($_GET['timeleft']))	$timeleft	= htmlspecialchars($_GET['timeleft']);		else $timeleft = '';
389
if (isset($_GET['reply']))	$reply		= htmlspecialchars(trim($_GET['reply']));	else $reply = '';
389
if (isset($_GET['reply']))	$reply		= htmlspecialchars(trim($_GET['reply']));	else $reply = '';
390
if (isset($_GET['redirurl']))	$redirurl	= htmlspecialchars($_GET['redirurl']);		else $redirurl = '';
390
if (isset($_GET['redirurl']))	$redirurl	= htmlspecialchars($_GET['redirurl']);		else $redirurl = '';
391
if (isset($_GET['userurl']))	$userurl	= htmlspecialchars($_GET['userurl']);
391
if (isset($_GET['userurl']))	$userurl	= htmlspecialchars($_GET['userurl']);
392
 
392
 
393
// TODO: clean unused query params
393
// TODO: clean unused query params
394
 
394
 
395
$uamip = $conf['HOSTNAME'].'.'.$conf['DOMAIN'];
395
$uamip = $conf['HOSTNAME'].'.'.$conf['DOMAIN'];
396
if (($conf['HTTPS_CHILLI'] === 'on') && $useHTTPS) {
396
if (($conf['HTTPS_CHILLI'] === 'on') && $useHTTPS) {
397
	$uamproto = 'https';
397
	$uamproto = 'https';
398
	$uamport  = 3991;
398
	$uamport  = 3991;
399
} else {
399
} else {
400
	$uamproto = 'http';
400
	$uamproto = 'http';
401
	$uamport  = 3990;
401
	$uamport  = 3990;
402
}
402
}
403
 
403
 
404
# translation of radius replies
404
# translation of radius replies
405
if (!empty($reply)) {
405
if (!empty($reply)) {
406
	switch ($reply) {
406
	switch ($reply) {
407
		case 'Username not found'				: $reply = $l_reply_0; break;
407
		case 'Username not found'				: $reply = $l_reply_0; break;
408
		case 'Login failed'					: $reply = $l_reply_0; break;
408
		case 'Login failed'					: $reply = $l_reply_0; break;
409
		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;
410
		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;
411
		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;
412
		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;
413
		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;
414
		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;
415
	}
415
	}
416
}
416
}
417
 
417
 
418
// If attempt to login
418
// If attempt to login
419
if ($button === $l_boutonO) {
419
if ($button === $l_boutonO) {
420
	//correction password length in coova-chilli
420
	//correction password length in coova-chilli
421
	//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/
422
	$hexchal = pack('H*', $challenge);
422
	$hexchal = pack('H*', $challenge);
423
	$newchal = pack('H*', hash('sha256',$hexchal . $uamsecret));
423
	$newchal = pack('H*', hash('sha256',$hexchal . $uamsecret));
424
	// If challenge isn't long enough, repeat it until it is
424
	// If challenge isn't long enough, repeat it until it is
425
	while (strlen($newchal) < strlen($password)) {
425
	while (strlen($newchal) < strlen($password)) {
426
		$newchal .= $newchal;
426
		$newchal .= $newchal;
427
	}
427
	}
428
	$newpwd   = pack('a*', $password);
428
	$newpwd   = pack('a*', $password);
429
	// Encode plain text password with challenge
429
	// Encode plain text password with challenge
430
	$pappassword = implode('', unpack('H*', ($newpwd ^ $newchal)));
430
	$pappassword = implode('', unpack('H*', ($newpwd ^ $newchal)));
431
	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");
432
	exit();
432
	exit();
433
}
433
}
434
 
434
 
435
switch($res) {
435
switch($res) {
436
	case 'success':	$result = 1; break; // If login successful
436
	case 'success':	$result = 1; break; // If login successful
437
	case 'failed':	$result = 2; break; // If login failed
437
	case 'failed':	$result = 2; break; // If login failed
438
	case 'logoff':	$result = 3; break; // If logout successful
438
	case 'logoff':	$result = 3; break; // If logout successful
439
	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
440
	case 'notyet':	$result = 5; break; // If not logged in yet
440
	case 'notyet':	$result = 5; break; // If not logged in yet
441
	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
442
}
442
}
443
 
443
 
444
//check if we need to warn user about the imputability logs.
444
//check if we need to warn user about the imputability logs.
445
if ($result === 1) {
445
if ($result === 1) {
446
	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'))) {
447
		include_once('/etc/freeradius-web/config.php');
447
		include_once('/etc/freeradius-web/config.php');
448
		include_once('./acc/manager/lib/sql/drivers/mysql/functions.php');
448
		include_once('./acc/manager/lib/sql/drivers/mysql/functions.php');
449
		$link = @da_sql_pconnect($config);
449
		$link = @da_sql_pconnect($config);
450
		if ($link) {
450
		if ($link) {
451
			$user_uid = da_sql_escape_string($link, $_GET['uid']);
451
			$user_uid = da_sql_escape_string($link, $_GET['uid']);
452
			$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'";
453
			$res = @da_sql_query($link, $config, $sql);
453
			$res = @da_sql_query($link, $config, $sql);
454
			if ($res) {
454
			if ($res) {
455
				$row = @da_sql_fetch_array($res, $config);
455
				$row = @da_sql_fetch_array($res, $config);
456
				if ($row['value'] === '1') {
456
				if ($row['value'] === '1') {
457
					$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'";
458
					@da_sql_query($link, $config, $sql);
458
					@da_sql_query($link, $config, $sql);
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 
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 
460
					exit();
460
					exit();
461
				}
461
				}
462
			}
462
			}
463
		}
463
		}
464
	}
464
	}
465
}
465
}
466
 
466
 
467
// By default, redirect to prelogin in order to generate a challenge
467
// By default, redirect to prelogin in order to generate a challenge
468
if ($result === 0) {
468
if ($result === 0) {
469
	header("Location: $uamproto://$uamip:$uamport/prelogin");
469
	header("Location: $uamproto://$uamip:$uamport/prelogin");
470
	exit();
470
	exit();
471
}
471
}
472
 
472
 
473
//////////////////////////////////////////////
473
//////////////////////////////////////////////
474
///////////// TEST VARIABLES /////////////////
474
///////////// TEST VARIABLES /////////////////
475
//////////////////////////////////////////////////////////////////
475
//////////////////////////////////////////////////////////////////
476
//$result = 5;     // = 1/2/3/4/5
476
//$result = 5;     // = 1/2/3/4/5
477
//$reply is a displayed sentence
477
//$reply is a displayed sentence
478
//$reply = 'dsfsdfsdfdsf';    //  = ''/'Incorrect user/password'
478
//$reply = 'dsfsdfsdfdsf';    //  = ''/'Incorrect user/password'
479
//$service_SMS_status = true;    // = true/false
479
//$service_SMS_status = true;    // = true/false
480
//$service_Email_status = true;    // = true/false
480
//$service_Email_status = true;    // = true/false
481
//$service_wifi4eu_status = true;    // = true/false
481
//$service_wifi4eu_status = true;    // = true/false
482
// test of domain Allowed
482
// test of domain Allowed
483
//////////////////////////////////////////////////////////////////
483
//////////////////////////////////////////////////////////////////
484
 
484
 
485
// Cleaning the cache
485
// Cleaning the cache
486
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
486
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
487
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');
488
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');
489
header('Cache-Control: post-check=0, pre-check=0', false);
489
header('Cache-Control: post-check=0, pre-check=0', false);
490
header('Pragma: no-cache');
490
header('Pragma: no-cache');
491
?>
491
?>
492
<!DOCTYPE html>
492
<!DOCTYPE html>
493
<html>
493
<html>
494
<head>
494
<head>
495
	<meta charset="utf-8">
495
	<meta charset="utf-8">
496
	<title><?= $l_loggingin ?></title>
496
	<title><?= $l_loggingin ?></title>
497
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
497
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
498
	<link rel="stylesheet" href="/css/bootstrap.min.css" type="text/css">
498
	<link rel="stylesheet" href="/css/bootstrap.min.css" type="text/css">
499
	<link rel="stylesheet" href="/css/intercept.css" type="text/css">
499
	<link rel="stylesheet" href="/css/intercept.css" type="text/css">
500
	<link rel="icon" href="/images/favicon-48.ico" type="image/ico">
500
	<link rel="icon" href="/images/favicon-48.ico" type="image/ico">
501
<? if ($service_wifi4eu_status): ?>
501
<? if ($service_wifi4eu_status): ?>
502
	<script type="text/javascript">
502
	<script type="text/javascript">
503
		var wifi4euTimerStart = Date.now();
503
		var wifi4euTimerStart = Date.now();
504
		var wifi4euNetworkIdentifier = '<?= $service_wifi4eu_code ?>';
504
		var wifi4euNetworkIdentifier = '<?= $service_wifi4eu_code ?>';
505
		var wifi4euLanguage = '<?= $Language ?>';
505
		var wifi4euLanguage = '<?= $Language ?>';
506
		//var selftestModus = true;
506
		//var selftestModus = true;
507
	</script>
507
	</script>
508
	<script type="text/javascript" src="<?= $service_wifi4eu_server ?>"></script>
508
	<script type="text/javascript" src="<?= $service_wifi4eu_server ?>"></script>
509
<? endif; ?>
509
<? endif; ?>
510
	<script type="text/javascript">
510
	<script type="text/javascript">
511
	function doOnLoad(result, userurl, redirurl, adminurl, timeleft) {
511
	function doOnLoad(result, userurl, redirurl, adminurl, timeleft) {
512
		if ((result === 1) || (result === 4)) {	// success or already
512
		if ((result === 1) || (result === 4)) {	// success or already
513
			var url;
513
			var url;
514
			if (adminurl !== '') {
514
			if (adminurl !== '') {
515
				url = adminurl;
515
				url = adminurl;
516
			} else if (redirurl !== '') {
516
			} else if (redirurl !== '') {
517
				url = redirurl;
517
				url = redirurl;
518
			} else if (userurl !== '') {
518
			} else if (userurl !== '') {
519
				url = userurl;
519
				url = userurl;
520
			}
520
			}
521
			if (typeof url !== 'undefined') {
521
			if (typeof url !== 'undefined') {
522
				var win = window.open('<?= $statuspath ?>', '_blank');
522
				var win = window.open('<?= $statuspath ?>', '_blank');
523
				if ((win === null) || (typeof win === 'undefined')) { // Pop-up blocked
523
				if ((win === null) || (typeof win === 'undefined')) { // Pop-up blocked
524
					window.location = '<?= $statuspath ?>';
524
					window.location = '<?= $statuspath ?>';
525
				} else {
525
				} else {
526
					window.location = url;
526
					window.location = url;
527
				}
527
				}
528
			} else {
528
			} else {
529
				window.location = '<?= $statuspath ?>';
529
				window.location = '<?= $statuspath ?>';
530
			}
530
			}
531
		}
531
		}
532
		if ((result === 2) || (result === 3) || result === 5) { // failed or logoff or notyet
532
		if ((result === 2) || (result === 3) || result === 5) { // failed or logoff or notyet
533
			document.form1.username.focus();
533
			document.form1.username.focus();
534
		}
534
		}
535
	}
535
	}
536
	</script>
536
	</script>
537
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
537
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
538
	<script type="text/javascript" src="/js/jquery.min.js"></script>
538
	<script type="text/javascript" src="/js/jquery.min.js"></script>
539
	<script>jQuery(document).ready(function($){$("input").focus(function(){$("#status").fadeOut(1000);});});</script>
539
	<script>jQuery(document).ready(function($){$("input").focus(function(){$("#status").fadeOut(1000);});});</script>
540
</head>
540
</head>
541
<body onLoad="javascript:doOnLoad(<?= $result ?>,'<?= $userurl ?>','<?= $redirurl ?>','<?= $adminurl ?>','<?= $timeleft ?>')">
541
<body onLoad="javascript:doOnLoad(<?= $result ?>,'<?= $userurl ?>','<?= $redirurl ?>','<?= $adminurl ?>','<?= $timeleft ?>')">
542
	<div class="col-12">	
542
	<div class="col-12">	
543
	<?php if ($result === 2 || $result === 3 || $result === 5): // failed or logoff or notyet ?>
543
	<?php if ($result === 2 || $result === 3 || $result === 5): // failed or logoff or notyet ?>
544
		<div class ="row">
544
		<div class ="row">
545
			<div class="col-12 col-md-10 offset-sm-1">
545
			<div class="col-12 col-md-10 offset-sm-1">
546
				<div class="row banner">
546
				<div class="row banner">
547
					<div class="col-8 offset-xs-2 col-md-12 offset-sm-0">
547
					<div class="col-8 offset-xs-2 col-md-12 offset-sm-0">
548
				<?php if ($service_wifi4eu_status): ?>
548
				<?php if ($service_wifi4eu_status): ?>
549
					<img id="wifi4eubanner">
549
					<img id="wifi4eubanner">
550
				<?php else: ?>
550
				<?php else: ?>
551
					<h1 class="organisme"><?= $organisme ?></h1>
551
					<h1 class="organisme"><?= $organisme ?></h1>
552
				<?php endif; ?>
552
				<?php endif; ?>
553
					</div>
553
					</div>
554
				</div>
554
				</div>
555
				<div class="row">
555
				<div class="row">
556
					<form name="form1" class="form-horizontal col-12 col-sm-12 col-md-10 offset-md-1 background-form" method="post" action="<?= $loginpath ?>">
556
					<form name="form1" class="form-horizontal col-12 col-sm-12 col-md-10 offset-md-1 background-form" method="post" action="<?= $loginpath ?>">
557
						<div class="row">
557
						<div class="row">
558
							<div class="col-12 col-sm-12 col-md-6 offset-md-3">
558
							<div class="col-12 col-sm-12 col-md-6 offset-md-3">
559
								<h2 class="titre-controle-acces"><?= $l_loggedcont ?></h2>
559
								<h2 class="titre-controle-acces"><?= $l_loggedcont ?></h2>
560
							</div>
560
							</div>
561
							<div class="d-none d-md-block col-md-3">
561
							<div class="d-none d-md-block col-md-3">
562
							<?php
562
							<?php
563
							// Read the "Domain allowed" file
563
							// Read the "Domain allowed" file
564
							$tab = file(DOMAIN_ALLOWED_LIST);
564
							$tab = file(DOMAIN_ALLOWED_LIST);
565
							if ($tab) { // the file isn't empty
565
							if ($tab) { // the file isn't empty
566
								echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
566
								echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
567
								echo '<ul>';
567
								echo '<ul>';
568
								foreach ($tab as $line) {
568
								foreach ($tab as $line) {
569
									if (!empty(trim($line))) { // the line isn't empty
569
									if (!empty(trim($line))) { // the line isn't empty
570
										if (strpos ($line, '#')) { // the domain should be displayed
570
										if (strpos ($line, '#')) { // the domain should be displayed
571
											$domain_allowed = explode('#', $line);
571
											$domain_allowed = explode('#', $line);
572
											$domain = explode('"', $domain_allowed[0]);
572
											$domain = explode('"', $domain_allowed[0]);
573
											$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
573
											$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
574
											echo '<li><a href="http://'.trim($domain[1]).'">'.trim($domain_allowed[1]).'</a></li>';
574
											echo '<li><a href="http://'.trim($domain[1]).'">'.trim($domain_allowed[1]).'</a></li>';
575
										}
575
										}
576
									}
576
									}
577
								}
577
								}
578
								echo '</ul>';
578
								echo '</ul>';
579
							}
579
							}
580
							?>
580
							?>
581
							</div>
581
							</div>
582
						</div>
582
						</div>
583
						<div>
583
						<div>
584
						<?php if ($result === 2): // failed ?>
584
						<?php if ($result === 2): // failed ?>
585
							<h3 class="titre-erreur"><?= $l_loginfailed ?>
585
							<h3 class="titre-erreur"><?= $l_loginfailed ?>
586
							<?php if ($reply): // traitement du reply ... ?>
586
							<?php if ($reply): // traitement du reply ... ?>
587
								: <?= $reply ?>
587
								: <?= $reply ?>
588
							<?php endif; ?>
588
							<?php endif; ?>
589
							</h3>
589
							</h3>
590
						<?php endif;
590
						<?php endif;
591
						if ($userurl === 'http://logout/') $userurl = 'http://www.google.com'; // Avoid cyclic logout
591
						if ($userurl === 'http://logout/') $userurl = 'http://www.google.com'; // Avoid cyclic logout
592
						?>
592
						?>
593
						</div>
593
						</div>
594
						<div class="row inputs">
594
						<div class="row inputs">
595
							<div class="d-none d-md-block col-md-2">
595
							<div class="d-none d-md-block col-md-2">
596
								 <img id="logo-organ" class="img-fluid" src="/images/organisme.png">
596
								 <img id="logo-organ" class="img-fluid" src="/images/organisme.png">
597
							</div>
597
							</div>
598
							<div class="col-12 col-md-8">
598
							<div class="col-12 col-md-8">
599
								<input type="hidden" name="challenge" value="<?= $challenge ?>">
599
								<input type="hidden" name="challenge" value="<?= $challenge ?>">
600
								<input type="hidden" name="userurl" value="<?= $userurl ?>">
600
								<input type="hidden" name="userurl" value="<?= $userurl ?>">
601
								<div class="form-group row">
601
								<div class="form-group row">
602
									<div class="col-2 col-md-3 control-label">
602
									<div class="col-2 col-md-3 control-label">
603
										<p class="boite-info-text"><?= $l_user ?> *</p>
603
										<p class="boite-info-text"><?= $l_user ?> *</p>
604
									</div>
604
									</div>
605
									<div class="col-8 col-md-8" id="input_username">
605
									<div class="col-8 col-md-8" id="input_username">
606
										<input type="text" class="form-control boite-info-text" name="username" placeholder="<?= $l_user ?>">
606
										<input type="text" class="form-control boite-info-text" name="username" placeholder="<?= $l_user ?>">
607
									</div>
607
									</div>
608
								</div>
608
								</div>
609
								<div class="form-group row">
609
								<div class="form-group row">
610
									<div class="col-2 col-md-3 control-label">
610
									<div class="col-2 col-md-3 control-label">
611
										<p class="boite-info-text"><?= $l_password ?> *</p>
611
										<p class="boite-info-text"><?= $l_password ?> *</p>
612
									</div>
612
									</div>
613
									<div class="col-8 col-md-8" id="input_password">
613
									<div class="col-8 col-md-8" id="input_password">
614
										<input type="password" class="form-control boite-info-text" name="password" placeholder="<?= $l_password ?>">
614
										<input type="password" class="form-control boite-info-text" name="password" placeholder="<?= $l_password ?>">
615
									</div>
615
									</div>
616
								</div>
616
								</div>
617
								<div id="status"><?=$l_mandatory?></div>
617
								<div id="status"><?=$l_mandatory?></div>
618
							</div>
618
							</div>
619
							<div class="d-none d-md-block col-md-2">
619
							<div class="d-none d-md-block col-md-2">
620
							</div>
620
							</div>
621
						</div>
621
						</div>
622
						<div class="row row_button">
622
						<div class="row row_button">
623
							<div class="col-5 offset-xs-12 col-md-4 offset-md-3 text-center">
-
 
624
								<input id="button" class="btn btn-default" value="Annuler" onclick="window.location.href = 'index.php';">
-
 
625
							</div>
-
 
626
							<div class="col-6 col-md-4">
623
							<div class="col-12 text-center">
627
								<input value="<?= $l_boutonO ?>" class="btn btn-primary button" type="submit" name="button">
624
								<input value="<?= $l_boutonO ?>" class="btn btn-primary button" type="submit" name="button">
628
							</div>	
625
								<?php if ($service_SMS_status): ?>
-
 
626
									<a href="sms_registration.php" class="btn btn-primary button"><?= $l_sms_registration ?></a>
629
						</div>
627
								<?php endif; ?>
630
						<?php if ($service_SMS_status): ?>
628
								<?php if ($service_Email_status): ?>
631
							<div class= "row sms_registration">
629
									<a href="email_registration_front.php" class="btn btn-primary button"><?= $l_email_registration ?></a>
632
								<a href="sms_registration.php"><?= $l_sms_registration ?></a>
630
								<?php endif; ?>
633
							</div>
631
							</div>
634
						<?php endif; ?>
-
 
635
						<?php if ($service_Email_status): ?>
-
 
636
							<div class= "row sms_registration">
-
 
637
								<a href="email_registration_front.php"><?= $l_email_registration ?></a>
-
 
638
							</div>
632
						</div>
639
						<?php endif; ?>
-
 
640
					</form>
633
					</form>
641
				</div>
634
				</div>
642
			</div>
635
			</div>
643
		</div>
636
		</div>
644
			<div class="row boite-info-spacing">
637
			<div class="row boite-info-spacing">
645
				<div class="col-12 col-md-10 offset-sm-1 col-lg-8 offset-md-2 boite-info-spacing">
638
				<div class="col-12 col-md-10 offset-sm-1 col-lg-8 offset-md-2 boite-info-spacing">
646
					<table id="boite-info" cellSpacing="0" cellPadding="0">
639
					<table id="boite-info" cellSpacing="0" cellPadding="0">
647
						<tr class="boite-info-titre">
640
						<tr class="boite-info-titre">
648
							<td align="center"><font color="red"><b><?= $l_loggedin_stringl1 ?></b></font></td>
641
							<td align="center"><font color="red"><b><?= $l_loggedin_stringl1 ?></b></font></td>
649
						</tr>
642
						</tr>
650
						<tr class="boite-info-text">
643
						<tr class="boite-info-text">
651
							<td align="left">
644
							<td align="left">
652
								<ul>
645
								<ul>
653
									<li><?= $l_loggedin_stringl2 ?></li>
646
									<li><?= $l_loggedin_stringl2 ?></li>
654
									<li><?= $l_loggedin_stringl4 ?></li>
647
									<li><?= $l_loggedin_stringl4 ?></li>
655
									<li><?= $l_loggedin_stringl3 ?></li>
648
									<li><?= $l_loggedin_stringl3 ?></li>
656
									<li><?= $l_loggedin_stringl5 ?></li>
649
									<li><?= $l_loggedin_stringl5 ?></li>
657
									<li><?= $l_loggedin_stringl6 ?></li>
650
									<li><?= $l_loggedin_stringl6 ?></li>
658
								</ul>
651
								</ul>
659
							</td>
652
							</td>
660
						</tr>
653
						</tr>
661
					</table>
654
					</table>
662
				</div>
655
				</div>
663
				<div class="d-none d-sm-none d-md-block col-md-2">
656
				<div class="d-none d-sm-none d-md-block col-md-2">
664
					<img id="logo-alcasar" class="img-fluid" src="/images/logo-alcasar.png">
657
					<img id="logo-alcasar" class="img-fluid" src="/images/logo-alcasar.png">
665
				</div>
658
				</div>
666
			</div>
659
			</div>
667
			<div class="row">
660
			<div class="row">
668
				<div class="col-6 col-md-12 d-md-none d-sm-none d-lg-none">
661
				<div class="col-6 col-md-12 d-md-none d-sm-none d-lg-none">
669
						<img id="logo-alcasar" class="img-fluid img-xs-bottom" src="/images/logo-alcasar.png">
662
						<img id="logo-alcasar" class="img-fluid img-xs-bottom" src="/images/logo-alcasar.png">
670
					</div>
663
					</div>
671
				<div class="col-6 d-sm-none d-md-none d-lg-none">
664
				<div class="col-6 d-sm-none d-md-none d-lg-none">
672
					<img id="logo-organ" class="img-fluid img-xs-bottom" src="/images/organisme.png">
665
					<img id="logo-organ" class="img-fluid img-xs-bottom" src="/images/organisme.png">
673
				</div>
666
				</div>
674
			</div>
667
			</div>
675
		<div class="row" style="text-align: center">
668
		<div class="row" style="text-align: center">
676
			<div class="col-8 offset-xs-2 col-md-6 offset-sm-3 d-md-none d-sm-none d-lg-none">
669
			<div class="col-8 offset-xs-2 col-md-6 offset-sm-3 d-md-none d-sm-none d-lg-none">
677
			<?php
670
			<?php
678
			// Read the "Domain allowed" file
671
			// Read the "Domain allowed" file
679
			$tab = file(DOMAIN_ALLOWED_LIST);
672
			$tab = file(DOMAIN_ALLOWED_LIST);
680
			if ($tab) { // the file isn't empty
673
			if ($tab) { // the file isn't empty
681
				echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
674
				echo '<div id="authorized_domain">'.$l_uam_domain.'</div>';
682
				echo '<ul>';
675
				echo '<ul>';
683
				foreach ($tab as $line) {
676
				foreach ($tab as $line) {
684
					if (!empty(trim($line))) { // the line isn't empty
677
					if (!empty(trim($line))) { // the line isn't empty
685
						if (strpos ($line, '#')) { // the domain should be displayed
678
						if (strpos ($line, '#')) { // the domain should be displayed
686
							$domain_allowed = explode('#', $line);
679
							$domain_allowed = explode('#', $line);
687
							$domain = explode('"', $domain_allowed[0]);
680
							$domain = explode('"', $domain_allowed[0]);
688
							$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
681
							$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
689
							echo '<li><a href="http://'.trim($domain[1]).'">'.trim($domain_allowed[1]).'</a></li>';
682
							echo '<li><a href="http://'.trim($domain[1]).'">'.trim($domain_allowed[1]).'</a></li>';
690
						}
683
						}
691
					}
684
					}
692
				}
685
				}
693
				echo '</ul>';
686
				echo '</ul>';
694
			}
687
			}
695
			?>
688
			?>
696
			</div>
689
			</div>
697
		</div>
690
		</div>
698
	</div>
691
	</div>
699
	<?php endif; ?>
692
	<?php endif; ?>
700
</body>
693
</body>
701
</html>
694
</html>
702
 
695