Subversion Repositories ALCASAR

Rev

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

Rev 2010 Rev 2054
1
<?php
1
<?php
2
# $Id: index.php 2010 2016-07-26 14:08:50Z raphael.pion $
2
# $Id: index.php 2054 2016-10-26 12:32:17Z 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
86
//if user need to be warn
87
if(isset($_GET['warn']) && isset($_GET['url']))
87
if(isset($_GET['warn']) && isset($_GET['url']))
88
{
88
{
89
	$direct_access = False;
89
	$direct_access = False;
90
}
90
}
91
 
91
 
92
 
92
 
93
# If the user is connected : retrieve the 3 last connexions
93
# If the user is connected : retrieve the 3 last connexions
94
if ((isset ($user[4])) && ($user[4] != "0")){
94
if ((isset ($user[4])) && ($user[4] != "0")){
95
 
95
 
96
	if(isset($_GET['redirect'])) # if user has been warned, we redirect him to his website
96
	if(isset($_GET['redirect'])) # if user has been warned, we redirect him to his website
97
	{
97
	{
98
		$redir = "http://".$_GET['url'];  
98
		$redir = "http://".$_GET['url'];  
99
		header("Location: $_GET[url]",TRUE,307);
99
		header("Location: $_GET[url]",TRUE,307);
100
		exit; 
100
		exit; 
101
	}
101
	}
102
 
102
 
103
 
103
 
104
	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"))){
105
		include_once("/etc/freeradius-web/config.php");
105
		include_once("/etc/freeradius-web/config.php");
106
		include_once("./acc/manager/lib/sql/drivers/mysql/functions.php");
106
		include_once("./acc/manager/lib/sql/drivers/mysql/functions.php");
107
		
107
		
108
		$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";
109
		$link = @da_sql_pconnect($config); // on affiche pas les erreurs
109
		$link = @da_sql_pconnect($config); // on affiche pas les erreurs
110
		if ($link){
110
		if ($link){
111
			$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
112
			
112
			
113
			if ($res){
113
			if ($res){
114
				$connection_history.= "<ul>";
114
				$connection_history.= "<ul>";
115
				while(($row = @da_sql_fetch_array($res,$config))){
115
				while(($row = @da_sql_fetch_array($res,$config))){
116
					$connected = "";
116
					$connected = "";
117
					if ($row['acctstoptime'] == "") $connected = " (active)";
117
					if ($row['acctstoptime'] == "") $connected = " (active)";
118
					$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>";
119
				}
119
				}
120
				$connection_history.="</ul>";
120
				$connection_history.="</ul>";
121
			}
121
			}
122
		}
122
		}
123
	}
123
	}
124
}
124
}
125
else # user not connected
125
else # user not connected
126
{
126
{
127
	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);
128
	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 
129
	{
129
	{
130
		$display_menu = True; # Display menu for user not_auth_yet
130
		$display_menu = True; # Display menu for user not_auth_yet
131
		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
132
		{
132
		{
133
			$redirect_link = $_SERVER['HTTP_HOST']; # to keep the user URL
133
			$redirect_link = $_SERVER['HTTP_HOST']; # to keep the user URL
134
		}
134
		}
135
 
135
 
136
	}
136
	}
137
	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 ...)
138
	{
138
	{
139
		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)
140
		$redir = "http://".$_GET['url'];  
140
		$redir = "http://".$_GET['url'];  
141
		header("Location: $redir",TRUE,307);
141
		header("Location: $redir",TRUE,307);
142
		exit; 
142
		exit; 
143
	}
143
	}
144
	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.
145
		 echo "<script>window.location.reload(true)</script>"; # force DNS request
145
		 echo "<script>window.location.reload(true)</script>"; # force DNS request
146
	}	
146
	}	
147
	
147
	
148
	
148
	
