Subversion Repositories ALCASAR

Rev

Rev 364 | Rev 399 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 364 Rev 369
Line 1... Line 1...
1
<html>
1
<html>
2
<?
2
<?
3
$private_ip = "192.168.182.1";
3
$private_ip = "192.168.180.1";
4
$network_pb = False;
4
$network_pb = False;
5
$direct_access = False;
5
$direct_access = False;
6
$diagnostic = "eth0 link down";
6
$diagnostic = "eth0 link down";
7
$remote_ip = ($_SERVER['REMOTE_ADDR']);
7
$remote_ip = ($_SERVER['REMOTE_ADDR']);
8
$tab = array();$user = array();
8
$tab = array();$user = array();
Line 15... Line 15...
15
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
15
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
16
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
16
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
17
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
17
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
18
if($Language == 'fr'){
18
if($Language == 'fr'){
19
  $l_access_denied = "ACC&Egrave;S REFUS&Eacute;";
19
  $l_access_denied = "ACC&Egrave;S REFUS&Eacute;";
20
  $l_access_controled = "ACC&Egrave;S CONTROL&Eacute;";
20
  $l_access_welcome = "Bienvenu sur ALCASAR";
21
  $l_access_unavailable = "ACC&Egrave;S INDISPONIBLE";
21
  $l_access_unavailable = "ACC&Egrave;S INDISPONIBLE";
22
  $l_required_domain = "Site WEB demand&eacute;";
22
  $l_required_domain = "Site WEB demand&eacute;";
23
  $l_explain_acc_access = "Acc&egrave;s aux param&egrave;tres d'administration du portail. Vous devez poss&eacute;der un compte d'administration.";
23
  $l_explain_acc_access = "Ce centre permet d'administrer le portail. Vous devez poss&eacute;der un compte d'administration.";
24
  $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.";
24
  $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.";
25
  $l_explain_net_pb = "Votre portail d&eacute;tecte que l'acc&egrave;s &agrave; Internet est indisponible.";
25
  $l_explain_net_pb = "Votre portail d&eacute;tecte que l'acc&egrave;s &agrave; Internet est indisponible.";
26
  $l_contact_access_deny = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
26
  $l_contact_access_deny = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
27
  $l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information";
27
  $l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information";
28
  $l_welcome = "Bienvenue sur la page d'accueil du portail ALCASAR";
28
  $l_welcome = "Page principal de votre portail captif";
29
  $l_acc_access = "<a href=\"https://$private_ip/acc\">Acc&eacute;der au centre de gestion (ALCASAR Control Center)</A>";
29
  $l_acc_access = "<a href=\"https://$private_ip/acc\">Acc&eacute;s au centre de gestion (ALCASAR Control Center)</A>";
-
 
30
  if ($user[4] == "0") {
-
 
31
	  $l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre syst&egrave;me";
30
  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">D&eacute;connexion</A>";
32
	  $l_logout = "<a href=\"http://www.google.fr\">Ouvrir une session Internet</A>";}
-
 
33
  else {
31
  if ($user[4] == "0") {$l_logout_explain = "Aucun usager n'est connect&eacute; sur cet &eacute;quipement";} else {$l_logout_explain = "Ferme la session de l'usager : <b>$user[5]</b>";}
34
	  $l_logout_explain = "Ferme la session de l'usager : <b>$user[5]</b>";
-
 
35
	  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">D&eacute;connexion</A>";}
32
  $l_password_change = "<a href=\"https://$private_ip/pass\">Changer votre mot de passe</A>";
36
  $l_password_change = "<a href=\"https://$private_ip/pass\">Changer votre mot de passe</A>";
33
  $l_password_change_explain = "Vous redirige sur la pages de changement du mot de passe de votre compte d'acc&egrave;s &agrave; internet.";
37
  $l_password_change_explain = "Vous devez poss&eacute;der un compte de consultation Internet.";
34
  $l_back_page = "<a href=\"javascript:history.back()\">Page pr&eacute;c&eacute;dente</a>";
38
  $l_back_page = "<a href=\"javascript:history.back()\">Page pr&eacute;c&eacute;dente</a>";
35
}
39
}
36
else {
40
else {
37
  $l_access_denied = "ACCESS DENIED";
41
  $l_access_denied = "ACCESS DENIED";
38
  $l_access_controled = "ACESS CONTROLED";
42
  $l_access_welcome = "Welcome on ALCASAR";
39
  $l_access_unavailable = "ACCESS UNAVAILABLE";
43
  $l_access_unavailable = "ACCESS UNAVAILABLE";
40
  $l_required_domain = "Required WEB site";
44
  $l_required_domain = "Required WEB site";
41
  $l_explain_acc_access = "Access to the ALCASAR Control Center. You must have an administrative login and password";
45
  $l_explain_acc_access = "This center control the portal. You must have an administrative account.";
42
  $l_explain_access_deny = "Your portal has just detected that the Internet access is down";
46
  $l_explain_access_deny = "Your portal has just detected that the Internet access is down";
43
  $l_explain_net_pb = "Your portal has just detected that the Internet access is down";
47
  $l_explain_net_pb = "Your portal has just detected that the Internet access is down";
44
  $l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
48
  $l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
45
  $l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
49
  $l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
46
  $l_welcome = "Welcome on the captive portal ALCASAR";
50
  $l_welcome = "Your captive portal main page";
47
  $l_acc_access = "<a href=\"https://$private_ip/acc\">go to the ALCASAR Control Center (ACC)</A>";
51
  $l_acc_access = "<a href=\"https://$private_ip/acc\">Access to the ALCASAR Control Center</A>";
-
 
52
  if ($user[4] == "0") {
-
 
53
	  $l_logout_explain = "No Internet consultation session is actualy open on your system";
48
  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">Loging off</A>";
54
	  $l_logout = "<a href=\"http://www.google.fr\">Open an Internet session</A>";}
-
 
55
  else {
49
  $l_logout_explain = "Logoff if your session is open.";
56
	  $l_logout_explain = "Close the session of the user : <b>$user[5]</b>";
-
 
57
	  $l_logout = "<a href=\"http://$private_ip:3990/logoff\">Logoff</A>";}
50
  $l_paasword_change = "<a href=\"https://$private_ip/pass\">Change your password</A>";
58
  $l_password_change = "<a href=\"https://$private_ip/pass\">Change your password</A>";
51
  $l_password_change_explain = "Redirects you to the password change's page of your internet access account.";
59
  $l_password_change_explain = "You should already have an Internet access account.";
52
  $l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
60
  $l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
53
}
61
}
54
$l_title = ($direct_access ? $l_access_controled : ($network_pb ? $l_access_unavailable : $l_access_denied));
62
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
55
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
63
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
56
 
