Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
318 richard 1
<html>
2
<?
323 richard 3
# on discrimine les accès directs sur Alcasar par rapport aux redirections
318 richard 4
$private_ip = "192.168.182.1";
323 richard 5
if (($_SERVER['HTTP_HOST'] == $private_ip) || ($_SERVER['HTTP_HOST'] == "alcasar")){$direct_access="true";} else {$direct_access="false";}
318 richard 6
# Choice of language
7
$Language = 'en';
8
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
9
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
10
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
11
if($Language == 'fr'){
12
  $l_access_denied = "ACC&Egrave;S REFUS&Eacute;";
323 richard 13
  $l_access_controled = "ACC&Egrave;S CONTR&Ocirc;L&Eacute;";
318 richard 14
  $l_required_domain = "Site WEB demand&eacute;";
15
  $l_explain = "Vous tentez d'acc&eacute;der &agrave; une ressource dont le contenu est r&eacute;put&eacute; contenir des informations inappropri&eacute;es.";
16
  $l_contact = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
323 richard 17
  $l_welcome = "Bienvenue sur le portail captif ALCASAR.<br>Vous pouvez : ";
329 richard 18
  $l_acc_access = "<a href=\"https://$private_ip/acc\">Acc&eacute;der au centre de gestion (ALCASAR Control Center)</A>";
340 richard 19
  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">Vous d&eacute;connecter si votre session est ouverte</A>";
323 richard 20
  $l_internet_access = "<a href=\"https://$private_ip/intercept.php\">Tester l'interception de l'acc&egrave;s &agrave; Internet</A>";
318 richard 21
}
22
else {
23
  $l_access_denied = "ACCESS DENIED";
323 richard 24
  $l_access_controled = "ACCESS CONTROLED";
318 richard 25
  $l_required_domain = "Required WEB site";
26
  $l_explain = "Your portal has just detected that the Internet access is down";
27
  $l_contact = "Contact your Internet provider responsive for more information";
323 richard 28
  $l_welcome = "Welcome on the captive portal ALCASAR.<br>You can connect: ";
29
  $l_acc_access = "<a href=\"https://$private_ip/acc\">to the ALCASAR Control Center (ACC)</A>";
340 richard 30
  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">Logoff if your session is open</A>";
323 richard 31
  $l_internet_access = "<a href=\"https://$private_ip/intercept.php\">Internet intercept page for Test</A>";
318 richard 32
}
33
?>
34
<head>
323 richard 35
<title>
36
<? if ($direct_access == "true"){echo "ALCASAR - $l_access_controled";} else {echo "ALCASAR - $l_access_denied";}?>
37
</title>
318 richard 38
</head>
39
<body bgcolor=#FFFFFF>
40
<center>
41
<table border=0 cellspacing=0 cellpadding=2 height=540 width=700>
42
<tr>
43
	<td colspan=2 bgcolor=#FEA700 height=100 align=center>
44
	<font face=arial,helvetica size=6>
323 richard 45
	<? if ($direct_access == "true"){echo "<b>$l_access_controled</b>";} else {echo "<b>$l_access_denied</b>";}?>
318 richard 46
	</td>
47
</tr>
48
<tr>
49
	<td colspan=2 bgcolor=#FFFACD height=30 align=right>
50
	<font face=arial,helvetica size=3 color=black>
51
		<b><? echo "$l_required_domain : $_SERVER[HTTP_HOST]";?></b>
52
	</td>
53
</tr>
54
<tr>
55
	<td align=center valign=bottom width=150 bgcolor=#B0C4DE>
56
	<font face=arial,helvetica size=1 color=black>
340 richard 57
	<img height="150" src="images/logo-alcasar.png">
318 richard 58
</td>
323 richard 59
	<td width=550 bgcolor=#FFFFFF valign=center>
318 richard 60
	<font face=arial,helvetica color=black>
61
	<font size=3>
62
<?
323 richard 63
if ($direct_access == "true"){
340 richard 64
	echo "<center>$l_welcome</center> <br><li> $l_acc_access <li> $l_logout <li> $l_internet_access";}
318 richard 65
	else {echo "$l_explain <br><br> $l_contact";}
66
?>
67
	</td>
68
</tr>
69
</table>
70
</body>
71
</html>