149
}
149
}
150
# Choice of language
150
# Choice of language
151
if($Language == 'fr'){
151
if($Language == 'fr'){
152
  $l_access_denied = "Contrôle d'accès";
152
  $l_access_denied = "Contrôle d'accès";
153
  $l_access_welcome = "Bienvenue sur ALCASAR";
153
  $l_access_welcome = "Bienvenue sur ALCASAR";
154
  $l_access_unavailable = "ACC&Egrave;S INDISPONIBLE";
154
  $l_access_unavailable = "ACC&Egrave;S INDISPONIBLE";
155
  $l_required_domain = "Site WEB demand&eacute;";
155
  $l_required_domain = "Site WEB demand&eacute;";
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.";
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.";
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.";
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.";
158
  $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.";
159
  $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.";
160
  $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.";
161
  $l_welcome = "Page principale de votre portail captif";
161
  $l_welcome = "Page principale de votre portail captif";
162
  $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>";
163
  $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>";
164
  $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>";
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>";
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>";
166
  $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>";
167
  $l_category = "catégorie :";
167
  $l_category = "catégorie :";
168
if ((isset ($user[4])) && ($user[4] == "0")) {
168
if ((isset ($user[4])) && ($user[4] == "0")) {
169
	  $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.";
170
	  $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>";
171
	}
171
	}
172
  else {
172
  else {
173
	  if ($user[5] != $user[0]) // authentication exception or not
173
	  if ($user[5] != $user[0]) // authentication exception or not
174
	  {
174
	  {
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";
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";
176
		$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>";
177
	  }
177
	  }
178
	  else
178
	  else
179
	  {
179
	  {
180
		  $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";
181
		  $l_logout = "Information des connexions";
181
		  $l_logout = "Information des connexions";
182
	  }
182
	  }
183
	}
183
	}
184
  $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>";
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.";
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.";
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";
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";
187
  $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>";
188
  $l_service_sms = "Service SMS actif";
188
  $l_service_sms = "Service SMS actif";
189
  $l_service_sms_n = "Service SMS non actif";
189
  $l_service_sms_n = "Service SMS non actif";
190
  $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.";
191
  $l_explain_warn = "L'administrateur a créé une archive contenant vos journaux de connexion dans le cadre d'une affaire judiciaire.";
-
 
192
  if(isset($_GET['url']))
-
 
193
  {
192
  $l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>Je comprends et je souhaite continuer ma navigation.</a>";
194
  	$l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>Je comprends et je souhaite continuer ma navigation.</a>";
-
 
195
  }
-
 
196
  else
-
 
197
  {
-
 
198
  	$l_continue_link = "<a href='index.php' class='button'>Je comprends et je souhaite continuer ma navigation.</a>";
-
 
199
  }
193
  $l_title_warn="Cher utilisateur, ";
200
  $l_title_warn="Cher utilisateur, ";
194
  $l_explain_warn_name="Une personne sous le nom de ";
201
  $l_explain_warn_name="Une personne sous le nom de ";
195
  $l_explain_warn_ip="sous cette IP : ";
202
  $l_explain_warn_ip="sous cette IP : ";
196
  $l_explain_warn_date="a consulté vos journaux de connexion le ";
203
  $l_explain_warn_date="a consulté vos journaux de connexion le ";
197
  $l_explain_warn_reason="en émettant la raison suivante : ";
204
  $l_explain_warn_reason="en émettant la raison suivante : ";
198
}
205
}
199
else if($Language == 'pt'){
206
else if($Language == 'pt'){
200
  $l_access_denied = "Controle de acesso";
207
  $l_access_denied = "Controle de acesso";
201
  $l_access_welcome = "Bem-vindo ao Alcasar";
208
  $l_access_welcome = "Bem-vindo ao Alcasar";
202
  $l_access_unavailable = "ACESSO INDISPONÍVEL";
209
  $l_access_unavailable = "ACESSO INDISPONÍVEL";
203
  $l_required_domain = "Site WEB Obrigatório";
210
  $l_required_domain = "Site WEB Obrigatório";
204
  $l_explain_acc_access = "Este é o centro de controle do portal para acessar você deve ter uma conta administrativa valida.";
211
  $l_explain_acc_access = "Este é o centro de controle do portal para acessar você deve ter uma conta administrativa valida.";
205
  $l_explain_access_deny = "Você tenta se conectar a um recurso cujo conteúdo é considerado inadequado no conteúdo de informações.";
212
  $l_explain_access_deny = "Você tenta se conectar a um recurso cujo conteúdo é considerado inadequado no conteúdo de informações.";
206
  $l_explain_net_pb = "O sistema detectou que o acesso é de risco, não será permitido o acesso";
213
  $l_explain_net_pb = "O sistema detectou que o acesso é de risco, não será permitido o acesso";
207
  $l_contact_access_deny = "Entre em contato com o administrador do sistema de segurança se acha que essa filtragem é abusiva.";
214
  $l_contact_access_deny = "Entre em contato com o administrador do sistema de segurança se acha que essa filtragem é abusiva.";
208
  $l_contact_net_pb = "Entre em contato com a empresa fornecedora de Internet para mais informações";
215
  $l_contact_net_pb = "Entre em contato com a empresa fornecedora de Internet para mais informações";
209
  $l_welcome = "Página do portal";
216
  $l_welcome = "Página do portal";
210
  $l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
217
  $l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
211
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Instalar Certificado Alcasar AC</a>";
218
  $l_install_certif = "<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>";
219
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Instalar Certificado Alcasar AC</a>";
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>";
220
  $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>";
214
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Essa foi uma ajuda complementar</a>";
221
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Essa foi uma ajuda complementar</a>";
215
  $l_category = "categoria :";
222
  $l_category = "categoria :";
216
if ((isset ($user[4])) && ($user[4] == "0")) {
223
if ((isset ($user[4])) && ($user[4] == "0")) {
217
	$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
224
	$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
218
	$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Abrir uma conexão de Internet</a>";
225
	$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Abrir uma conexão de Internet</a>";
219
	}
226
	}
220
  else {
227
  else {
221
	  if ($user[5] != $user[0]) // authentication exception or not
228
	  if ($user[5] != $user[0]) // authentication exception or not
222
	  {
229
	  {
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";
230
		  $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";
224
		  $l_logout = "<a href=\"http://$hostname:3990/logoff\">Sair da Internet</a>";
231
		  $l_logout = "<a href=\"http://$hostname:3990/logoff\">Sair da Internet</a>";
225
	  }
232
	  }
226
	  else
233
	  else
227
	  {
234
	  {
228
		  $l_logout_explain = "O sistema ($user[5]) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history";
235
		  $l_logout_explain = "O sistema ($user[5]) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history";
229
		  $l_logout = "Informações de conexões";
236
		  $l_logout = "Informações de conexões";
230
	  }
237
	  }
231
  	}
238
  	}
232
  $l_password_change = "<a href=\"https://$hostname/pass\">Mudar sua senha</a>";
239
  $l_password_change = "<a href=\"https://$hostname/pass\">Mudar sua senha</a>";
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.";
240
  $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.";
234
  $l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
241
  $l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
235
  $l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
242
  $l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
236
  $l_service_sms = "SMS service enable";
243
  $l_service_sms = "SMS service enable";
237
  $l_service_sms_n = "SMS service disable";
244
  $l_service_sms_n = "SMS service disable";
238
  $l_acc_sms = "Auto registration by SMS";
245
  $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."; 
246
  $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."; 
-
 
247
  if(isset($_GET['url']))
-
 
248
  {
240
  $l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>Lo comprendo y deseo continuar mi navegación.</a>";
249
 	 $l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>Lo comprendo y deseo continuar mi navegación.</a>";
-
 
250
  }
-
 
251
  else
-
 
252
  {
-
 
253
  	 $l_continue_link = "<a href='index.php' class='button'>Lo comprendo y deseo continuar mi navegación.</a>";
-
 
254
  }
241
  $l_title_warn="Estimado usuario,";
255
  $l_title_warn="Estimado usuario,";
242
  $l_explain_warn_name="El usario ";
256
  $l_explain_warn_name="El usario ";
243
  $l_explain_warn_ip="con este IP : ";
257
  $l_explain_warn_ip="con este IP : ";
244
  $l_explain_warn_date="consultó a sus registros de conexión el ";
258
  $l_explain_warn_date="consultó a sus registros de conexión el ";
245
  $l_explain_warn_reason="con la siguiente razón : ";
259
  $l_explain_warn_reason="con la siguiente razón : ";
246
}
260
}
247
else {
261
else {
248
  $l_access_denied = "Access control";
262
  $l_access_denied = "Access control";
249
  $l_access_welcome = "Welcome on ALCASAR";
263
  $l_access_welcome = "Welcome on ALCASAR";
250
  $l_access_unavailable = "ACCESS UNAVAILABLE";
264
  $l_access_unavailable = "ACCESS UNAVAILABLE";
251
  $l_required_domain = "Required WEB site";
265
  $l_required_domain = "Required WEB site";
252
  $l_explain_acc_access = "This center control the portal. You must have an administrative account.";
266
  $l_explain_acc_access = "This center control the portal. You must have an administrative account.";
253
  $l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
267
  $l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
254
  $l_explain_net_pb = "Your portal has just detected that the Internet access is down";
268
  $l_explain_net_pb = "Your portal has just detected that the Internet access is down";
255
  $l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
269
  $l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
256
  $l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
270
  $l_contact_net_pb = "Contact your network responsive or your Internet provider for more information";
257
  $l_welcome = "Your captive portal main page";
271
  $l_welcome = "Your captive portal main page";
258
  $l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
272
  $l_sms_access = "<a href=\"https://$hostname/autoregistrationinfo.php\">Auto Registration by SMS</a>";
259
  $l_install_certif = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Install ALCASAR AC Certificate</a>";
273
  $l_install_certif = "<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>";
274
  $l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Install ALCASAR AC Certificate</a>";
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>";
275
  $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>";
262
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
276
  $l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
263
  $l_category = "category :";
277
  $l_category = "category :";
264
if ((isset ($user[4])) && ($user[4] == "0")) {
278
if ((isset ($user[4])) && ($user[4] == "0")) {
265
	$l_logout_explain = "No Internet consultation session is actualy open on your system";
279
	$l_logout_explain = "No Internet consultation session is actualy open on your system";
266
	$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Open an Internet session</a>";
280
	$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Open an Internet session</a>";
267
	}
281
	}
268
  else {
282
  else {
269
	  if ($user[5] != $user[0]) // authentication exception or not
283
	  if ($user[5] != $user[0]) // authentication exception or not
270
	  {
284
	  {
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";
285
		  $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";
272
		  $l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff from internet</a>";
286
		  $l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff from internet</a>";
273
	  }
287
	  }
274
	  else
288
	  else
275
	  {
289
	  {
276
		  $l_logout_explain = "Your system ($user[5]) is in exception of authentication.<br><br>$nb_connection_history Last logins :$connection_history";
290
		  $l_logout_explain = "Your system ($user[5]) is in exception of authentication.<br><br>$nb_connection_history Last logins :$connection_history";
277
		  $l_logout = "Connections information";
291
		  $l_logout = "Connections information";
278
	  }
292
	  }
279
  	}
293
  	}
280
  $l_password_change = "<a href=\"https://$hostname/pass\">Change your password</a>";
294
  $l_password_change = "<a href=\"https://$hostname/pass\">Change your password</a>";
281
  $l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
295
  $l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
282
  $l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
296
  $l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
283
  $l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
297
  $l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
284
  $l_service_sms = "SMS service enable";
298
  $l_service_sms = "SMS service enable";
285
  $l_service_sms_n = "SMS service disable";
299
  $l_service_sms_n = "SMS service disable";
286
  $l_acc_sms = "Auto registration by SMS";
300
  $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.";
301
  $l_explain_warn = "The administrator created an archive which contains your imputabilities logs for a judicial investigation.";
-
 
302
  if(isset($_GET['url']))
-
 
303
  {
288
  $l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>I understand and I wish to continue.</a>";
304
  	$l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>I understand and I wish to continue.</a>";
-
 
305
  }
-
 
306
  else
-
 
307
  {
-
 
308
 	 $l_continue_link = "<a href='index.php' class='button'>I understand and I wish to continue.</a>";
-
 
309
  }
289
  $l_title_warn="Dear user,";
310
  $l_title_warn="Dear user,";
290
  $l_explain_warn_name="Someone called ";
311
  $l_explain_warn_name="Someone called ";
291
  $l_explain_warn_ip="with this IP : ";
312
  $l_explain_warn_ip="with this IP : ";
292
  $l_explain_warn_date="has read your connexion logs at ";
313
  $l_explain_warn_date="has read your connexion logs at ";
293
  $l_explain_warn_reason="because : ";
314
  $l_explain_warn_reason="because : ";
294
}
315
}
295
 
