Subversion Repositories ALCASAR

Rev

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

Rev 1999 Rev 2010
1
<?php
1
<?php
2
# $Id: index.php 1999 2016-07-19 08:14:38Z richard $
2
# $Id: index.php 2010 2016-07-26 14:08:50Z raphael.pion $
3
#
3
#
4
# index.php for ALCASAR bu Rexy
4
# index.php for ALCASAR bu Rexy
5
# UI & css style by stephane ERARD
5
# UI & css style by stephane ERARD
6
# The contents of this file may be used under the terms of the GNU
6
# The contents of this file may be used under the terms of the GNU
7
# General Public License Version 2, provided that the above copyright
7
# General Public License Version 2, provided that the above copyright
8
# notice and this permission notice is included in all copies or
8
# notice and this permission notice is included in all copies or
9
# substantial portions of the software.
9
# substantial portions of the software.
10
/****************************************************************
10
/****************************************************************
11
*			GLOBAL FILE PATHS			*
11
*			GLOBAL FILE PATHS			*
12
*****************************************************************/
12
*****************************************************************/
13
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
13
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
14
 
14
 
15
/****************************************************************
15
/****************************************************************
16
*			FILE reading test			*
16
*			FILE reading test			*
17
*****************************************************************/
17
*****************************************************************/
18
$conf_files=array(CONF_FILE);
18
$conf_files=array(CONF_FILE);
19
foreach ($conf_files as $file){
19
foreach ($conf_files as $file){
20
	if (!file_exists($file)){
20
	if (!file_exists($file)){
21
		exit("File ".$file." unknown");
21
		exit("File ".$file." unknown");
22
	}
22
	}
23
	if (!is_readable($file)){
23
	if (!is_readable($file)){
24
		exit("You don't have read rights on the file ".$file);
24
		exit("You don't have read rights on the file ".$file);
25
	}
25
	}
26
}
26
}
27
/****************************************************************
27
/****************************************************************
28
*			Read CONF_FILE				*
28
*			Read CONF_FILE				*
29
*****************************************************************/
29
*****************************************************************/
30
$ouvre=fopen(CONF_FILE,"r");
30
$ouvre=fopen(CONF_FILE,"r");
31
if ($ouvre){
31
if ($ouvre){
32
	while (!feof ($ouvre))
32
	while (!feof ($ouvre))
33
	{
33
	{
34
		$tampon = fgets($ouvre, 4096);
34
		$tampon = fgets($ouvre, 4096);
35
		if (strpos($tampon,"=")!==false){
35
		if (strpos($tampon,"=")!==false){
36
			$tmp = explode("=",$tampon);
36
			$tmp = explode("=",$tampon);
37
			$conf[$tmp[0]] = $tmp[1];
37
			$conf[$tmp[0]] = $tmp[1];
38
		}
38
		}
39
	}
39
	}
40
}else{
40
}else{
41
	exit("Error opening the file ".CONF_FILE);
41
	exit("Error opening the file ".CONF_FILE);
42
}
42
}
43
fclose($ouvre);
43
fclose($ouvre);
44
$organisme = trim($conf["ORGANISM"]);
44
$organisme = trim($conf["ORGANISM"]);
45
$domainname = trim($conf["DOMAIN"]);
45
$domainname = trim($conf["DOMAIN"]);
46
$hostname = "alcasar.".$domainname;
46
$hostname = "alcasar.".$domainname;
47
$network_pb = False;
47
$network_pb = False;
48
$cert_add = "http://$hostname/certs";
48
$cert_add = "http://$hostname/certs";
49
$direct_access = False;
49
$direct_access = False;
50
$display_menu=False;
50
$display_menu=False;
51
$diagnostic = "can't contact the default router";
51
$diagnostic = "can't contact the default router";
52
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "";
52
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "";
53
$tab = array();$user = array();
53
$tab = array();$user = array();
54
$connection_history =  "";
54
$connection_history =  "";
55
$nb_connection_history = 3;
55
$nb_connection_history = 3;
56
$Language = 'en';
56
$Language = 'en';
57
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
57
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
58
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
58
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
59
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
59
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
60
$redirect_link = "www.euronews.com"; # Default redirection for HTTPS interception (beware, this website must run in HTTP)
60
$redirect_link = "www.euronews.com"; # Default redirection for HTTPS interception (beware, this website must run in HTTP)
61
 
61
 
62
# Retrieve the user info behind the remote ip
62
# Retrieve the user info behind the remote ip
63
exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab);
63
exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab);
64
$user = explode (" ", $tab[0]);
64
$user = explode (" ", $tab[0]);
65
 
65
 
66
 
66
 