64
 
57
echo "<head><title>ALCASAR - $l_title";
65
echo "<head><title>ALCASAR - $l_title";
58
?>
66
?>
59
	</title>
67
	</title>
Line 83... Line 91...
83
		<DIV id="contenu_acces">
91
		<DIV id="contenu_acces">
84
			<DIV id="box_url">
92
			<DIV id="box_url">
85
				<? if (! $direct_access){echo "$l_required_domain : $_SERVER[HTTP_HOST]";}?>
93
				<? if (! $direct_access){echo "$l_required_domain : $_SERVER[HTTP_HOST]";}?>
86
			</DIV>
94
			</DIV>
87
<? if ($direct_access){
95
<? if ($direct_access){
88
	echo "		<DIV id=\"box_bienvenue\">
96
	echo "	<DIV id=\"box_bienvenue\">
89
				$l_welcome
97
				$l_welcome
90
			</DIV>
98
			</DIV>
91
			<DIV class=\"box_menu_courte\" id=\"box_1\">
99
			<DIV class=\"box_menu_courte\" id=\"box_1\">
92
				<IMG src=\"images/cle.png\">
100
				<IMG src=\"images/cle.png\">
93
				<SPAN>$l_password_change</SPAN>
101
				<SPAN>$l_password_change</SPAN>
94
				<P>$l_password_change_explain</P>
102
				<P>$l_password_change_explain</P>
95
			</DIV>
103
			</DIV>";
-
 
104
		if ($user[4] == "0") {
-
 
105
			echo "
-
 
106
			<DIV class=\"box_menu_courte\" id=\"box_2\">
-
 
107
			<SPAN>";
-
 
108
			if (! $network_pb) { echo "$l_logout";}
-
 
109
			echo " </SPAN>
-
 
110
				<IMG src=\"images/globe_acces.png\">
-
 
111
				<P>$l_logout_explain</P> 
-
 
112
			</DIV>";}
-
 
113
			else {
-
 
114
			echo "
96
			<DIV class=\"box_menu_courte\" id=\"box_2\">
115
			<DIV class=\"box_menu_courte\" id=\"box_2\">
97
				<SPAN>$l_logout</SPAN>
116
				<SPAN>$l_logout</SPAN>
98
				<IMG src=\"images/globe.png\">
117
				<IMG src=\"images/globe.png\">
99
				<P>$l_logout_explain</P> 
118
				<P>$l_logout_explain</P> 
100
				</DIV>
119
			</DIV>";}			
101
			<DIV class=\"box_menu_large\" id=\"box_3\">
120
	echo "	<DIV class=\"box_menu_large\" id=\"box_3\">
102
				<SPAN>$l_acc_access</SPAN>
121
				<SPAN>$l_acc_access</SPAN>
103
				<IMG src=\"images/logo-alcasar.png\">
122
				<IMG src=\"images/logo-alcasar.png\">
104
				<P>$l_explain</P>
123
				<P>$l_explain</P>
105
			</DIV>";}
124
			</DIV>";}
106
	else {echo "
125
	else {echo "