316
 
296
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
317
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
297
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
318
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
298
 
319
 
299
# set the icons
320
# set the icons
300
$img_rep = "/images/";
321
$img_rep = "/images/";
301
$img_organisme = "organisme.png";
322
$img_organisme = "organisme.png";
302
$img_access = "globe_acces_70.png";
323
$img_access = "globe_acces_70.png";
303
$img_connect = "globe_70.png";
324
$img_connect = "globe_70.png";
304
$img_warning = "globe_warning_70.png";
325
$img_warning = "globe_warning_70.png";
305
$img_pwd = "cle_ombre.png";
326
$img_pwd = "cle_ombre.png";
306
$img_certificate = "certificat.png";
327
$img_certificate = "certificat.png";
307
$img_acc = "logo-alcasar_70.png";
328
$img_acc = "logo-alcasar_70.png";
308
$img_sms = "sms.png";
329
$img_sms = "sms.png";
309
$img_false = "interdit.png";
330
$img_false = "interdit.png";
310
$img_adm = "adm.png";
331
$img_adm = "adm.png";
311
$img_internet = $img_connect;
332
$img_internet = $img_connect;
312
 
333
 
313
if ((isset ($user[4])) && ($user[4] == "0")) {
334
if ((isset ($user[4])) && ($user[4] == "0")) {
314
	if (! $network_pb) {
335
	if (! $network_pb) {
315
		$img_internet = $img_access;
336
		$img_internet = $img_access;
316
		}
337
		}
317
		else {
338
		else {
318
		$img_internet = $img_warning;
339
		$img_internet = $img_warning;
319
	}
340
	}
320
}
341
}
321
else {
342
else {
322
	$img_internet = $img_connect;
343
	$img_internet = $img_connect;
323
}
344
}
324
 
