Subversion Repositories ALCASAR

Rev

Rev 832 | Rev 922 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 832 Rev 912
1
<?php
1
<?php
2
$hostname = "alcasar";
2
$hostname = "alcasar";
3
$network_pb = False;
3
$network_pb = False;
4
$cert_add = "http://alcasar/certs";
4
$cert_add = "http://alcasar/certs";
5
$direct_access = False;
5
$direct_access = False;
6
$diagnostic = "can't contact the default router";
6
$diagnostic = "can't contact the default router";
7
$remote_ip = ($_SERVER['REMOTE_ADDR']);
7
$remote_ip = ($_SERVER['REMOTE_ADDR']);
8
$tab = array();$user = array();
8
$tab = array();$user = array();
9
$connection_history =  "";
9
$connection_history =  "";
10
$nb_connection_history = 3;
10
$nb_connection_history = 3;
11
 
11
 
12
# on discrimine les accès directs sur Alcasar par rapport aux redirections (blacklist ou pannes rso)
12
# on discrimine les accès directs sur Alcasar par rapport aux redirections (blacklist ou pannes rso)
13
if (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || preg_match ("/^alcasar/", $_SERVER['HTTP_HOST']) || preg_match ("/^$hostname/", $_SERVER['HTTP_HOST']))
13
if (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || preg_match ("/^alcasar/", $_SERVER['HTTP_HOST']) || preg_match ("/^$hostname/", $_SERVER['HTTP_HOST']))
14
	{
14
	{
15
	$direct_access=True;
15
	$direct_access=True;
16
	exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab);
16
	exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab);
17
	$user = explode (" ", $tab[0]);
17
	$user = explode (" ", $tab[0]);
18
	}
18
	}
19
#### Affichage des 3 dernières connexions de $user[5]
19
#### Affichage des 3 dernières connexions de $user[5]
20
function secondsToDuration($seconds = null){
20
function secondsToDuration($seconds = null){
21
	if ($seconds == null) return "";
21
	if ($seconds == null) return "";
22
 
22
 
23
	$temp = $seconds % 3600;
23
	$temp = $seconds % 3600;
24
	$time[0] = ( $seconds - $temp ) / 3600 ;	// hours
24
	$time[0] = ( $seconds - $temp ) / 3600 ;	// hours
25
	$time[2] = $temp % 60 ;				// seconds
25
	$time[2] = $temp % 60 ;				// seconds
26
	$time[1] = ( $temp - $time[2] ) / 60;		// minutes
26
	$time[1] = ( $temp - $time[2] ) / 60;		// minutes
27
	
27
	
28
	return $time[0]." h ".$time[1]." m ".$time[2]." s";
28
	return $time[0]." h ".$time[1]." m ".$time[2]." s";
29
}
29
}
30
 
30
 
