Subversion Repositories ALCASAR

Rev

Rev 329 | Blame | Last modification | View Log

<html>
<?
# on discrimine les accès directs sur Alcasar par rapport aux redirections
$private_ip = "192.168.182.1";
if (($_SERVER['HTTP_HOST'] == $private_ip) || ($_SERVER['HTTP_HOST'] == "alcasar")){$direct_access="true";} else {$direct_access="false";}
# Choice of language
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
  $l_access_denied = "ACC&Egrave;S REFUS&Eacute;";
  $l_access_controled = "ACC&Egrave;S CONTR&Ocirc;L&Eacute;";
  $l_required_domain = "Site WEB demand&eacute;";
  $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.";
  $l_contact = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
  $l_welcome = "Bienvenue sur le portail captif ALCASAR.<br>Vous pouvez : ";
  $l_acc_access = "<a href=\"https://$private_ip/acc\">Acc&eacute;der au centre de gestion (ALCASAR Control Center)</A>";
  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">Vous d&eacute;connecter si votre session est ouverte</A>";
  $l_internet_access = "<a href=\"https://$private_ip/intercept.php\">Tester l'interception de l'acc&egrave;s &agrave; Internet</A>";
}
else {
  $l_access_denied = "ACCESS DENIED";
  $l_access_controled = "ACCESS CONTROLED";
  $l_required_domain = "Required WEB site";
  $l_explain = "Your portal has just detected that the Internet access is down";
  $l_contact = "Contact your Internet provider responsive for more information";
  $l_welcome = "Welcome on the captive portal ALCASAR.<br>You can connect: ";
  $l_acc_access = "<a href=\"https://$private_ip/acc\">to the ALCASAR Control Center (ACC)</A>";
  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">Logoff if your session is open</A>";
  $l_internet_access = "<a href=\"https://$private_ip/intercept.php\">Internet intercept page for Test</A>";
}
?>
<head>
<title>
<? if ($direct_access == "true"){echo "ALCASAR - $l_access_controled";} else {echo "ALCASAR - $l_access_denied";}?>
</title>
</head>
<body bgcolor=#FFFFFF>
<center>
<table border=0 cellspacing=0 cellpadding=2 height=540 width=700>
<tr>
        <td colspan=2 bgcolor=#FEA700 height=100 align=center>
        <font face=arial,helvetica size=6>
        <? if ($direct_access == "true"){echo "<b>$l_access_controled</b>";} else {echo "<b>$l_access_denied</b>";}?>
        </td>
</tr>
<tr>
        <td colspan=2 bgcolor=#FFFACD height=30 align=right>
        <font face=arial,helvetica size=3 color=black>
                <b><? echo "$l_required_domain : $_SERVER[HTTP_HOST]";?></b>
        </td>
</tr>
<tr>
        <td align=center valign=bottom width=150 bgcolor=#B0C4DE>
        <font face=arial,helvetica size=1 color=black>
        <img height="150" src="images/logo-alcasar.png">
</td>
        <td width=550 bgcolor=#FFFFFF valign=center>
        <font face=arial,helvetica color=black>
        <font size=3>
<?
if ($direct_access == "true"){
        echo "<center>$l_welcome</center> <br><li> $l_acc_access <li> $l_logout <li> $l_internet_access";}
        else {echo "$l_explain <br><br> $l_contact";}
?>
        </td>
</tr>
</table>
</body>
</html>