Subversion Repositories ALCASAR

Rev

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

Rev 2239 Rev 2250
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: intercept.php 2239 2017-05-20 21:22:48Z tom.houdayer $
2
# $Id: intercept.php 2250 2017-05-22 22:00:03Z tom.houdayer $
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
 
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
-
 
67
$service_SMS_status = false;
-
 
68
 
66
# Our own path
69
// Our own path
67
$loginpath   = htmlspecialchars($_SERVER['PHP_SELF']);
70
$loginpath   = htmlspecialchars($_SERVER['PHP_SELF']);
68
$alcasarpath = 'http://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'];
71
$alcasarpath = 'http://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'];
69
$statuspath  = $alcasarpath.'/status.php';
72
$statuspath  = $alcasarpath.'/status.php';
70
 
73
 
71
# Choice of language
74
// Choice of language
72
$Language = 'en';
75
$Language = 'en';
73
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
76
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
74
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
77
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
75
	$Language = strtolower(substr(chop($Langue[0]),0,2));
78
	$Language = strtolower(substr(chop($Langue[0]),0,2));
76
}
79
}
77
if ($Language === 'es') {		// Spanish
80
if ($Language === 'es') {		// Spanish
78
	$l_ChilliError			= "La autenticación debe ser un éxito a través del servicio de portal cautivo.";
81
	$l_ChilliError			= "La autenticación debe ser un éxito a través del servicio de portal cautivo.";
Line 171... Line 174...
171
	$l_reply_6			= "已经到达您的允许连接时间";
174
	$l_reply_6			= "已经到达您的允许连接时间";
172
	$l_online_time			= "在线时间";
175
	$l_online_time			= "在线时间";
173
	$l_remaining_time		= "剩余时间";
176
	$l_remaining_time		= "剩余时间";
174
	$l_uam_domain			= "授权网站 : ";
177
	$l_uam_domain			= "授权网站 : ";
175
	$l_autoregistration		= "短信注册";
178
	$l_autoregistration		= "短信注册";
176
} else if($Language === 'ar') {		// Arabic
179
} else if ($Language === 'ar') {	// Arabic
177
	$l_ChilliError			= "يجب نجاح المصادقة على البوابة الأسيرة";
180
	$l_ChilliError			= "يجب نجاح المصادقة على البوابة الأسيرة";
178
	$l_login			= "إغلاق هذه النافذة يقطع دورة عملك";
181
	$l_login			= "إغلاق هذه النافذة يقطع دورة عملك";
179
	$l_logout			= "إغلاق الدورة";
182
	$l_logout			= "إغلاق الدورة";
180
	$l_loginfailed			= "فشل المصادقة";
183
	$l_loginfailed			= "فشل المصادقة";
181
	$l_loggingin			= "التعريف على البوابة الأسيرة";
184
	$l_loggingin			= "التعريف على البوابة الأسيرة";
Line 204... Line 207...
204
	$l_reply_6			= "استكملت مذة الإتصال المسموحة";
207
	$l_reply_6			= "استكملت مذة الإتصال المسموحة";
205
	$l_online_time			= "مذة الإتصال";
208
	$l_online_time			= "مذة الإتصال";
206
	$l_remaining_time		= "الوقت المتبق";
209
	$l_remaining_time		= "الوقت المتبق";
207
	$l_uam_domain			= ":المواقع المسموحة ";
210
	$l_uam_domain			= ":المواقع المسموحة ";
208
	$l_autoregistration		= "تسجيل ذاتي (SMS)";
211
	$l_autoregistration		= "تسجيل ذاتي (SMS)";
209
} else if($Language === 'de') {		// German
212
} else if ($Language === 'de') {	// German
210
	$l_ChilliError			= "Die Authentifizierung ist erfolgreich durch die Nutzung des Portals erfolgt.";
213
	$l_ChilliError			= "Die Authentifizierung ist erfolgreich durch die Nutzung des Portals erfolgt.";
211
	$l_login			= "Erfolgreiche Authentifizierung.<HR>Schlißen dieses fensters unterbricht die sitzung";
214
	$l_login			= "Erfolgreiche Authentifizierung.<HR>Schlißen dieses fensters unterbricht die sitzung";
212
	$l_logout			= "Beenden der Verbindung";
215
	$l_logout			= "Beenden der Verbindung";
213
	$l_loginfailed			= "Authentifizierungsfehler Eigenverbrauch";
216
	$l_loginfailed			= "Authentifizierungsfehler Eigenverbrauch";
214
	$l_loggingin			= "Kennzeichnung auf dem Eigenverbrauch";
217
	$l_loggingin			= "Kennzeichnung auf dem Eigenverbrauch";
Line 237... Line 240...
237
	$l_reply_6			= "Your authorized connexion time has been reached";
240
	$l_reply_6			= "Your authorized connexion time has been reached";
238
	$l_online_time			= "Online-zeit";
241
	$l_online_time			= "Online-zeit";
239
	$l_remaining_time		= "Restzeit";
242
	$l_remaining_time		= "Restzeit";
240
	$l_uam_domain			= "Autorisierten websites : ";
243
	$l_uam_domain			= "Autorisierten websites : ";
241
	$l_autoregistration		= "Automatische registrierung";
244
	$l_autoregistration		= "Automatische registrierung";
242
} else if($Language === 'nl') {		// Dutch
245
} else if ($Language === 'nl') {	// Dutch
243
	$l_ChilliError			= "De authenticatie moet een succes worden via de captive portal dienst.";
246
	$l_ChilliError			= "De authenticatie moet een succes worden via de captive portal dienst.";
244
	$l_login			= "Succesvolle authenticatie.<HR>Dit venster te sluiten onderbreekt uw sessie.";
247
	$l_login			= "Succesvolle authenticatie.<HR>Dit venster te sluiten onderbreekt uw sessie.";
245
	$l_logout			= "Slotkoers verbinding";
248
	$l_logout			= "Slotkoers verbinding";
246
	$l_loginfailed			= "Authenticatie mislukt";
249
	$l_loginfailed			= "Authenticatie mislukt";
247
	$l_loggingin			= "Identificatie van de captive-portaal";
250
	$l_loggingin			= "Identificatie van de captive-portaal";
Line 270... Line 273...
270
	$l_reply_6			= "Your authorized connexion time has been reached";
273
	$l_reply_6			= "Your authorized connexion time has been reached";
271
	$l_online_time			= "Online tijd";
274
	$l_online_time			= "Online tijd";
272
	$l_remaining_time		= "Reterende tijd";
275
	$l_remaining_time		= "Reterende tijd";
273
	$l_uam_domain			= "Geautoriseerde website : ";
276
	$l_uam_domain			= "Geautoriseerde website : ";
274
	$l_autoregistration		= "Automatische registratie";
277
	$l_autoregistration		= "Automatische registratie";
275
} else if($Language === 'fr') {		// French
278
} else if ($Language === 'fr') {	// French
276
	$l_ChilliError			= "L'authentification doit être réussie sur le portail captif.";
279
	$l_ChilliError			= "L'authentification doit être réussie sur le portail captif.";
277
	$l_login			= "Authentification réussie.<HR>La fermeture de cette fenêtre interrompt votre session.";
280
	$l_login			= "Authentification réussie.<HR>La fermeture de cette fenêtre interrompt votre session.";
278
	$l_logout			= "Fermeture de la session";
281
	$l_logout			= "Fermeture de la session";
279
	$l_loginfailed			= "Echec d'authentification";
282
	$l_loginfailed			= "Echec d'authentification";
280
	$l_loggingin			= "Identification sur le portail captif";
283
	$l_loggingin			= "Identification sur le portail captif";
Line 587... Line 590...
587
					<td align="right"><?= $l_password ?></td>
590
					<td align="right"><?= $l_password ?></td>
588
					<td align="left"><input maxLength="32" type="password" name="Password" autocomplete="off"></td>
591
					<td align="left"><input maxLength="32" type="password" name="Password" autocomplete="off"></td>
589
				</tr>
592
				</tr>
590
				<tr>
593
				<tr>
591
					<td height="23" align="left"><input value="<?= $l_boutonO ?>" type="submit" name="button"></td>
594
					<td height="23" align="left"><input value="<?= $l_boutonO ?>" type="submit" name="button"></td>
592
					<?php
-
 
593
					$service_SMS_status = false;
-
 
594
					if ($service_SMS_status): ?>
595
					<?php if ($service_SMS_status): ?>
595
						<td><a href="./autoregistrationinfo.php"><?= $l_autoregistration ?></a></td>
596
						<td><a href="autoregistrationinfo.php"><?= $l_autoregistration ?></a></td>
596
					<?php endif; ?>
597
					<?php endif; ?>
597
				</tr>
598
				</tr>
598
			</table>
599
			</table>
599
		</form>
600
		</form>
600
		<table id="boite-info" cellSpacing="0" cellPadding="0" width="80%">
601
		<table id="boite-info" cellSpacing="0" cellPadding="0" width="80%">