67
# Test if it's a direct connexion to ALCASAR
67
# Test if it's a direct connexion to ALCASAR
68
if (isset($_SERVER['HTTP_HOST']))
68
if (isset($_SERVER['HTTP_HOST']))
69
{
69
{
70
	if (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || (preg_match ("/^alcasar$/", $_SERVER['HTTP_HOST'])) || (preg_match ("/^$hostname$/", $_SERVER['HTTP_HOST'])) || (preg_match ("/^$organisme$/", $_SERVER['HTTP_HOST'])))
70
	if (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || (preg_match ("/^alcasar$/", $_SERVER['HTTP_HOST'])) || (preg_match ("/^$hostname$/", $_SERVER['HTTP_HOST'])) || (preg_match ("/^$organisme$/", $_SERVER['HTTP_HOST'])))
71
	{	
71
	{	
72
	$direct_access=True;
72
	$direct_access=True;
73
	exec("sudo /usr/sbin/ipset del not_auth_yet $remote_ip"); # del user of the ipset "not_auth_yet" to not loop
73
	exec("sudo /usr/sbin/ipset del not_auth_yet $remote_ip"); # del user of the ipset "not_auth_yet" to not loop
74
	}
74
	}
75
}
75
}
76
# Function to adapt time connexion in seconds to H,M,S
76
# Function to adapt time connexion in seconds to H,M,S
77
function secondsToDuration($seconds = null){
77
function secondsToDuration($seconds = null){
78
	if ($seconds == null) return "";
78
	if ($seconds == null) return "";
79
	$temp = $seconds % 3600;
79
	$temp = $seconds % 3600;
80
	$time[0] = ( $seconds - $temp ) / 3600 ;	// hours
80
	$time[0] = ( $seconds - $temp ) / 3600 ;	// hours
81
	$time[2] = $temp % 60 ;				// seconds
81
	$time[2] = $temp % 60 ;				// seconds
82
	$time[1] = ( $temp - $time[2] ) / 60;		// minutes
82
	$time[1] = ( $temp - $time[2] ) / 60;		// minutes
83
	return $time[0]." h ".$time[1]." m ".$time[2]." s";
83
	return $time[0]." h ".$time[1]." m ".$time[2]." s";
84
}
84
}
85
 
85
 
-
 
86
//if user need to be warn
-
 
87
if(isset($_GET['warn']) && isset($_GET['url']))
-
 
88
{
-
 
89
	$direct_access = False;
-
 
90
}
-
 
91
 
-
 
92
 