31
$l_connected = "connected"; // a traduire (choix de la langue ci-dessous mais nécessitant de $connection_history)
31
$l_connected = "connected"; // a traduire (choix de la langue ci-dessous mais nécessitant de $connection_history)
32
// si on a pas d'accès à la bdd, la page s'affiche quand même correctement
32
// si on a pas d'accès à la bdd, la page s'affiche quand même correctement
33
if ((isset ($user[4])) && ($user[4] != "0")){
33
if ((isset ($user[4])) && ($user[4] != "0")){
34
	if ((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){
34
	if ((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){
35
		include_once("/etc/freeradius-web/config.php");
35
		include_once("/etc/freeradius-web/config.php");
36
		include_once("./acc/manager/lib/sql/drivers/mysql/functions.php");
36
		include_once("./acc/manager/lib/sql/drivers/mysql/functions.php");
37
		
37
		
38
		$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user[5]' ORDER BY AcctStartTime DESC LIMIT 0 , $nb_connection_history";
38
		$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user[5]' ORDER BY AcctStartTime DESC LIMIT 0 , $nb_connection_history";
39
		$link = @da_sql_pconnect($config); // on affiche pas les erreurs
39
		$link = @da_sql_pconnect($config); // on affiche pas les erreurs
40
		
40
		
41
		if ($link){
41
		if ($link){
42
			$res = @da_sql_query($link,$config,$sql); // on affiche pas les erreurs
42
			$res = @da_sql_query($link,$config,$sql); // on affiche pas les erreurs
43
			
43
			
44
			if ($res){
44
			if ($res){
45
				$connection_history.= "<ul>";
45
				$connection_history.= "<ul>";
46
				while(($row = @da_sql_fetch_array($res,$config))){
46
				while(($row = @da_sql_fetch_array($res,$config))){
47
					$connected = "";
47
					$connected = "";
48
					if ($row[acctstoptime] == "") $connected = " ($l_connected)";
48
					if ($row[acctstoptime] == "") $connected = " ($l_connected)";
49
					$connection_history.="<li title='$row[username] $row[acctstarttime] $row[acctstoptime] (".secondsToDuration($row[acctsessiontime]).")'>$row[acctstarttime] (".secondsToDuration($row[acctsessiontime]).") $connected</li>";
49
					$connection_history.="<li title='$row[username] $row[acctstarttime] $row[acctstoptime] (".secondsToDuration($row[acctsessiontime]).")'>$row[acctstarttime] (".secondsToDuration($row[acctsessiontime]).") $connected</li>";
50
				}
50
				}
51
				$connection_history.="</ul>";
51
				$connection_history.="</ul>";
52
			}
52
			}
53
		}
53
		}
54
	}
54
	}
55
}
55
}
56
####
56
####
57
 
57
 
58
# Choice of language
58
# Choice of language
59
$Language = 'en';
59
$Language = 'en';
60
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
60
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
61
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
61
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
62
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
62
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
63
if($Language == 'fr'){
63
if($Language == 'fr'){
64
  $l_access_denied = "ACC&Egrave;S REFUS&Eacute;";
64
  $l_access_denied = "ACC&Egrave;S REFUS&Eacute;";
65
  $l_access_welcome = "Bienvenue sur ALCASAR";
65
  $l_access_welcome = "Bienvenue sur ALCASAR";
66
  $l_access_unavailable = "ACC&Egrave;S INDISPONIBLE";
66
  $l_access_unavailable = "ACC&Egrave;S INDISPONIBLE";
67
  $l_required_domain = "Site WEB demand&eacute;";
67
  $l_required_domain = "Site WEB demand&eacute;";
68
  $l_explain_acc_access = "Le centre de gestion permet d'administrer le portail. Vous devez poss&eacute;der un compte d'administration ou de gestion pour y acc&eacute;der.";
68
  $l_explain_acc_access = "Le centre de gestion permet d'administrer le portail. Vous devez poss&eacute;der un compte d'administration ou de gestion pour y acc&eacute;der.";
69
  $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.";
69
  $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.";
70
  $l_explain_net_pb = "Votre portail d&eacute;tecte que l'acc&egrave;s &agrave; Internet est indisponible.";
70
  $l_explain_net_pb = "Votre portail d&eacute;tecte que l'acc&egrave;s &agrave; Internet est indisponible.";
71
  $l_contact_access_deny = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
71
  $l_contact_access_deny = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
72
  $l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information.";
72
  $l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information.";
73
  $l_welcome = "Page principale de votre portail captif";
73
  $l_welcome = "Page principale de votre portail captif";
74
  $l_acc_access = "<a href=\"https://$hostname/acc\">Acc&egrave;s au centre de gestion</a>";
74
  $l_acc_access = "<a href=\"https://$hostname/acc\">Acc&egrave;s au centre de gestion</a>";
75
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installer le certificat racine</a>";
75
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installer le certificat racine</a>";
76
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installation du certificat de l'autorit&eacute; racine d'ALCASAR</a>";
76
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Installation du certificat de l'autorit&eacute; racine d'ALCASAR</a>";
77
  $l_certif_explain = "Permet l'&eacute;change de donn&eacute;es s&eacute;curis&eacute;es entre votre station de consultation et le portail captif ALCASAR.<BR>Si ce certificat n'est pas enregistr&eacute; sur votre station de consultation, il est possible que des alertes de s&eacute;curit&eacute;s soient &eacute;mises par votre navigateur.<br><br>";
77
  $l_certif_explain = "Permet l'&eacute;change de donn&eacute;es s&eacute;curis&eacute;es entre votre station de consultation et le portail captif ALCASAR.<BR>Si ce certificat n'est pas enregistr&eacute; sur votre station de consultation, il est possible que des alertes de s&eacute;curit&eacute;s soient &eacute;mises par votre navigateur.<br><br>";
78
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
78
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
79
if ((isset ($user[4])) && ($user[4] == "0")) {
79
if ((isset ($user[4])) && ($user[4] == "0")) {
80
	  $l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre syst&egrave;me.";
80
	  $l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre syst&egrave;me.";
81
	  $l_logout = "<a href=\"http://www.google.fr\">Ouvrir une session Internet</a>";}
81
	  $l_logout = "<a href=\"http://www.google.fr\">Ouvrir une session Internet</a>";}
82
  else {
82
  else {
83
	  if ($user[5] != $user[0]) // authentication exception or not
83
	  if ($user[5] != $user[0]) // authentication exception or not
84
	  {
84
	  {
85
	  	$l_logout_explain = "Ferme la session de l'usager actuellement connect&eacute;. <br><br>Utilisateur connect&eacute; : <a href=\"http://$hostname:3990/logoff\" title=\"Deconnecter l'utilisateur $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history derni&egrave;res connexions :$connection_history";
85
	  	$l_logout_explain = "Ferme la session de l'usager actuellement connect&eacute;. <br><br>Utilisateur connect&eacute; : <a href=\"http://$hostname:3990/logoff\" title=\"Deconnecter l'utilisateur $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history derni&egrave;res connexions :$connection_history";
86
		$l_logout = "<a href=\"http://$hostname:3990/logoff\">Se d&eacute;connecter d'internet</a>";
86
		$l_logout = "<a href=\"http://$hostname:3990/logoff\">Se d&eacute;connecter d'internet</a>";
87
	  }
87
	  }
88
	  else
88
	  else
89
	  {
89
	  {
90
		  $l_logout_explain = "Votre système ($user[5]) est en exception d'authentication.<br><br>$nb_connection_history last connections :$connection_history";
90
		  $l_logout_explain = "Votre système ($user[5]) est en exception d'authentication.<br><br>$nb_connection_history last connections :$connection_history";
91
		  $l_logout = "Information des connexions";
91
		  $l_logout = "Information des connexions";
92
	  }
92
	  }
93
	}
93
	}
94
  $l_password_change = "<a href=\"https://$hostname/pass\">Changer votre mot de passe</a>";
94
  $l_password_change = "<a href=\"https://$hostname/pass\">Changer votre mot de passe</a>";
95
  $l_password_change_explain = "Vous redirige sur la page de changement du mot de passe de votre compte d'acc&egrave;s &agrave; internet.<br><br>Vous devez avoir un compte internet valide.";
95
  $l_password_change_explain = "Vous redirige sur la page de changement du mot de passe de votre compte d'acc&egrave;s &agrave; internet.<br><br>Vous devez avoir un compte internet valide.";
96
  $l_back_page = "<a href=\"javascript:history.back()\">Page pr&eacute;c&eacute;dente</a>";
96
  $l_back_page = "<a href=\"javascript:history.back()\">Page pr&eacute;c&eacute;dente</a>";
97
}
97
}
-
 
98
else if($Language == 'pt'){
-
 
99
  $l_access_denied = "Acesso negado";
-
 
100
  $l_access_welcome = "Bem-vindo ao Alcasar";
-
 
101
  $l_access_unavailable = "ACESSO INDISPONÍVEL";
-
 
102
  $l_required_domain = "Site WEB Obrigatório";
-
 
103
  $l_explain_acc_access = "Este é o centro de controle do portal para acessar você deve ter uma conta administrativa.";
-
 
104
  $l_explain_access_deny = "Você tenta se conectar a um recurso cujo conteúdo é considerado inadequado no conteúdo de informações.";
-
 
105
  $l_explain_net_pb = "O portal detectou que o acesso à Internet é de risco";
-
 
106
  $l_contact_access_deny = "Entre em contato com o administrador do sistema de segurança se acha que essa filtragem é abusiva.";
-
 
107
  $l_contact_net_pb = "Entre em contato com a empresa fornecedora de Internet para mais informações";
-
 
108
  $l_welcome = "Essa é a página do portal captive principal";
-
 
109
  $l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Control Center</a>";
-
 
110
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Instalar Certificado Alcasar AC</a>";
-
 
111
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Instalar Certificado Alcasar AC</a>";
-
 
112
  $l_certif_explain = "O certificado Permiti a troca de dados seguro entre seu computador e o portal Alcasar.<BR>Se este certificado não estiver incorporado no seu computador, alguns alertas de segurança deverá aparecer no navegador.<br><br>";
-
 
113
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
-
 
114
if ((isset ($user[4])) && ($user[4] == "0")) {
-
 
115
	  $l_logout_explain = "No Internet consultation session is actualy open on your system";
-
 
116
	  $l_logout = "<a href=\"http://www.google.pt\">Open an Internet session</a>";}
-
 
117
  else {
-
 
118
	  if ($user[5] != $user[0]) // authentication exception or not
-
 
119
	  {
-
 
120
		  $l_logout_explain = "Close the session of the user actualy connecterd.<br> User logged-on : <a href=\"http://$hostname:3990/logoff\" title=\"Disconnect user $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history last connections :$connection_history";
-
 
121
		  $l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff from internet</a>";
-
 
122
	  }
-
 
123
	  else
-
 
124
	  {
-
 
125
		  $l_logout_explain = "Your system ($user[5]) is in exception of authentication.<br><br>$nb_connection_history last connections :$connection_history";
-
 
126
		  $l_logout = "Connections information";
-
 
127
	  }
-
 
128
  	}
-
 
129
  $l_password_change = "<a href=\"https://$hostname/pass\">Change your password</a>";
-
 
130
  $l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
-
 
131
  $l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
-
 
132
}
98
else {
133
else {
99
  $l_access_denied = "ACCESS DENIED";
134
  $l_access_denied = "ACCESS DENIED";
100
  $l_access_welcome = "Welcome on ALCASAR";
135
  $l_access_welcome = "Welcome on ALCASAR";
101
  $l_access_unavailable = "ACCESS UNAVAILABLE";
136
  $l_access_unavailable = "ACCESS UNAVAILABLE";
102
  $l_required_domain = "Required WEB site";
137
  $l_required_domain = "Required WEB site";
103
  $l_explain_acc_access = "This center control the portal. You must have an administrative account.";
138
  $l_explain_acc_access = "This center control the portal. You must have an administrative account.";
104
  $l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
139
  $l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
105
  $l_explain_net_pb = "Your portal has just detected that the Internet access is down";
140
  $l_explain_net_pb = "Your portal has just detected that the Internet access is down";
106
  $l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
141
  $l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
107
  $l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
142
  $l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
108
  $l_welcome = "Your captive portal main page";
143
  $l_welcome = "Your captive portal main page";
109
  $l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Control Center</a>";
144
  $l_acc_access = "<a href=\"https://$hostname/acc\">ALCASAR Control Center</a>";
110
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Install ALCASAR AC Certificate</a>";
145
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.crt\">Install ALCASAR AC Certificate</a>";
111
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Install ALCASAR AC Certificate</a>";
146
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Install ALCASAR AC Certificate</a>";
112
  $l_certif_explain = "Allow secure data exchange between your computer and ALCASAR portal.<BR>If this certificate isn't incorporated in your computer, some security alerts should appear in your browser.<br><br>";
147
  $l_certif_explain = "Allow secure data exchange between your computer and ALCASAR portal.<BR>If this certificate isn't incorporated in your computer, some security alerts should appear in your browser.<br><br>";
113
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
148
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
114
if ((isset ($user[4])) && ($user[4] == "0")) {
149
if ((isset ($user[4])) && ($user[4] == "0")) {
115
	  $l_logout_explain = "No Internet consultation session is actualy open on your system";
150
	  $l_logout_explain = "No Internet consultation session is actualy open on your system";
116
	  $l_logout = "<a href=\"http://www.google.fr\">Open an Internet session</a>";}
151
	  $l_logout = "<a href=\"http://www.google.com\">Open an Internet session</a>";}
117
  else {
152
  else {
118
	  if ($user[5] != $user[0]) // authentication exception or not
153
	  if ($user[5] != $user[0]) // authentication exception or not
119
	  {
154
	  {
120
		  $l_logout_explain = "Close the session of the user actualy connecterd.<br> User logged-on : <a href=\"http://$hostname:3990/logoff\" title=\"Disconnect user $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history last connections :$connection_history";
155
		  $l_logout_explain = "Close the session of the user actualy connecterd.<br> User logged-on : <a href=\"http://$hostname:3990/logoff\" title=\"Disconnect user $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history last connections :$connection_history";
121
		  $l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff from internet</a>";
156
		  $l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff from internet</a>";
122
	  }
157
	  }
123
	  else
158
	  else
124
	  {
159
	  {
125
		  $l_logout_explain = "Your system ($user[5]) is in exception of authentication.<br><br>$nb_connection_history last connections :$connection_history";
160
		  $l_logout_explain = "Your system ($user[5]) is in exception of authentication.<br><br>$nb_connection_history last connections :$connection_history";
126
		  $l_logout = "Connections information";
161
		  $l_logout = "Connections information";
127
	  }
162
	  }
128
  	}
163
  	}
129
  $l_password_change = "<a href=\"https://$hostname/pass\">Change your password</a>";
164
  $l_password_change = "<a href=\"https://$hostname/pass\">Change your password</a>";
130
  $l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
165
  $l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
131
  $l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
166
  $l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
132
}
167
}
133
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
168
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
134
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
169
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
135
 
170
 
136
# Attribution des icones / images
171
# Attribution des icones / images
137
$img_rep = "images/";
172
$img_rep = "images/";
138
$img_organisme = "organisme.png";
173
$img_organisme = "organisme.png";
139
$img_access = "globe_acces_70.png";
174
$img_access = "globe_acces_70.png";
140
$img_connect = "globe_70.png";
175
$img_connect = "globe_70.png";
141
$img_warning = "globe_warning_70.png";
176
$img_warning = "globe_warning_70.png";
142
$img_pwd = "cle_ombre.png";
177
$img_pwd = "cle_ombre.png";
143
$img_certificate = "certificat.png";
178
$img_certificate = "certificat.png";
144
$img_acc = "logo-alcasar_70.png";
179
$img_acc = "logo-alcasar_70.png";
145
$img_false = "interdit.png";
180
$img_false = "interdit.png";
146
$img_internet = $img_connect;
181
$img_internet = $img_connect;
147
 
182
 
148
if ((isset ($user[4])) && ($user[4] == "0")) {
183
if ((isset ($user[4])) && ($user[4] == "0")) {
149
	if (! $network_pb) {
184
	if (! $network_pb) {
150
		$img_internet = $img_access;
185
		$img_internet = $img_access;
151
		}
186
		}
152
		else {
187
		else {
153
		$img_internet = $img_warning;
188
		$img_internet = $img_warning;
154
	}
189
	}
155
}
190
}
156
else {
191
else {
157
	$img_internet = $img_connect;
192
	$img_internet = $img_connect;
158
}
193
}
159
 
194
 
160
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
195
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
161
?>
196
?>
162
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
197
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
163
	<html>
198
	<html>
164
	<head>
199
	<head>
165
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
200
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
166
	<title>ALCASAR - <?php echo $l_title; ?></title>
201
	<title>ALCASAR - <?php echo $l_title; ?></title>
167
	<meta http-equiv="Cache-control" content="no-cache">
202
	<meta http-equiv="Cache-control" content="no-cache">
168
	<meta http-equiv="Pragma" content="no-cache">
203
	<meta http-equiv="Pragma" content="no-cache">
169
	<link rel="stylesheet" type="text/css" href="css/style_intercept.css">
204
	<link rel="stylesheet" type="text/css" href="css/style_intercept.css">
170
	<script type="text/javascript">
205
	<script type="text/javascript">
171
		function valoriserDiv5(param){
206
		function valoriserDiv5(param){
172
			document.getElementById("box_info").innerHTML = param.innerHTML;
207
			document.getElementById("box_info").innerHTML = param.innerHTML;
173
		}
208
		}
174
	</script>
209
	</script>
175
</head>
210
</head>
176
<body onload="valoriserDiv5(text_conn);">
211
<body onload="valoriserDiv5(text_conn);">
177
<?php
212
<?php
178
if ($direct_access){
213
if ($direct_access){
179
	echo "
214
	echo "
180
		<div id=\"cadre_titre\" class=\"titre_controle\">
215
		<div id=\"cadre_titre\" class=\"titre_controle\">
181
			<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
216
			<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
182
	if ($network_pb) {
217
	if ($network_pb) {
183
		echo "	<span>$l_explain_net_pb</span>";
218
		echo "	<span>$l_explain_net_pb</span>";
184
		}
219
		}
185
	}
220
	}
186
	else {
221
	else {
187
		echo"
222
		echo"
188
			<div id=\"cadre_titre\" class=\"titre_refus\">
223
			<div id=\"cadre_titre\" class=\"titre_refus\">
189
				<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>";
224
				<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>";
190
	}
225
	}
191
?>
226
?>
192
			<div id="boite_logo">
227
			<div id="boite_logo">
193
				<img src="images/organisme.png">
228
				<img src="images/organisme.png">
194
			</div>
229
			</div>
195
		</div>
230
		</div>
196
		<div id="contenu_acces">
231
		<div id="contenu_acces">
197
			<div id="box_url">
232
			<div id="box_url">
198
				<?php if (! $direct_access){echo "$l_required_domain : $_SERVER[HTTP_HOST]";}?>
233
				<?php if (! $direct_access){echo "$l_required_domain : $_SERVER[HTTP_HOST]";}?>
199
			</div>
234
			</div>
200
<?php
235
<?php
201
if ($direct_access){
236
if ($direct_access){
202
	echo "	<div id=\"box_bienvenue\">
237
	echo "	<div id=\"box_bienvenue\">
203
				$l_welcome
238
				$l_welcome
204
			</div>
239
			</div>
205
			<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\">
240
			<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\">
206
				<span>$l_logout</span>
241
				<span>$l_logout</span>
207
				<img src=\"$img_rep$img_internet\">
242
				<img src=\"$img_rep$img_internet\">
208
			</div>
243
			</div>
209
			<div class=\"box_menu\" id=\"box_certif\" onmouseover=\"valoriserDiv5(text_certif);\">
244
			<div class=\"box_menu\" id=\"box_certif\" onmouseover=\"valoriserDiv5(text_certif);\">
210
				<span>$l_install_certif</span>
245
				<span>$l_install_certif</span>
211
				<img src=\"$img_rep$img_certificate\">
246
				<img src=\"$img_rep$img_certificate\">
212
			</div>
247
			</div>
213
			<div class=\"box_menu\" id=\"box_mdp\" onmouseover=\"valoriserDiv5(text_mdp);\">
248
			<div class=\"box_menu\" id=\"box_mdp\" onmouseover=\"valoriserDiv5(text_mdp);\">
214
				<img src=\"$img_rep$img_pwd\">
249
				<img src=\"$img_rep$img_pwd\">
215
				<span>$l_password_change</span>
250
				<span>$l_password_change</span>
216
			</div>		
251
			</div>		
217
			<div class=\"box_menu\" id=\"box_acc\" onmouseover=\"valoriserDiv5(text_acc);\">
252
			<div class=\"box_menu\" id=\"box_acc\" onmouseover=\"valoriserDiv5(text_acc);\">
218
				<span>$l_acc_access</span>
253
				<span>$l_acc_access</span>
219
				<img src=\"$img_rep$img_acc\">
254
				<img src=\"$img_rep$img_acc\">
220
			</div>
255
			</div>
221
			<div class=\"div-cache\" id=\"text_conn\">
256
			<div class=\"div-cache\" id=\"text_conn\">
222
				<h2>$l_logout</h2>
257
				<h2>$l_logout</h2>
223
				<p>$l_logout_explain</p>
258
				<p>$l_logout_explain</p>
224
				<img src=\"$img_rep$img_internet\">
259
				<img src=\"$img_rep$img_internet\">
225
			</div>
260
			</div>
226
			<div class=\"div-cache\" id=\"text_certif\">
261
			<div class=\"div-cache\" id=\"text_certif\">
227
				<h2>$l_install_certif_more</h2>
262
				<h2>$l_install_certif_more</h2>
228
				<p>$l_certif_explain $l_certif_explain_help</p>
263
				<p>$l_certif_explain $l_certif_explain_help</p>
229
				<img src=\"$img_rep$img_certificate\">				
264
				<img src=\"$img_rep$img_certificate\">				
230
			</div>
265
			</div>
231
			<div class=\"div-cache\" id=\"text_mdp\">
266
			<div class=\"div-cache\" id=\"text_mdp\">
232
				<h2>$l_password_change</h2>
267
				<h2>$l_password_change</h2>
233
				<p>$l_password_change_explain</p>
268
				<p>$l_password_change_explain</p>
234
				<img src=\"$img_rep$img_pwd\">
269
				<img src=\"$img_rep$img_pwd\">
235
			</div>
270
			</div>
236
			<div class=\"div-cache\" id=\"text_acc\">
271
			<div class=\"div-cache\" id=\"text_acc\">
237
				<h2>$l_acc_access</h2>
272
				<h2>$l_acc_access</h2>
238
				<p>$l_explain</p>
273
				<p>$l_explain</p>
239
				<img src=\"$img_rep$img_acc\">
274
				<img src=\"$img_rep$img_acc\">
240
			</div>
275
			</div>
241
			<div id=\"box_info\">
276
			<div id=\"box_info\">
242
			</div>";
277
			</div>";
243
	}
278
	}
244
	else {
279
	else {
245
		echo "
280
		echo "
246
			<div id=\"box_refuse\">
281
			<div id=\"box_refuse\">
247
				<img src=\"$img_rep$img_false\">
282
				<img src=\"$img_rep$img_false\">
248
				<p>$l_explain</p>
283
				<p>$l_explain</p>
249
			</div>
284
			</div>
250
			<div id=\"liens_redir\">
285
			<div id=\"liens_redir\">
251
				<p>$l_back_page</p>
286
				<p>$l_back_page</p>
252
			</div>";
287
			</div>";
253
		}
288
		}
254
	if (($network_pb)&&(! $direct_access)) {
289
	if (($network_pb)&&(! $direct_access)) {
255
	echo "	<span>Diagnostic : $diagnostic</span>";
290
	echo "	<span>Diagnostic : $diagnostic</span>";
256
	}
291
	}
257
?>
292
?>
258
		</div>
293
		</div>
259
	</body>
294
	</body>
260
</html>
295
</html>
261
 
296