345
 
325
# cleaning the cache
346
# cleaning the cache
326
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
347
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
327
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
348
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
328
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
349
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
329
header("Cache-Control: post-check=0, pre-check=0", false);
350
header("Cache-Control: post-check=0, pre-check=0", false);
330
header("Pragma: no-cache");
351
header("Pragma: no-cache");
331
?>
352
?>
332
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
353
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
333
	<html>
354
	<html>
334
	<head>
355
	<head>
335
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
356
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
336
	<title>ALCASAR - <?php echo $l_title; ?></title>
357
	<title>ALCASAR - <?php echo $l_title; ?></title>
337
	<meta http-equiv="Cache-control" content="no-cache">
358
	<meta http-equiv="Cache-control" content="no-cache">
338
	<meta http-equiv="Pragma" content="no-cache">
359
	<meta http-equiv="Pragma" content="no-cache">
339
<?php
360
<?php
340
	echo "<style>";
361
	echo "<style>";
341
	include("css/style_intercept.css");
362
	include("css/style_intercept.css");
342
	echo "</style>";
363
	echo "</style>";
343
?>
364
?>
344
<script type="text/javascript">
365
<script type="text/javascript">
345
	function valoriserDiv5(param){
366
	function valoriserDiv5(param){
346
		document.getElementById("box_info").innerHTML = param.innerHTML;
367
		document.getElementById("box_info").innerHTML = param.innerHTML;
347
	}
368
	}
