Subversion Repositories ALCASAR

Rev

Rev 1986 | Rev 1988 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

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