86
# If the user is connected : retrieve the 3 last connexions
93
# If the user is connected : retrieve the 3 last connexions
87
if ((isset ($user[4])) && ($user[4] != "0")){
94
if ((isset ($user[4])) && ($user[4] != "0")){
-
 
95
 
-
 
96
	if(isset($_GET['redirect'])) # if user has been warned, we redirect him to his website
-
 
97
	{
-
 
98
		$redir = "http://".$_GET['url'];  
-
 
99
		header("Location: $_GET[url]",TRUE,307);
-
 
100
		exit; 
-
 
101
	}
-
 
102
 
-
 
103
 
88
	if ((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){
104
	if ((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){
89
		include_once("/etc/freeradius-web/config.php");
105
		include_once("/etc/freeradius-web/config.php");
90
		include_once("./acc/manager/lib/sql/drivers/mysql/functions.php");
106
		include_once("./acc/manager/lib/sql/drivers/mysql/functions.php");
-
 
107
		
91
		$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user[5]' ORDER BY AcctStartTime DESC LIMIT 0 , $nb_connection_history";
108
		$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user[5]' ORDER BY AcctStartTime DESC LIMIT 0 , $nb_connection_history";
92
		$link = @da_sql_pconnect($config); // on affiche pas les erreurs
109
		$link = @da_sql_pconnect($config); // on affiche pas les erreurs
93
		if ($link){
110
		if ($link){
94
			$res = @da_sql_query($link,$config,$sql); // on affiche pas les erreurs
111
			$res = @da_sql_query($link,$config,$sql); // on affiche pas les erreurs
95
			
112
			
96
			if ($res){
113
			if ($res){
97
				$connection_history.= "<ul>";
114
				$connection_history.= "<ul>";
98
				while(($row = @da_sql_fetch_array($res,$config))){
115
				while(($row = @da_sql_fetch_array($res,$config))){
99
					$connected = "";
116
					$connected = "";
100
					if ($row['acctstoptime'] == "") $connected = " (active)";
117
					if ($row['acctstoptime'] == "") $connected = " (active)";
101
					$connection_history.="<li title='$row[username] $row[acctstarttime] $row[acctstoptime] (".secondsToDuration($row['acctsessiontime']).")'>$row[acctstarttime] (".secondsToDuration($row['acctsessiontime']).") $connected</li>";
118
					$connection_history.="<li title='$row[username] $row[acctstarttime] $row[acctstoptime] (".secondsToDuration($row['acctsessiontime']).")'>$row[acctstarttime] (".secondsToDuration($row['acctsessiontime']).") $connected</li>";
102
				}
119
				}
103
				$connection_history.="</ul>";
120
				$connection_history.="</ul>";
104
			}
121
			}
105
		}
122
		}
106
	}
123
	}
107
}
124
}
108
else # user not connected
125
else # user not connected
109
{
126
{
110
	exec("sudo /usr/sbin/ipset list not_auth_yet | grep $remote_ip | wc -l 2>&1", $ipset_not_auth_yet);
127
	exec("sudo /usr/sbin/ipset list not_auth_yet | grep $remote_ip | wc -l 2>&1", $ipset_not_auth_yet);
111
	if(!$direct_access && $ipset_not_auth_yet[0] == '0') # it's the first stage of the interception 
128
	if(!$direct_access && $ipset_not_auth_yet[0] == '0') # it's the first stage of the interception 
112
	{
129
	{
113
		$display_menu = True; # Display menu for user not_auth_yet
130
		$display_menu = True; # Display menu for user not_auth_yet
114
		if (!isset($_SERVER['HTTPS'])) # In HTTP, the user is redirected on it's home page. In HTTPS, it's on the default page
131
		if (!isset($_SERVER['HTTPS'])) # In HTTP, the user is redirected on it's home page. In HTTPS, it's on the default page
115
		{
132
		{
116
			$redirect_link = $_SERVER['HTTP_HOST']; # to keep the user URL
133
			$redirect_link = $_SERVER['HTTP_HOST']; # to keep the user URL
117
		}
134
		}
118
 
135
 
119
	}
136
	}
120
	if(isset($_GET['url'])) # it's the second stage (when user has clicked to open a connection ...)
137
	if(isset($_GET['url'])) # it's the second stage (when user has clicked to open a connection ...)
121
	{
138
	{
122
		exec("sudo /usr/sbin/ipset add not_auth_yet $remote_ip"); # Add user in the ipset "not_auth_yet" (DNS requests not intercepted)
139
		exec("sudo /usr/sbin/ipset add not_auth_yet $remote_ip"); # Add user in the ipset "not_auth_yet" (DNS requests not intercepted)
123
		$redir = "http://".$_GET['url'];  
140
		$redir = "http://".$_GET['url'];  
124
		header("Location: $redir",TRUE,307);
141
		header("Location: $redir",TRUE,307);
125
		exit; 
142
		exit; 
126
	}
143
	}
127
	if ($ipset_not_auth_yet[0] == '1'){ #if user not_auth_yet still here (index.php), we force DNS resquest.
144
	if ($ipset_not_auth_yet[0] == '1'){ #if user not_auth_yet still here (index.php), we force DNS resquest.
128
		 echo "<script>window.location.reload(true)</script>"; # force DNS request
145
		 echo "<script>window.location.reload(true)</script>"; # force DNS request
129
	}	
146
	}	
-
 
147
	
-
 
148
	
130
}
149
}
131
# Choice of language
150
# Choice of language
132
if($Language == 'fr'){
151
if($Language == 'fr'){
133
  $l_access_denied = "Contrôle d'accès";
152
  $l_access_denied = "Contrôle d'accès";
134
  $l_access_welcome = "Bienvenue sur ALCASAR";
153
  $l_access_welcome = "Bienvenue sur ALCASAR";
135
  $l_access_unavailable = "ACC&Egrave;S INDISPONIBLE";
154
  $l_access_unavailable = "ACC&Egrave;S INDISPONIBLE";
136
  $l_required_domain = "Site WEB demand&eacute;";
155
  $l_required_domain = "Site WEB demand&eacute;";
137
  $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.";
156
  $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.";
138
  $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.";
157
  $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.";
139
  $l_explain_net_pb = "Votre portail d&eacute;tecte que l'acc&egrave;s &agrave; Internet est indisponible.";
158
  $l_explain_net_pb = "Votre portail d&eacute;tecte que l'acc&egrave;s &agrave; Internet est indisponible.";
140
  $l_contact_access_deny = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
159
  $l_contact_access_deny = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
141
  $l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information.";
160
  $l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information.";
142
  $l_welcome = "Page principale de votre portail captif";
161
  $l_welcome = "Page principale de votre portail captif";
143
  $l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Enregistrement par SMS</a>";
162
  $l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Enregistrement par SMS</a>";
144
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Installer le certificat racine</a>";
163
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Installer le certificat racine</a>";
145
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Installation du certificat de l'autorit&eacute; racine d'ALCASAR</a>";
164
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Installation du certificat de l'autorit&eacute; racine d'ALCASAR</a>";
146
  $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>";
165
  $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>";
147
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
166
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
148
  $l_category = "catégorie :";
167
  $l_category = "catégorie :";
149
if ((isset ($user[4])) && ($user[4] == "0")) {
168
if ((isset ($user[4])) && ($user[4] == "0")) {
150
	  $l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre syst&egrave;me.";
169
	  $l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre syst&egrave;me.";
151
	  $l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Ouvrir une session Internet</a>";
170
	  $l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Ouvrir une session Internet</a>";
152
	}
171
	}
153
  else {
172
  else {
154
	  if ($user[5] != $user[0]) // authentication exception or not
173
	  if ($user[5] != $user[0]) // authentication exception or not
155
	  {
174
	  {
156
	  	$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";
175
	  	$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";
157
		$l_logout = "<a href=\"http://$hostname:3990/logoff\">Se d&eacute;connecter d'internet</a>";
176
		$l_logout = "<a href=\"http://$hostname:3990/logoff\">Se d&eacute;connecter d'internet</a>";
158
	  }
177
	  }
159
	  else
178
	  else
160
	  {
179
	  {
161
		  $l_logout_explain = "Votre système ($user[5]) est en exception d'authentication.<br><br>$nb_connection_history last connections :$connection_history";
180
		  $l_logout_explain = "Votre système ($user[5]) est en exception d'authentication.<br><br>$nb_connection_history last connections :$connection_history";
162
		  $l_logout = "Information des connexions";
181
		  $l_logout = "Information des connexions";
163
	  }
182
	  }
164
	}
183
	}
165
  $l_password_change = "<a href=\"https://$hostname/pass\">Changer votre mot de passe</a>";
184
  $l_password_change = "<a href=\"https://$hostname/pass\">Changer votre mot de passe</a>";
166
  $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.";
185
  $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.";
167
  $l_sms_explain = "Vous redirige vers une la page explicative de l'auto enregistrement par SMS.<br><br><strong>Identifiant:</strong> votre numéro de téléphone<br><strong>Mot de passe:</strong> votre message";
186
  $l_sms_explain = "Vous redirige vers une la page explicative de l'auto enregistrement par SMS.<br><br><strong>Identifiant:</strong> votre numéro de téléphone<br><strong>Mot de passe:</strong> votre message";
168
  $l_back_page = "<a href=\"javascript:history.back()\">Page pr&eacute;c&eacute;dente</a>";
187
  $l_back_page = "<a href=\"javascript:history.back()\">Page pr&eacute;c&eacute;dente</a>";
169
  $l_service_sms = "Service SMS actif";
188
  $l_service_sms = "Service SMS actif";
170
  $l_service_sms_n = "Service SMS non actif";
189
  $l_service_sms_n = "Service SMS non actif";
171
  $l_acc_sms = "Auto enregistrement par SMS";
190
  $l_acc_sms = "Auto enregistrement par SMS";
-
 
191
  $l_explain_warn = "L'administrateur a créé une archive contenant vos journaux de connexion dans le cadre d'une affaire judiciaire.";
-
 
192
  $l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>Je comprends et je souhaite continuer ma navigation.</a>";
-
 
193
  $l_title_warn="Cher utilisateur, ";
-
 
194
  $l_explain_warn_name="Une personne sous le nom de ";
-
 
195
  $l_explain_warn_ip="sous cette IP : ";
-
 
196
  $l_explain_warn_date="a consulté vos journaux de connexion le ";
-
 
197
  $l_explain_warn_reason="en émettant la raison suivante : ";
172
}
198
}
173
else if($Language == 'pt'){
199
else if($Language == 'pt'){
174
  $l_access_denied = "Controle de acesso";
200
  $l_access_denied = "Controle de acesso";
175
  $l_access_welcome = "Bem-vindo ao Alcasar";
201
  $l_access_welcome = "Bem-vindo ao Alcasar";
176
  $l_access_unavailable = "ACESSO INDISPONÍVEL";
202
  $l_access_unavailable = "ACESSO INDISPONÍVEL";
177
  $l_required_domain = "Site WEB Obrigatório";
203
  $l_required_domain = "Site WEB Obrigatório";
178
  $l_explain_acc_access = "Este é o centro de controle do portal para acessar você deve ter uma conta administrativa valida.";
204
  $l_explain_acc_access = "Este é o centro de controle do portal para acessar você deve ter uma conta administrativa valida.";
179
  $l_explain_access_deny = "Você tenta se conectar a um recurso cujo conteúdo é considerado inadequado no conteúdo de informações.";
205
  $l_explain_access_deny = "Você tenta se conectar a um recurso cujo conteúdo é considerado inadequado no conteúdo de informações.";
180
  $l_explain_net_pb = "O sistema detectou que o acesso é de risco, não será permitido o acesso";
206
  $l_explain_net_pb = "O sistema detectou que o acesso é de risco, não será permitido o acesso";
181
  $l_contact_access_deny = "Entre em contato com o administrador do sistema de segurança se acha que essa filtragem é abusiva.";
207
  $l_contact_access_deny = "Entre em contato com o administrador do sistema de segurança se acha que essa filtragem é abusiva.";
182
  $l_contact_net_pb = "Entre em contato com a empresa fornecedora de Internet para mais informações";
208
  $l_contact_net_pb = "Entre em contato com a empresa fornecedora de Internet para mais informações";
183
  $l_welcome = "Página do portal";
209
  $l_welcome = "Página do portal";
184
  $l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
210
  $l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
185
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Instalar Certificado Alcasar AC</a>";
211
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Instalar Certificado Alcasar AC</a>";
186
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Instalar Certificado Alcasar AC</a>";
212
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Instalar Certificado Alcasar AC</a>";
187
  $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>";
213
  $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>";
188
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Essa foi uma ajuda complementar</a>";
214
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Essa foi uma ajuda complementar</a>";
189
  $l_category = "categoria :";
215
  $l_category = "categoria :";
190
if ((isset ($user[4])) && ($user[4] == "0")) {
216
if ((isset ($user[4])) && ($user[4] == "0")) {
191
	$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
217
	$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
192
	$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Abrir uma conexão de Internet</a>";
218
	$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Abrir uma conexão de Internet</a>";
193
	}
219
	}
194
  else {
220
  else {
195
	  if ($user[5] != $user[0]) // authentication exception or not
221
	  if ($user[5] != $user[0]) // authentication exception or not
196
	  {
222
	  {
197
		  $l_logout_explain = "Se desejar, feche a conexão do usuário atual conectado.<br> Usuário conectado : <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";
223
		  $l_logout_explain = "Se desejar, feche a conexão do usuário atual conectado.<br> Usuário conectado : <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";
198
		  $l_logout = "<a href=\"http://$hostname:3990/logoff\">Sair da Internet</a>";
224
		  $l_logout = "<a href=\"http://$hostname:3990/logoff\">Sair da Internet</a>";
199
	  }
225
	  }
200
	  else
226
	  else
201
	  {
227
	  {
202
		  $l_logout_explain = "O sistema ($user[5]) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history";
228
		  $l_logout_explain = "O sistema ($user[5]) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history";
203
		  $l_logout = "Informações de conexões";
229
		  $l_logout = "Informações de conexões";
204
	  }
230
	  }
205
  	}
231
  	}
206
  $l_password_change = "<a href=\"https://$hostname/pass\">Mudar sua senha</a>";
232
  $l_password_change = "<a href=\"https://$hostname/pass\">Mudar sua senha</a>";
207
  $l_password_change_explain = "Você será redirecionado à página de alteração de senha.<br><br> e deverá ter uma conta de usuário valido para efetuar a troca e acessar à Internet.";
233
  $l_password_change_explain = "Você será redirecionado à página de alteração de senha.<br><br> e deverá ter uma conta de usuário valido para efetuar a troca e acessar à Internet.";
208
  $l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
234
  $l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
209
  $l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
235
  $l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
210
  $l_service_sms = "SMS service enable";
236
  $l_service_sms = "SMS service enable";
211
  $l_service_sms_n = "SMS service disable";
237
  $l_service_sms_n = "SMS service disable";
212
  $l_acc_sms = "Auto registration by SMS";
238
  $l_acc_sms = "Auto registration by SMS";
-
 
239
  $l_explain_warn = "El administrador ha creado un archivo que contiene los periódicos de inicio de sesión como parte de un proceso judicial."; 
-
 
240
  $l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>Lo comprendo y deseo continuar mi navegación.</a>";
-
 
241
  $l_title_warn="Estimado usuario,";
-
 
242
  $l_explain_warn_name="El usario ";
-
 
243
  $l_explain_warn_ip="con este IP : ";
-
 
244
  $l_explain_warn_date="consultó a sus registros de conexión el ";
-
 
245
  $l_explain_warn_reason="con la siguiente razón : ";
213
}
246
}
214
else {
247
else {
215
  $l_access_denied = "Access control";
248
  $l_access_denied = "Access control";
216
  $l_access_welcome = "Welcome on ALCASAR";
249
  $l_access_welcome = "Welcome on ALCASAR";
217
  $l_access_unavailable = "ACCESS UNAVAILABLE";
250
  $l_access_unavailable = "ACCESS UNAVAILABLE";
218
  $l_required_domain = "Required WEB site";
251
  $l_required_domain = "Required WEB site";
219
  $l_explain_acc_access = "This center control the portal. You must have an administrative account.";
252
  $l_explain_acc_access = "This center control the portal. You must have an administrative account.";
220
  $l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
253
  $l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
221
  $l_explain_net_pb = "Your portal has just detected that the Internet access is down";
254
  $l_explain_net_pb = "Your portal has just detected that the Internet access is down";
222
  $l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
255
  $l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
223
  $l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
256
  $l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
224
  $l_welcome = "Your captive portal main page";
257
  $l_welcome = "Your captive portal main page";
225
  $l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
258
  $l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
226
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Install ALCASAR AC Certificate</a>";
259
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Install ALCASAR AC Certificate</a>";
227
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Install ALCASAR AC Certificate</a>";
260
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Install ALCASAR AC Certificate</a>";
228
  $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>";
261
  $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>";
229
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
262
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
230
  $l_category = "category :";
263
  $l_category = "category :";
231
if ((isset ($user[4])) && ($user[4] == "0")) {
264
if ((isset ($user[4])) && ($user[4] == "0")) {
232
	$l_logout_explain = "No Internet consultation session is actualy open on your system";
265
	$l_logout_explain = "No Internet consultation session is actualy open on your system";
233
	$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Open an Internet session</a>";
266
	$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Open an Internet session</a>";
234
	}
267
	}
235
  else {
268
  else {
236
	  if ($user[5] != $user[0]) // authentication exception or not
269
	  if ($user[5] != $user[0]) // authentication exception or not
237
	  {
270
	  {
238
		  $l_logout_explain = "Close the session of the user currently connected.<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";
271
		  $l_logout_explain = "Close the session of the user currently connected.<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";
239
		  $l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff from internet</a>";
272
		  $l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff from internet</a>";
240
	  }
273
	  }
241
	  else
274
	  else
242
	  {
275
	  {
243
		  $l_logout_explain = "Your system ($user[5]) is in exception of authentication.<br><br>$nb_connection_history Last logins :$connection_history";
276
		  $l_logout_explain = "Your system ($user[5]) is in exception of authentication.<br><br>$nb_connection_history Last logins :$connection_history";
244
		  $l_logout = "Connections information";
277
		  $l_logout = "Connections information";
245
	  }
278
	  }
246
  	}
279
  	}
247
  $l_password_change = "<a href=\"https://$hostname/pass\">Change your password</a>";
280
  $l_password_change = "<a href=\"https://$hostname/pass\">Change your password</a>";
248
  $l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
281
  $l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
249
  $l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
282
  $l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
250
  $l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
283
  $l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
251
  $l_service_sms = "SMS service enable";
284
  $l_service_sms = "SMS service enable";
252
  $l_service_sms_n = "SMS service disable";
285
  $l_service_sms_n = "SMS service disable";
253
  $l_acc_sms = "Auto registration by SMS";
286
  $l_acc_sms = "Auto registration by SMS";
-
 
287
  $l_explain_warn = "The administrator created an archive which contains your imputabilities logs for a judicial investigation.";
-
 
288
  $l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>I understand and I wish to continue.</a>";
-
 
289
  $l_title_warn="Dear user,";
-
 
290
  $l_explain_warn_name="Someone called ";
-
 
291
  $l_explain_warn_ip="with this IP : ";
-
 
292
  $l_explain_warn_date="has read your connexion logs at ";
-
 
293
  $l_explain_warn_reason="because : ";
254
}
294
}
255
 
295
 
256
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
296
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
257
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
297
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
258
 
298
 
259
# set the icons
299
# set the icons
260
$img_rep = "/images/";
300
$img_rep = "/images/";
261
$img_organisme = "organisme.png";
301
$img_organisme = "organisme.png";
262
$img_access = "globe_acces_70.png";
302
$img_access = "globe_acces_70.png";
263
$img_connect = "globe_70.png";
303
$img_connect = "globe_70.png";
264
$img_warning = "globe_warning_70.png";
304
$img_warning = "globe_warning_70.png";
265
$img_pwd = "cle_ombre.png";
305
$img_pwd = "cle_ombre.png";
266
$img_certificate = "certificat.png";
306
$img_certificate = "certificat.png";
267
$img_acc = "logo-alcasar_70.png";
307
$img_acc = "logo-alcasar_70.png";
268
$img_sms = "sms.png";
308
$img_sms = "sms.png";
269
$img_false = "interdit.png";
309
$img_false = "interdit.png";
270
$img_adm = "adm.png";
310
$img_adm = "adm.png";
271
$img_internet = $img_connect;
311
$img_internet = $img_connect;
272
 
312
 
273
if ((isset ($user[4])) && ($user[4] == "0")) {
313
if ((isset ($user[4])) && ($user[4] == "0")) {
274
	if (! $network_pb) {
314
	if (! $network_pb) {
275
		$img_internet = $img_access;
315
		$img_internet = $img_access;
276
		}
316
		}
277
		else {
317
		else {
278
		$img_internet = $img_warning;
318
		$img_internet = $img_warning;
279
	}
319
	}
280
}
320
}
281
else {
321
else {
282
	$img_internet = $img_connect;
322
	$img_internet = $img_connect;
283
}
323
}
284
 
324
 
285
# cleaning the cache
325
# cleaning the cache
286
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
326
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
287
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
327
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
288
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
328
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
289
header("Cache-Control: post-check=0, pre-check=0", false);
329
header("Cache-Control: post-check=0, pre-check=0", false);
290
header("Pragma: no-cache");
330
header("Pragma: no-cache");
291
?>
331
?>
292
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
332
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
293
	<html>
333
	<html>
294
	<head>
334
	<head>
295
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
335
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
296
	<title>ALCASAR - <?php echo $l_title; ?></title>
336
	<title>ALCASAR - <?php echo $l_title; ?></title>
297
	<meta http-equiv="Cache-control" content="no-cache">
337
	<meta http-equiv="Cache-control" content="no-cache">
298
	<meta http-equiv="Pragma" content="no-cache">
338
	<meta http-equiv="Pragma" content="no-cache">
299
<?php
339
<?php
300
	echo "<style>";
340
	echo "<style>";
301
	include("css/style_intercept.css");
341
	include("css/style_intercept.css");
302
	echo "</style>";
342
	echo "</style>";
303
?>
343
?>
304
<script type="text/javascript">
344
<script type="text/javascript">
305
	function valoriserDiv5(param){
345
	function valoriserDiv5(param){
306
		document.getElementById("box_info").innerHTML = param.innerHTML;
346
		document.getElementById("box_info").innerHTML = param.innerHTML;
307
	}
347
	}
308
</script>
348
</script>
309
</head>
349
</head>
310
<body onload="valoriserDiv5(text_conn);">
350
<body onload="valoriserDiv5(text_conn);">
311
<?php
351
<?php
312
if ($direct_access || $display_menu){
352
if ($direct_access || $display_menu){
313
	echo "
353
	echo "
314
		<div id=\"cadre_titre\" class=\"titre_controle\">
354
		<div id=\"cadre_titre\" class=\"titre_controle\">
315
			<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
355
			<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
316
	if ($network_pb) {
356
	if ($network_pb) {
317
		echo "	<span>$l_explain_net_pb</span>";
357
		echo "	<span>$l_explain_net_pb</span>";
318
		}
358
		}
319
	}
359
	}
320
	else {
360
	else {
-
 
361
		#if user need to be warn about that someone who read his logs
-
 
362
		if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1')
-
 
363
		{
-
 
364
		echo"
-
 
365
			<div id=\"cadre_titre\" class=\"titre_refus\">
-
 
366
			<p id=\"acces_controle\" class=\"titre_refus\">$l_title_warn</p>";
-
 
367
		}
-
 
368
		else
-
 
369
		{
321
		echo"
370
		echo"
322
			<div id=\"cadre_titre\" class=\"titre_refus\">
371
			<div id=\"cadre_titre\" class=\"titre_refus\">
323
				<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>";
372
			<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>";
-
 
373
		}
324
	}
374
	}
325
?>
375
?>
326
			<div id="boite_logo">
376
			<div id="boite_logo">
327
				<img src="<?php echo "$img_rep$img_organisme"; ?>">
377
				<img src="<?php echo "$img_rep$img_organisme"; ?>">
328
			</div>
378
			</div>
329
		</div>
379
		</div>
330
		<div id="contenu_acces">
380
		<div id="contenu_acces">
331
			<div id="box_url">
381
			<div id="box_url">
332
<?php 
382
<?php 
333
# search here in the blacklist categories if we want to display it (if ((! $direct_access) && (! $network_pb)){}
383
# search here in the blacklist categories if we want to display it (if ((! $direct_access) && (! $network_pb)){}
334
?>
384
?>
335
			</div>
385
			</div>
336
<?php
386
<?php
337
# Check if the SMS service is enable
387
# Check if the SMS service is enable
338
$service_SMS_status="false";
388
$service_SMS_status="false";
339
if ($service_SMS_status == "true") {
389
if ($service_SMS_status == "true") {
340
$sms_div='	
390
$sms_div='	
341
			<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);">
391
			<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);">
342
				<span>'.$l_sms_access.'</span>
392
				<span>'.$l_sms_access.'</span>
343
				<img src="'.$img_rep.''.$img_sms.'">
393
				<img src="'.$img_rep.''.$img_sms.'">
344
			</div>
394
			</div>
345
';
395
';
346
 
396
 
347
$sms_div_over='			
397
$sms_div_over='			
348
			<div class="div-cache" id="text_acc">
398
			<div class="div-cache" id="text_acc">
349
				<h2>'.$l_sms_access.'</h2>
399
				<h2>'.$l_sms_access.'</h2>
350
				<p>'.$l_sms_explain.'</p>
400
				<p>'.$l_sms_explain.'</p>
351
				<p><font color="green"><center>'.$l_service_sms.'</center></font></p>
401
				<p><font color="green"><center>'.$l_service_sms.'</center></font></p>
352
				<img src="'.$img_rep.''.$img_sms.'">
402
				<img src="'.$img_rep.''.$img_sms.'">
353
			</div>
403
			</div>
354
';
404
';
355
}
405
}
356
else {
406
else {
357
$sms_div='';
407
$sms_div='';
358
$sms_div_over='';
408
$sms_div_over='';
359
}
409
}
360
?>
410
?>
361
<?php
411
<?php
362
if ($direct_access || $display_menu){
412
if ($direct_access || $display_menu){
363
	echo "	<div id=\"box_bienvenue\">
413
	echo "	<div id=\"box_bienvenue\">
364
				$l_welcome
414
				$l_welcome
365
			</div>
415
			</div>
366
			<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\">
416
			<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\">
367
				<span>$l_logout</span>
417
				<span>$l_logout</span>
368
				<img src=\"$img_rep$img_internet\">
418
				<img src=\"$img_rep$img_internet\">
369
			</div>
419
			</div>
370
			<div class=\"box_menu\" id=\"box_certif\" onmouseover=\"valoriserDiv5(text_certif);\">
420
			<div class=\"box_menu\" id=\"box_certif\" onmouseover=\"valoriserDiv5(text_certif);\">
371
				<span>$l_install_certif</span>
421
				<span>$l_install_certif</span>
372
				<img src=\"$img_rep$img_certificate\">
422
				<img src=\"$img_rep$img_certificate\">
373
			</div>
423
			</div>
374
			<div class=\"box_menu\" id=\"box_mdp\" onmouseover=\"valoriserDiv5(text_mdp);\">
424
			<div class=\"box_menu\" id=\"box_mdp\" onmouseover=\"valoriserDiv5(text_mdp);\">
375
				<img src=\"$img_rep$img_pwd\">
425
				<img src=\"$img_rep$img_pwd\">
376
				<span>$l_password_change</span>
426
				<span>$l_password_change</span>
377
			</div>		
427
			</div>		
378
			$sms_div
428
			$sms_div
379
			<div class=\"div-cache\" id=\"text_conn\">
429
			<div class=\"div-cache\" id=\"text_conn\">
380
				<h2>$l_logout</h2>
430
				<h2>$l_logout</h2>
381
				<p>$l_logout_explain</p>
431
				<p>$l_logout_explain</p>
382
				<img src=\"$img_rep$img_internet\">
432
				<img src=\"$img_rep$img_internet\">
383
			</div>
433
			</div>
384
			<div class=\"div-cache\" id=\"text_certif\">
434
			<div class=\"div-cache\" id=\"text_certif\">
385
				<h2>$l_install_certif_more</h2>
435
				<h2>$l_install_certif_more</h2>
386
				<p>$l_certif_explain $l_certif_explain_help</p>
436
				<p>$l_certif_explain $l_certif_explain_help</p>
387
				<img src=\"$img_rep$img_certificate\">				
437
				<img src=\"$img_rep$img_certificate\">				
388
			</div>
438
			</div>
389
			<div class=\"div-cache\" id=\"text_mdp\">
439
			<div class=\"div-cache\" id=\"text_mdp\">
390
				<h2>$l_password_change</h2>
440
				<h2>$l_password_change</h2>
391
				<p>$l_password_change_explain</p>
441
				<p>$l_password_change_explain</p>
392
				<img src=\"$img_rep$img_pwd\">
442
				<img src=\"$img_rep$img_pwd\">
393
			</div>
443
			</div>
394
			$sms_div_over
444
			$sms_div_over
395
			<div id=\"box_info\">
445
			<div id=\"box_info\">
396
			</div>";
446
			</div>";
397
	}
447
	}