348
</script>
369
</script>
349
</head>
370
</head>
350
<body onload="valoriserDiv5(text_conn);">
371
<body onload="valoriserDiv5(text_conn);">
351
<?php
372
<?php
352
if ($direct_access || $display_menu){
373
if ($direct_access || $display_menu){
353
	echo "
374
	echo "
354
		<div id=\"cadre_titre\" class=\"titre_controle\">
375
		<div id=\"cadre_titre\" class=\"titre_controle\">
355
			<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
376
			<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
356
	if ($network_pb) {
377
	if ($network_pb) {
357
		echo "	<span>$l_explain_net_pb</span>";
378
		echo "	<span>$l_explain_net_pb</span>";
358
		}
379
		}
359
	}
380
	}
360
	else {
381
	else {
361
		#if user need to be warn about that someone who read his logs
382
		#if user need to be warn about that someone who read his logs
362
		if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1')
383
		if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1')
363
		{
384
		{
364
		echo"
385
		echo"
365
			<div id=\"cadre_titre\" class=\"titre_refus\">
386
			<div id=\"cadre_titre\" class=\"titre_refus\">
366
			<p id=\"acces_controle\" class=\"titre_refus\">$l_title_warn</p>";
387
			<p id=\"acces_controle\" class=\"titre_refus\">$l_title_warn</p>";
367
		}
388
		}
368
		else
389
		else
369
		{
390
		{
370
		echo"
391
		echo"
371
			<div id=\"cadre_titre\" class=\"titre_refus\">
392
			<div id=\"cadre_titre\" class=\"titre_refus\">
372
			<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>";
393
			<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>";
373
		}
394
		}
374
	}
395
	}
