Subversion Repositories ALCASAR

Rev

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

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