Subversion Repositories ALCASAR

Rev

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

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