Subversion Repositories ALCASAR

Rev

Rev 2993 | Rev 3026 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2993 Rev 3001
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: intercept.php 2993 2022-03-06 23:02:08Z rexy $
2
# $Id: intercept.php 3001 2022-03-20 23:06:20Z 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
Line 55... Line 55...
55
}
55
}
56
fclose($file_conf);
56
fclose($file_conf);
57
 
57
 
58
$organisme = $conf["ORGANISM"];
58
$organisme = $conf["ORGANISM"];
59
$service_SMS_status = ($conf['SMS'] === 'on');
59
$service_SMS_status = ($conf['SMS'] === 'on');
60
$service_Email_status = ($conf['Email'] === 'on');
60
$service_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 = "F3t9VEY6jOwHm7xE";
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
Line 111... Line 111...
111
	$l_reply_5			= "Ha alcanzado el número máximo de inicios de sesión simultáneos";
111
	$l_reply_5			= "Ha alcanzado el número máximo de inicios de sesión simultáneos";
112
	$l_reply_6			= "Se ha alcanzado su tiempo de conexión autorizado";
112
	$l_reply_6			= "Se ha alcanzado su tiempo de conexión autorizado";
113
	$l_online_time			= "Tiempo en linea";
113
	$l_online_time			= "Tiempo en linea";
114
	$l_remaining_time		= "Tiempo restante";
114
	$l_remaining_time		= "Tiempo restante";
115
	$l_uam_domain			= "Sitios de libre acceso : ";
115
	$l_uam_domain			= "Sitios de libre acceso : ";
116
	$l_sms_registration 	= "Registro por SMS";
116
	$l_sms_registration		= "Registro por SMS";
117
	$l_email_registration 	= "Registro por E-mail";
117
	$l_email_registration		= "Registro por E-mail";
