Subversion Repositories ALCASAR

Rev

Rev 363 | Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
360 richard 1
<html>
2
<?
3
$private_ip = "192.168.182.1";
4
$network_pb = False;
5
$direct_access = False;
6
# on discrimine les accès directs sur Alcasar par rapport aux redirections
7
if (($_SERVER['HTTP_HOST'] == $private_ip) || ($_SERVER['HTTP_HOST'] == "alcasar")){$direct_access=True;}
8
# Choice of language
9
$Language = 'en';
10
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
11
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
12
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
13
if($Language == 'fr'){
14
  $l_access_denied = "ACC&Egrave;S REFUS&Eacute;";
15
  $l_access_controled = "ACC&Egrave;S CONTROL&Eacute;";
16
  $l_access_unavailable = "ACC&Egrave;S INDISPONIBLE";
17
  $l_required_domain = "Site WEB demand&eacute;";
18
  $l_explain_acc_access = "Acc&egrave;s aux param&egrave;tres d'administration du portail. Vous devez posséder un compte d'administration.";
19
  $l_explain_access_deny = "Vous tentez d'acc&eacute;der &agrave; une ressource dont le contenu est r&eacute;put&eacute; contenir des informations inappropri&eacute;es.";
20
  $l_explain_net_pb = "Votre portail d&eacute;tecte que l'acc&egrave;s &agrave; Internet est indisponible.";
21
  $l_contact_access_deny = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
22
  $l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information";
23
  $l_welcome = "Bienvenue sur la page d'accueil du portail ALCASAR";
24
  $l_acc_access = "<a href=\"https://$private_ip/acc\">Acc&eacute;der au centre de gestion (ALCASAR Control Center)</A>";
25
  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">D&eacute;connexion</A>";
26
  $l_logout_explain = "Vous permet de d&eacute;connectez une session ouverte.";
27
  $l_password_change = "<a href=\"https://$private_ip/pass\">Changer votre mot de passe</A>";
28
  $l_password_change_explain = "Vous redirige sur la pages de changement du mot de passe de votre compte d'acc&egrave;s &agrave; internet.";
29
  $l_back_page = "<a href=\"javascript:history.back()\">Page pr&eacute;c&eacute;dente</a>";
30
}
31
else {
32
  $l_access_denied = "ACCESS DENIED";
33
  $l_access_controled = "ACESS CONTROLED";
34
  $l_access_unavailable = "ACCESS UNAVAILABLE";
35
  $l_required_domain = "Required WEB site";
36
  $l_explain_acc_access = "Access to the ALCASAR Control Center. You must have an administrative login and password";
37
  $l_explain_access_deny = "Your portal has just detected that the Internet access is down";
38
  $l_explain_net_pb = "Your portal has just detected that the Internet access is down";
39
  $l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
40
  $l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
41
  $l_welcome = "Welcome on the captive portal ALCASAR";
42
  $l_acc_access = "<a href=\"https://$private_ip/acc\">go to the ALCASAR Control Center (ACC)</A>";
43
  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">Loging off</A>";
44
  $l_logout_explain = "Logoff if your session is open.";
45
  $l_paasword_change = "<a href=\"https://$private_ip/pass\">Change your password</A>";
46
  $l_password_change_explain = "Redirects you to the password change's page of your internet access account.";
47
  $l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
48
}
49
$l_title = ($direct_access ? $l_access_controled : ($network_pb ? $l_access_unavailable : $l_access_denied));
50
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
51
 
52
echo "<head><title>ALCASAR - $l_title";
53
?>
54
	</title>
55
	<LINK rel=stylesheet type=text/css href="css/style_intercept.css">
56
</head>
57
 
58
	<BODY>
59
<?
60
if ($direct_access){
61
	echo "
62
		<DIV id=\"cadre_titre\" class=\"titre_controle\">
63
			<P id=\"acces_controle\" class=\"titre_controle\">$l_title</P>";
64
	}
65
else {
66
	echo"
67
		<DIV id=\"cadre_titre\" class=\"titre_refus\">
68
			<P id=\"acces_controle\" class=\"titre_refus\">$l_title</P>";
69
	}
70
?>
71
			<DIV id="boite_logo">
72
				<IMG src="images/organisme.png">
73
			</DIV>
74
		</DIV>
75
		<DIV id="contenu_acces">
76
			<DIV id="box_url">
77
				<? if (! $direct_access){echo "$l_required_domain : $_SERVER[HTTP_HOST]";}?>
78
			</DIV>
79
<? if ($direct_access){
80
	echo "
81
			<DIV id=\"box_bienvenue\">
82
				$l_welcome
83
			</DIV>
84
			<DIV class=\"box_menu_courte\" id=\"box_1\">
85
				<IMG src=\"images/cle.png\">
86
				<SPAN>$l_password_change</SPAN>
87
				<P>$l_password_change_explain</P>
88
			</DIV>
89
			<DIV class=\"box_menu_courte\" id=\"box_2\">
90
				<SPAN>$l_logout</SPAN>
91
				<IMG src=\"images/globe.png\">
92
				<P>$l_logout_explain</P> 
93
			</DIV>
94
			<DIV class=\"box_menu_large\" id=\"box_3\">
95
				<SPAN>$l_acc_access</SPAN>
96
				<IMG src=\"images/logo-alcasar.png\">
97
				<P>$l_explain</P>
98
			</DIV>";}
99
	else {echo "
100
			<DIV id=\"box_refuse\">
101
				<img src=\"images/interdit.png\">
102
				<P>$l_explain</P>
103
			</DIV>
104
			<DIV id=\"liens_redir\">
105
				<P>$l_back_page</P>
106
			</DIV>";}?>
107
		</DIV>
108
	</BODY>
109
</html>