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;";
13
  $l_required_domain = "Site WEB demand&eacute;";
14
  $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.";
15
  $l_contact = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
346 richard 16
  $l_welcome = "Bienvenue sur la page d'accueil du portail.<br>Actions possibles : ";
329 richard 17
  $l_acc_access = "<a href=\"https://$private_ip/acc\">Acc&eacute;der au centre de gestion (ALCASAR Control Center)</A>";
340 richard 18
  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">Vous d&eacute;connecter si votre session est ouverte</A>";
346 richard 19
  $l_password_change = "<a href=\"https://$private_ip/pass\">Changer votre mot de passe</A>";
318 richard 20
}
21
else {
22
  $l_access_denied = "ACCESS DENIED";
23
  $l_required_domain = "Required WEB site";
24
  $l_explain = "Your portal has just detected that the Internet access is down";
25
  $l_contact = "Contact your Internet provider responsive for more information";
346 richard 26
  $l_welcome = "Welcome on the captive portal ALCASAR.<br>Possible actions : ";
27
  $l_acc_access = "<a href=\"https://$private_ip/acc\">go to the ALCASAR Control Center (ACC)</A>";
340 richard 28
  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">Logoff if your session is open</A>";
346 richard 29
  $l_paasword_change = "<a href=\"https://$private_ip/pass\">Change your password</A>";
318 richard 30
}
31
?>
32
<head>
323 richard 33
<title>
34
<? if ($direct_access == "true"){echo "ALCASAR - $l_access_controled";} else {echo "ALCASAR - $l_access_denied";}?>
35
</title>
318 richard 36
</head>
37
<body bgcolor=#FFFFFF>
38
<center>
39
<table border=0 cellspacing=0 cellpadding=2 height=540 width=700>
40
<tr>
41
	<td colspan=2 bgcolor=#FEA700 height=100 align=center>
42
	<font face=arial,helvetica size=6>
346 richard 43
	<? if ($direct_access == "true"){echo "<img height=\"90\" src=\"images/titre-alcasar.png\">";} else {echo "<b>$l_access_denied</b>";}?>
318 richard 44
	</td>
45
</tr>
46
<tr>
47
	<td colspan=2 bgcolor=#FFFACD height=30 align=right>
48
	<font face=arial,helvetica size=3 color=black>
346 richard 49
		<b><? if ($direct_access != "true"){echo "$l_required_domain : $_SERVER[HTTP_HOST]";}?></b>
318 richard 50
	</td>
51
</tr>
52
<tr>
53
	<td align=center valign=bottom width=150 bgcolor=#B0C4DE>
54
	<font face=arial,helvetica size=1 color=black>
340 richard 55
	<img height="150" src="images/logo-alcasar.png">
318 richard 56
</td>
323 richard 57
	<td width=550 bgcolor=#FFFFFF valign=center>
318 richard 58
	<font face=arial,helvetica color=black>
59
	<font size=3>
60
<?
323 richard 61
if ($direct_access == "true"){
346 richard 62
	echo "<center>$l_welcome</center> <br> <li> $l_logout <li> $l_password_change <li> $l_acc_access";}
318 richard 63
	else {echo "$l_explain <br><br> $l_contact";}
64
?>
65
	</td>
66
</tr>
67
</table>
68
</body>
69
</html>