Subversion Repositories ALCASAR

Rev

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

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