398
else {
448
else {
-
 
449
	#if user need to be warn about that someone who read his logs
-
 
450
	if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1')
-
 
451
	{
-
 
452
		
-
 
453
		
-
 
454
	$filename="/var/www/html/acc/backup/log_info.txt";
-
 
455
	$l_explain_warn="";
-
 
456
	if(file_exists($filename)){
-
 
457
		$fichier = fopen($filename, "r");
-
 
458
		$content = file($filename);
-
 
459
        	foreach($content as $line){
-
 
460
			$infos=explode("|||", $line);
-
 
461
			$log_date=$infos[0];	
-
 
462
			$log_user=$infos[1];	
-
 
463
			$log_reason=$infos[2];	
-
 
464
			$log_ip=$infos[3];	
-
 
465
		}
-
 
466
 
-
 
467
		$l_explain_warn="$l_explain_warn_name$log_user ( $l_explain_warn_ip$log_ip ) $l_explain_warn_date$log_date $l_explain_warn_reason$log_reason";
-
 
468
	}
-
 
469
	else
-
 
470
	{
-
 
471
		echo "Log error!";
-
 
472
	}
-
 
473
	
-
 
474
	
-
 
475
	echo "
-
 
476
		<div id=\"box_refuse\">
-
 
477
			<img src=\"$img_rep$img_warning\">
-
 
478
			<p>$l_explain_warn</p>
-
 
479
 
-
 
480
		</div>
-
 
481
		<div id=\"liens_redir\">
-
 
482
			<p>$l_continue_link</p>
-
 
483
		</div>";
-
 
484
 
-
 
485
	}
-
 
486
	else
-
 
487
	{
399
		echo "
488
		echo "
400
			<div id=\"box_refuse\">
489
			<div id=\"box_refuse\">
401
				<img src=\"$img_rep$img_false\">
490
				<img src=\"$img_rep$img_false\">
402
				<p>$l_explain</p>
491
				<p>$l_explain</p>
403
			</div>
492
			</div>
404
			<div id=\"liens_redir\">
493
			<div id=\"liens_redir\">
405
				<p>$l_back_page</p>
494
				<p>$l_back_page</p>
406
			</div>";
495
			</div>";
407
		}
496
	}
-
 
497
}
408
	if (($network_pb)&&(! $direct_access)) {
498
	if (($network_pb)&&(! $direct_access)) {
409
	echo "	<span>Diagnostic : $diagnostic</span>";
499
	echo "	<span>Diagnostic : $diagnostic</span>";
410
	}
500
	}
411
?>
501
?>
412
		</div>
502
		</div>
413
		<div id="corner">
503
		<div id="corner">
414
			<div id="adm" class="corn">
504
			<div id="adm" class="corn">
415
				<a href="https://<?php echo $hostname; ?>/acc/"><img src=<?php echo $img_rep.''.$img_adm; ?>></a>
505
				<a href="https://<?php echo $hostname; ?>/acc/"><img src=<?php echo $img_rep.''.$img_adm; ?>></a>
416
			</div>
506
			</div>
417
		</div>
507
		</div>
418
	</body>
508
	</body>
419
</html>
509
</html>
420
 
510
 
421
 
511
 
422
 
512