118
} else if ($Language === 'pt') {	// Portuguese
118
} else if ($Language === 'pt') {	// Portuguese
119
	$l_ChilliError			= "A autenticação precisa ser bem sucedida através do portal.";
119
	$l_ChilliError			= "A autenticação precisa ser bem sucedida através do portal.";
120
	$l_login			= "Sucesso na autenticação.<HR>Matenha esse pop-up apenas minimizado para não interromper a conexão";
120
	$l_login			= "Sucesso na autenticação.<HR>Matenha esse pop-up apenas minimizado para não interromper a conexão";
121
	$l_logout			= "Encerrar conexão";
121
	$l_logout			= "Encerrar conexão";
122
	$l_loginfailed			= "Falha na autenticação";
122
	$l_loginfailed			= "Falha na autenticação";
Line 146... Line 146...
146
	$l_reply_5			= "Você atingiu o número máximo de logins simultâneos";
146
	$l_reply_5			= "Você atingiu o número máximo de logins simultâneos";
147
	$l_reply_6			= "Seu tempo de conexão autorizada finalizou";
147
	$l_reply_6			= "Seu tempo de conexão autorizada finalizou";
148
	$l_online_time			= "Tempo Online";
148
	$l_online_time			= "Tempo Online";
149
	$l_remaining_time		= "Tempo restante";
149
	$l_remaining_time		= "Tempo restante";
150
	$l_uam_domain			= "Sítios de acesso livre : ";
150
	$l_uam_domain			= "Sítios de acesso livre : ";
151
	$l_sms_registration 	= "Registo por SMS";
151
	$l_sms_registration		= "Registo por SMS";
152
	$l_email_registration 	= "Registro por E-mail";
152
	$l_email_registration		= "Registro por E-mail";
153
} else if ($Language === 'zh') {	// Chinese
153
} else if ($Language === 'zh') {	// Chinese
154
	$l_ChilliError			= "验证必须通过强制门户服务";
154
	$l_ChilliError			= "验证必须通过强制门户服务";
155
	$l_login			= "验证成功<HR>关闭此窗口中断连接";
155
	$l_login			= "验证成功<HR>关闭此窗口中断连接";
156
	$l_logout			= "关闭连接";
156
	$l_logout			= "关闭连接";
157
	$l_loginfailed			= "验证失败";
157
	$l_loginfailed			= "验证失败";
Line 182... Line 182...
182
	$l_reply_6			= "已经到达您的允许连接时间";
182
	$l_reply_6			= "已经到达您的允许连接时间";
183
	$l_online_time			= "在线时间";
183
	$l_online_time			= "在线时间";
184
	$l_remaining_time		= "剩余时间";
184
	$l_remaining_time		= "剩余时间";
185
	$l_uam_domain			= " : ";
185
	$l_uam_domain			= " : ";
186
	$l_sms_registration		= "SMSで登録する";
186
	$l_sms_registration		= "SMSで登録する";
187
	$l_email_registration 	= "メールでの登録";
187
	$l_email_registration		= "メールでの登録";
188
} else if ($Language === 'ar') {	// Arabic
188
} else if ($Language === 'ar') {	// Arabic
189
	$l_ChilliError			= "يجب نجاح المصادقة على البوابة الأسيرة";
189
	$l_ChilliError			= "يجب نجاح المصادقة على البوابة الأسيرة";
190
	$l_login			= "إغلاق هذه النافذة يقطع دورة عملك";
190
	$l_login			= "إغلاق هذه النافذة يقطع دورة عملك";
191
	$l_logout			= "إغلاق الدورة";
191
	$l_logout			= "إغلاق الدورة";
192
	$l_loginfailed			= "فشل المصادقة";
192
	$l_loginfailed			= "فشل المصادقة";
Line 217... Line 217...
217
	$l_reply_6			= "استكملت مذة الإتصال المسموحة";
217
	$l_reply_6			= "استكملت مذة الإتصال المسموحة";
218
	$l_online_time			= "مذة الإتصال";
218
	$l_online_time			= "مذة الإتصال";
219
	$l_remaining_time		= "الوقت المتبق";
219
	$l_remaining_time		= "الوقت المتبق";
220
	$l_uam_domain			= "مواقع الوصول المجاني";
220
	$l_uam_domain			= "مواقع الوصول المجاني";
221
	$l_sms_registration		= "التسجيل عن طريق الرسائل القصيرة";
221
	$l_sms_registration		= "التسجيل عن طريق الرسائل القصيرة";
222
	$l_email_registration 	= "التسجيل عن طريق البريد الإلكتروني";
222
	$l_email_registration		= "التسجيل عن طريق البريد الإلكتروني";
223
} else if ($Language === 'de') {	// German
223
} else if ($Language === 'de') {	// German
224
	$l_ChilliError			= "Sie wurden erfolgreich durch das Portal authentifiziert.";
224
	$l_ChilliError			= "Sie wurden erfolgreich durch das Portal authentifiziert.";
225
	$l_login			= "Erfolgreiche Authentifizierung.<HR>Schlißen dieses fensters unterbricht die Sitzung";
225
	$l_login			= "Erfolgreiche Authentifizierung.<HR>Schlißen dieses fensters unterbricht die Sitzung";
226
	$l_logout			= "Beenden der Verbindung";
226
	$l_logout			= "Beenden der Verbindung";
227
	$l_loginfailed			= "Authentifizierungsfehler";
227
	$l_loginfailed			= "Authentifizierungsfehler";
Line 252... Line 252...
252
	$l_reply_6			= "Ihre maximale Verbindungszeit wurde erreicht";
252
	$l_reply_6			= "Ihre maximale Verbindungszeit wurde erreicht";
253
	$l_online_time			= "Online-Zeit";
253
	$l_online_time			= "Online-Zeit";
254
	$l_remaining_time		= "Verbleibende Zeit";
254
	$l_remaining_time		= "Verbleibende Zeit";
255
	$l_uam_domain			= "Offen zugängliche Seiten : ";
255
	$l_uam_domain			= "Offen zugängliche Seiten : ";
256
	$l_sms_registration		= "Per SMS anmelden";
256
	$l_sms_registration		= "Per SMS anmelden";
257
	$l_email_registration 	= "Per E-Mail anmelden";
257
	$l_email_registration		= "Per E-Mail anmelden";
258
} else if ($Language === 'nl') {	// Dutch
258
} else if ($Language === 'nl') {	// Dutch
259
	$l_ChilliError			= "De authenticatie moet een succes worden via de captive portal dienst.";
259
	$l_ChilliError			= "De authenticatie moet een succes worden via de captive portal dienst.";
260
	$l_login			= "Succesvolle authenticatie.<HR>Dit venster te sluiten onderbreekt uw sessie.";
260
	$l_login			= "Succesvolle authenticatie.<HR>Dit venster te sluiten onderbreekt uw sessie.";
261
	$l_logout			= "Slotkoers verbinding";
261
	$l_logout			= "Slotkoers verbinding";
262
	$l_loginfailed			= "Authenticatie mislukt";
262
	$l_loginfailed			= "Authenticatie mislukt";
Line 287... Line 287...
287
	$l_reply_6			= "Your authorized connexion time has been reached";
287
	$l_reply_6			= "Your authorized connexion time has been reached";
288
	$l_online_time			= "Online tijd";
288
	$l_online_time			= "Online tijd";
289
	$l_remaining_time		= "Reterende tijd";
289
	$l_remaining_time		= "Reterende tijd";
290
	$l_uam_domain			= "Sites met open toegang : ";
290
	$l_uam_domain			= "Sites met open toegang : ";
291
	$l_sms_registration		= "Registreren per SMS";
291
	$l_sms_registration		= "Registreren per SMS";
292
	$l_email_registration 	= "Registreer per E-mail";
292
	$l_email_registration		= "Registreer per E-mail";
293
} else if ($Language === 'fr') {	// French
293
} else if ($Language === 'fr') {	// French
294
	$l_ChilliError			= "L'authentification doit être réussie sur le portail captif.";
294
	$l_ChilliError			= "L'authentification doit être réussie sur le portail captif.";
295
	$l_login			= "Authentification réussie.<HR>La fermeture de cette fenêtre interrompt votre session.";
295
	$l_login			= "Authentification réussie.<HR>La fermeture de cette fenêtre interrompt votre session.";
296
	$l_logout			= "Fermeture de la session";
296
	$l_logout			= "Fermeture de la session";
297
	$l_loginfailed			= "Echec d'authentification";
297
	$l_loginfailed			= "Echec d'authentification";
Line 322... Line 322...
322
	$l_reply_6			= "Votre durée de connexion autorisée a été atteinte";
322
	$l_reply_6			= "Votre durée de connexion autorisée a été atteinte";
323
	$l_online_time			= "Temps de connexion";
323
	$l_online_time			= "Temps de connexion";
324
	$l_remaining_time		= "Temps restant";
324
	$l_remaining_time		= "Temps restant";
325
	$l_uam_domain			= "Sites en accès libre : ";
325
	$l_uam_domain			= "Sites en accès libre : ";
326
	$l_sms_registration		= "S'inscrire par SMS";
326
	$l_sms_registration		= "S'inscrire par SMS";
327
	$l_email_registration 	= "S'incrire pae E-mail";
327
	$l_email_registration		= "S'incrire par E-mail";
328
} else {				// English
328
} else {				// English
329
	$l_ChilliError			= "The authentication must be successful through the captive portal service.";
329
	$l_ChilliError			= "The authentication must be successful through the captive portal service.";
330
	$l_login			= "Successful authentication.<HR>Closing this window interrupts your session";
330
	$l_login			= "Successful authentication.<HR>Closing this window interrupts your session";
331
	$l_logout			= "Closing connection";
331
	$l_logout			= "Closing connection";
332
	$l_loginfailed			= "Authentication Failed";
332
	$l_loginfailed			= "Authentication Failed";
Line 357... Line 357...
357
	$l_reply_6			= "Your authorized connexion time has been reached";
357
	$l_reply_6			= "Your authorized connexion time has been reached";
358
	$l_online_time			= "Online time";
358
	$l_online_time			= "Online time";
359
	$l_remaining_time		= "Remaining time";
359
	$l_remaining_time		= "Remaining time";
360
	$l_uam_domain			= "Open access websites : ";
360
	$l_uam_domain			= "Open access websites : ";
361
	$l_sms_registration		= "Register by SMS";
361
	$l_sms_registration		= "Register by SMS";
362
	$l_email_registration 	= "Register by E-mail";
362
	$l_email_registration		= "Register by E-mail";
363
}
363
}
364
 
