Subversion Repositories ALCASAR

Rev

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

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