375
?>
396
?>
376
			<div id="boite_logo">
397
			<div id="boite_logo">
377
				<img src="<?php echo "$img_rep$img_organisme"; ?>">
398
				<img src="<?php echo "$img_rep$img_organisme"; ?>">
378
			</div>
399
			</div>
379
		</div>
400
		</div>
380
		<div id="contenu_acces">
401
		<div id="contenu_acces">
381
			<div id="box_url">
402
			<div id="box_url">
382
<?php 
403
<?php 
383
# search here in the blacklist categories if we want to display it (if ((! $direct_access) && (! $network_pb)){}
404
# search here in the blacklist categories if we want to display it (if ((! $direct_access) && (! $network_pb)){}
384
?>
405
?>
385
			</div>
406
			</div>
386
<?php
407
<?php
387
# Check if the SMS service is enable
408
# Check if the SMS service is enable
388
$service_SMS_status="false";
409
$service_SMS_status="false";
389
if ($service_SMS_status == "true") {
410
if ($service_SMS_status == "true") {
390
$sms_div='	
411
$sms_div='	
391
			<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);">
412
			<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);">
392
				<span>'.$l_sms_access.'</span>
413
				<span>'.$l_sms_access.'</span>
393
				<img src="'.$img_rep.''.$img_sms.'">
414
				<img src="'.$img_rep.''.$img_sms.'">
394
			</div>
415
			</div>
395
';
416
';
396
 
417
 
397
$sms_div_over='			
418
$sms_div_over='			
398
			<div class="div-cache" id="text_acc">