364
 
365
# If HTTPS not use, tell it's wrong
365
# If HTTPS not use, tell it's wrong
366
if (($conf['HTTPS_LOGIN'] === 'on') && ((!isset($_SERVER['HTTPS'])) || (empty($_SERVER['HTTPS'])) || ($_SERVER['HTTPS'] === 'off'))) {
366
if (($conf['HTTPS_LOGIN'] === 'on') && ((!isset($_SERVER['HTTPS'])) || (empty($_SERVER['HTTPS'])) || ($_SERVER['HTTPS'] === 'off'))) {
367
	// Cleaning the cache
367
	// Cleaning the cache
Line 501... Line 501...
501
//////////////////////////////////////////////////////////////////
501
//////////////////////////////////////////////////////////////////
502
//$result = 5;     // = 1/2/3/4/5 
502
//$result = 5;     // = 1/2/3/4/5 
503
// reply is a displayed sentence
503
// reply is a displayed sentence
504
//$reply = 'dsfsdfsdfdsf';    //  = ''/'Incorrect user/password'
504
//$reply = 'dsfsdfsdfdsf';    //  = ''/'Incorrect user/password'
505
//$service_SMS_status = true;    // = true/false
505
//$service_SMS_status = true;    // = true/false
-
 
506
//$service_Email_status = true;    // = true/false
506
// test of domain Allowed
507
// test of domain Allowed
507
//////////////////////////////////////////////////////////////////
508
//////////////////////////////////////////////////////////////////
508
 
509
 
509
// Cleaning the cache
510
// Cleaning the cache
510
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
511
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
Line 652... Line 653...
652
						<?php if ($service_SMS_status): ?>
653
						<?php if ($service_SMS_status): ?>
653
							<div class= "row sms_registration">
654
							<div class= "row sms_registration">
654
								<a href="sms_registration.php"><?= $l_sms_registration ?></a>
655
								<a href="sms_registration.php"><?= $l_sms_registration ?></a>
655
							</div>
656
							</div>
656
						<?php endif; ?>
657
						<?php endif; ?>
-
 
658
						<?php if ($service_Email_status): ?>
-
 
659
							<div class= "row sms_registration">
-
 
660
								<a href="email_registration_front.php"><?= $l_email_registration ?></a>
-
 
661
							</div>
-
 
662
						<?php endif; ?>
657
					</form>
663
					</form>
658
				</div>
664
				</div>
659
			</div>
665
			</div>
660
		</div>
666
		</div>
661
			<div class="row boite-info-spacing">
667
			<div class="row boite-info-spacing">