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ÈS REFUSÉ";
|
323 |
richard |
13 |
$l_access_controled = "ACCÈS CONTRÔLÉ";
|
318 |
richard |
14 |
$l_required_domain = "Site WEB demandé";
|
|
|
15 |
$l_explain = "Vous tentez d'accéder à une ressource dont le contenu est réputé contenir des informations inappropriées.";
|
|
|
16 |
$l_contact = "Contactez le responsable de la sécurité (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
|
323 |
richard |
17 |
$l_welcome = "Bienvenue sur le portail captif ALCASAR.<br>Vous pouvez : ";
|
|
|
18 |
$l_acc_access = "<a href=\"https://i$private_ip/acc\">Accéder au centre de gestion (ALCASAR Control Center)</A>";
|
|
|
19 |
$l_internet_access = "<a href=\"https://$private_ip/intercept.php\">Tester l'interception de l'accès à Internet</A>";
|
318 |
richard |
20 |
}
|
|
|
21 |
else {
|
|
|
22 |
$l_access_denied = "ACCESS DENIED";
|
323 |
richard |
23 |
$l_access_controled = "ACCESS CONTROLED";
|
318 |
richard |
24 |
$l_required_domain = "Required WEB site";
|
|
|
25 |
$l_explain = "Your portal has just detected that the Internet access is down";
|
|
|
26 |
$l_contact = "Contact your Internet provider responsive for more information";
|
323 |
richard |
27 |
$l_welcome = "Welcome on the captive portal ALCASAR.<br>You can connect: ";
|
|
|
28 |
$l_acc_access = "<a href=\"https://$private_ip/acc\">to the ALCASAR Control Center (ACC)</A>";
|
|
|
29 |
$l_internet_access = "<a href=\"https://$private_ip/intercept.php\">Internet intercept page for Test</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>
|
323 |
richard |
43 |
<? if ($direct_access == "true"){echo "<b>$l_access_controled</b>";} 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>
|
|
|
49 |
<b><? echo "$l_required_domain : $_SERVER[HTTP_HOST]";?></b>
|
|
|
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>
|
|
|
55 |
<img src="images/logo-alcasar.png">
|
|
|
56 |
<BR><CENTER>ALCASAR</CENTER>
|
|
|
57 |
</td>
|
323 |
richard |
58 |
<td width=550 bgcolor=#FFFFFF valign=center>
|
318 |
richard |
59 |
<font face=arial,helvetica color=black>
|
|
|
60 |
<font size=3>
|
|
|
61 |
<?
|
323 |
richard |
62 |
if ($direct_access == "true"){
|
|
|
63 |
echo "<center>$l_welcome</center> <br><li> $l_acc_access <li> $l_internet_access";}
|
318 |
richard |
64 |
else {echo "$l_explain <br><br> $l_contact";}
|
|
|
65 |
?>
|
|
|
66 |
</td>
|
|
|
67 |
</tr>
|
|
|
68 |
</table>
|
|
|
69 |
</body>
|
|
|
70 |
</html>
|