419
			<div class="div-cache" id="text_acc">
399
				<h2>'.$l_sms_access.'</h2>
420
				<h2>'.$l_sms_access.'</h2>
400
				<p>'.$l_sms_explain.'</p>
421
				<p>'.$l_sms_explain.'</p>
401
				<p><font color="green"><center>'.$l_service_sms.'</center></font></p>
422
				<p><font color="green"><center>'.$l_service_sms.'</center></font></p>
402
				<img src="'.$img_rep.''.$img_sms.'">
423
				<img src="'.$img_rep.''.$img_sms.'">
403
			</div>
424
			</div>
404
';
425
';
405
}
426
}
406
else {
427
else {
407
$sms_div='';
428
$sms_div='';
408
$sms_div_over='';
429
$sms_div_over='';
409
}
430
}
410
?>
431
?>
411
<?php
432
<?php
412
if ($direct_access || $display_menu){
433
if ($direct_access || $display_menu){
413
	echo "	<div id=\"box_bienvenue\">
434
	echo "	<div id=\"box_bienvenue\">
414
				$l_welcome
435
				$l_welcome
415
			</div>
436
			</div>
416
			<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\">
437
			<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\">
417
				<span>$l_logout</span>
438
				<span>$l_logout</span>
418
				<img src=\"$img_rep$img_internet\">
439
				<img src=\"$img_rep$img_internet\">
419
			</div>
440
			</div>
420
			<div class=\"box_menu\" id=\"box_certif\" onmouseover=\"valoriserDiv5(text_certif);\">
441
			<div class=\"box_menu\" id=\"box_certif\" onmouseover=\"valoriserDiv5(text_certif);\">
421
				<span>$l_install_certif</span>
442
				<span>$l_install_certif</span>
422
				<img src=\"$img_rep$img_certificate\">
443
				<img src=\"$img_rep$img_certificate\">
423
			</div>
444
			</div>
424
			<div class=\"box_menu\" id=\"box_mdp\" onmouseover=\"valoriserDiv5(text_mdp);\">
445
			<div class=\"box_menu\" id=\"box_mdp\" onmouseover=\"valoriserDiv5(text_mdp);\">
425
				<img src=\"$img_rep$img_pwd\">
446
				<img src=\"$img_rep$img_pwd\">
426
				<span>$l_password_change</span>
447
				<span>$l_password_change</span>
427
			</div>		
448
			</div>		
428
			$sms_div
449
			$sms_div
429
			<div class=\"div-cache\" id=\"text_conn\">
450
			<div class=\"div-cache\" id=\"text_conn\">
430
				<h2>$l_logout</h2>
451
				<h2>$l_logout</h2>
431
				<p>$l_logout_explain</p>
452
				<p>$l_logout_explain</p>
432
				<img src=\"$img_rep$img_internet\">
453
				<img src=\"$img_rep$img_internet\">
433
			</div>
454
			</div>
434
			<div class=\"div-cache\" id=\"text_certif\">
455
			<div class=\"div-cache\" id=\"text_certif\">
435
				<h2>$l_install_certif_more</h2>
456
				<h2>$l_install_certif_more</h2>
436
				<p>$l_certif_explain $l_certif_explain_help</p>
457
				<p>$l_certif_explain $l_certif_explain_help</p>
437
				<img src=\"$img_rep$img_certificate\">				
458
				<img src=\"$img_rep$img_certificate\">				
438
			</div>
459
			</div>
439
			<div class=\"div-cache\" id=\"text_mdp\">
460
			<div class=\"div-cache\" id=\"text_mdp\">
440
				<h2>$l_password_change</h2>
461
				<h2>$l_password_change</h2>
441
				<p>$l_password_change_explain</p>
462
				<p>$l_password_change_explain</p>
442
				<img src=\"$img_rep$img_pwd\">
463
				<img src=\"$img_rep$img_pwd\">
443
			</div>
464
			</div>
444
			$sms_div_over
465
			$sms_div_over
445
			<div id=\"box_info\">
466
			<div id=\"box_info\">
446
			</div>";
467
			</div>";
447
	}
468
	}
448
else {
469
else {
449
	#if user need to be warn about that someone who read his logs
470
	#if user need to be warn about that someone who read his logs
450
	if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1')
471
	if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1')
451
	{
472
	{
452
		
473
		
453
		
474
		
454
	$filename="/var/www/html/acc/backup/log_info.txt";
475
	$filename="/var/www/html/acc/backup/log_info.txt";
455
	$l_explain_warn="";
476
	$l_explain_warn="";
456
	if(file_exists($filename)){
477
	if(file_exists($filename)){
457
		$fichier = fopen($filename, "r");
478
		$fichier = fopen($filename, "r");
458
		$content = file($filename);
479
		$content = file($filename);
459
        	foreach($content as $line){
480
        	foreach($content as $line){
460
			$infos=explode("|||", $line);
481
			$infos=explode("|||", $line);
461
			$log_date=$infos[0];	
482
			$log_date=$infos[0];	
462
			$log_user=$infos[1];	
483
			$log_user=$infos[1];	
463
			$log_reason=$infos[2];	
484
			$log_reason=$infos[2];	
464
			$log_ip=$infos[3];	
485
			$log_ip=$infos[3];	
465
		}
486
		}
466
 
487
 
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";
488
		$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
	}
489
	}
469
	else
490
	else
470
	{
491
	{
471
		echo "Log error!";
492
		echo "Log error!";
472
	}
493
	}
473
	
494
	
474
	
495
	
475
	echo "
496
	echo "
476
		<div id=\"box_refuse\">
497
		<div id=\"box_refuse\">
477
			<img src=\"$img_rep$img_warning\">
498
			<img src=\"$img_rep$img_warning\">
478
			<p>$l_explain_warn</p>
499
			<p>$l_explain_warn</p>
479
 
500
 
480
		</div>
501
		</div>
481
		<div id=\"liens_redir\">
502
		<div id=\"liens_redir\">
482
			<p>$l_continue_link</p>
503
			<p>$l_continue_link</p>
483
		</div>";
504
		</div>";
484
 
505
 
485
	}
506
	}
486
	else
507
	else
487
	{
508
	{
488
		echo "
509
		echo "
489
			<div id=\"box_refuse\">
510
			<div id=\"box_refuse\">
490
				<img src=\"$img_rep$img_false\">
511
				<img src=\"$img_rep$img_false\">
491
				<p>$l_explain</p>
512
				<p>$l_explain</p>
492
			</div>
513
			</div>
493
			<div id=\"liens_redir\">
514
			<div id=\"liens_redir\">
494
				<p>$l_back_page</p>
515
				<p>$l_back_page</p>
495
			</div>";
516
			</div>";
496
	}
517
	}
497
}
518
}
498
	if (($network_pb)&&(! $direct_access)) {
519
	if (($network_pb)&&(! $direct_access)) {
499
	echo "	<span>Diagnostic : $diagnostic</span>";
520
	echo "	<span>Diagnostic : $diagnostic</span>";
500
	}
521
	}
501
?>
522
?>
502
		</div>
523
		</div>
503
		<div id="corner">
524
		<div id="corner">
504
			<div id="adm" class="corn">
525
			<div id="adm" class="corn">
505
				<a href="https://<?php echo $hostname; ?>/acc/"><img src=<?php echo $img_rep.''.$img_adm; ?>></a>
526
				<a href="https://<?php echo $hostname; ?>/acc/"><img src=<?php echo $img_rep.''.$img_adm; ?>></a>
506
			</div>
527
			</div>
507
		</div>
528
		</div>
508
	</body>
529
	</body>
509
</html>
530
</html>
510
 
531
 
511
 
532
 
512
 
533