Subversion Repositories ALCASAR

Rev

Rev 2743 | Rev 2809 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2743 Rev 2766
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: index.php 2743 2019-07-15 21:43:53Z rexy $
2
# $Id: index.php 2766 2019-11-19 21:37:58Z rexy $
3
#
3
#
4
# index.php for ALCASAR by 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
Line 153... Line 153...
153
	$l_contact_access_deny = "Contactez le responsable de la séurité (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
153
	$l_contact_access_deny = "Contactez le responsable de la séurité (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
154
	$l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information.";
154
	$l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information.";
155
	$l_sms_access = "<a href=\"//$hostname/autoregistrationinfo.php\">Créer votre compte par SMS</a>";
155
	$l_sms_access = "<a href=\"//$hostname/autoregistrationinfo.php\">Créer votre compte par SMS</a>";
156
	$l_install_certif = "Installer le certificat racine";
156
	$l_install_certif = "Installer le certificat racine";
157
	$l_install_certif_more = "Installation du certificat de l'autorité racine d'ALCASAR";
157
	$l_install_certif_more = "Installation du certificat de l'autorité racine d'ALCASAR";
158
	$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>";
158
	$l_certif_explain = "Permet une communication sécurisées entre vous et ALCASAR.<br>";
159
	$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
159
	$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
160
	$l_category = "catégorie :";
160
	$l_category = "catégorie :";
161
	if (!$user->connected) {
161
	if (!$user->connected) {
162
		$l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre système.";
162
		$l_logout_explain = "Aucune session n'est actuellement ouverte";
163
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Ouvrir une session Internet</a>";
163
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Ouvrir une session Internet</a>";
164
	} else {
164
	} else {
165
		if ($user->username != $user->mac) { // authentication exception or not
165
		if ($user->username != $user->mac) { // authentication exception or not
166
			$l_logout_explain = "Ferme la session de l'usager actuellement connecté. <br><br>Utilisateur connecté : <a href=\"$logout_link\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
166
			$l_logout_explain = "Ferme la session de l'usager actuellement connecté. <br><br>Utilisateur connecté : <a href=\"$logout_link\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
167
			$l_logout = "<a href=\"$logout_link\">Se déconnecter d'internet</a>";
167
			$l_logout = "<a href=\"$logout_link\">Se déconnecter d'internet</a>";
Line 169... Line 169...
169
			$l_logout_explain = "Votre système ($user->username) est en exception d'authentication.<br><br>$nb_connection_history dernières connexions :$connection_history";
169
			$l_logout_explain = "Votre système ($user->username) est en exception d'authentication.<br><br>$nb_connection_history dernières connexions :$connection_history";
170
			$l_logout = "Information des connexions";
170
			$l_logout = "Information des connexions";
171
		}
171
		}
172
	}
172
	}
173
	$l_password_change = "<a href=\"https://$hostname/password.php\">Changer votre mot de passe</a>";
173
	$l_password_change = "<a href=\"https://$hostname/password.php\">Changer votre mot de passe</a>";
174
	$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.";
174
	$l_password_change_explain = "Vous devez avoir un compte internet valide.";
175
	$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";
175
	$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";
176
	$l_back_page = "<a href=\"javascript:history.back()\">Page précédente</a>";
176
	$l_back_page = "<a href=\"javascript:history.back()\">Page précédente</a>";
177
	$l_service_sms = "Service SMS actif";
177
	$l_service_sms = "Service SMS actif";
178
	$l_service_sms_n = "Service SMS non actif";
178
	$l_service_sms_n = "Service SMS non actif";
179
	$l_acc_sms = "Auto enregistrement par SMS";
179
	$l_acc_sms = "Auto enregistrement par SMS";
Line 349... Line 349...
349
	$l_explain_warn_name = "شخص مسمىٰ ";
349
	$l_explain_warn_name = "شخص مسمىٰ ";
350
	$l_explain_warn_ip = "تحت هذا IP: ";
350
	$l_explain_warn_ip = "تحت هذا IP: ";
351
	$l_explain_warn_date = "إطّلع على سجلات الاتصال الخاصة بك في";
351
	$l_explain_warn_date = "إطّلع على سجلات الاتصال الخاصة بك في";
352
	$l_explain_warn_reason = "السبب المسرّح به: ";
352
	$l_explain_warn_reason = "السبب المسرّح به: ";
353
	$l_uam_domain = ":المواقع المسموحة ";
353
	$l_uam_domain = ":المواقع المسموحة ";
-
 
354
} else if ($Language === 'de') {		// German
-
 
355
	$l_access_denied = "Zugangskontrolle";
-
 
356
	$l_access_welcome = "Willkommen bei ALCASAR";
-
 
357
	$l_access_unavailable = "ZUGANG NICHT MÖGLICH";
-
 
358
	$l_required_domain = "Website benötigt";
-
 
359
	$l_explain_acc_access = "Hier ist das Kontrollcenter. Sie benötigen einen Account mit Administratorrechten.";
-
 
360
	$l_explain_access_deny = "Sie haben versucht sich mit einer Seite zu verbinden, die möglicherweise unangemessene Inhalte beinhaltet.";
-
 
361
	$l_explain_net_pb = "Offenbar funktioniert ihr Internetzugriff nicht.";
-
 
362
	$l_contact_access_deny = "Kontaktieren Sie ihren Sicherheitsbeauftragten wenn Sie denken dass diese Filterung unangemessen ist.";
-
 
363
	$l_contact_net_pb = "Kontaktieren Sie Ihren Netzwerkbeauftragten oder Ihren Internetanbieter für weitere Informationen.";
-
 
364
	$l_sms_access = "<a href=\"//$hostname/autoregistrationinfo.php\">Einen Account per SMS erstellen</a>";
-
 
365
	$l_install_certif = "Das ALCASAR AC Zertifikat installieren";
-
 
366
	$l_install_certif_more = "Das ALCASAR AC Zertifikat installieren";
-
 
367
	$l_certif_explain = "Ermöglicht einen sicheren Datenaustausch zwischen Ihrem Computer und ALCASAR.<BR>Wenn dieses Zertifikat nicht in Ihrem Browser installiert ist, könnten Sicherheitswarnungen in Ihrem Browser erscheinen.<br><br>";
-
 
368
	$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Weitere Informationen</a>";
-
 
369
	$l_category = "Kategorie:";
-
 
370
	if (!$user->connected) {
-
 
371
		$l_logout_explain = "Zurzeit ist keine Internetsitzung auf Ihrem System aktiv";
-
 
372
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Eine neue Internetzsitzung eröffnen</a>";
-
 
373
	} else {
-
 
374
		if ($user->username != $user->mac) { // authentication exception or not
-
 
375
			$l_logout_explain = "Die Sitzung des aktuell eingeloggten Users beenden.<br> Aktuell eingeloggter User: <a href=\"$logout_link\" title=\"Ausloggen $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history letzte Verbindungen:$connection_history";
-
 
376
			$l_logout = "<a href=\"$logout_link\">Aus dem Internet ausloggen</a>";
-
 
377
		} else {
-
 
378
			$l_logout_explain = "Ihr System ($user->username) ist nicht authentifiziert.<br><br>$nb_connection_history Letzte Verbindungen:$connection_history";
-
 
379
			$l_logout = "Informationen zur Verbindung";
-
 
380
		}
-
 
381
	}
-
 
382
	$l_password_change = "<a href=\"https://$hostname/password.php\">Passwort ändern</a>";
-
 
383
	$l_password_change_explain = "Leitet Sie auf die Seite der Passwortänderung weiter.<br><br> Sie sollten bereits einen Account für den Internetzugriff haben.";
-
 
384
	$l_sms_explain = "Leitet Sie auf die automatische Registrierungsseite weiter.<br><br><strong>Login:</strong> Ihre Telefonnummer<br><strong>Passwort:</strong> SMS content";
-
 
385
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
-
 
386
	$l_service_sms = "SMS-Service aktivieren";
-
 
387
	$l_service_sms_n = "SMS-Service deaktivieren";
-
 
388
	$l_acc_sms = "Automatische Registrierung per SMS";
-
 
389
	$l_explain_warn = "Der Administrator wird ein Archiv erstellen, welches Ihre Logdaten für den Fall einer gerichtlichen Untersuchung beinhaltet.";
-
 
390
	if (isset($_GET['url'])) {
-
 
391
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Ich verstehe und möchte fortfahren.</a>";
-
 
392
	} else {
-
 
393
		$l_continue_link = "<a href=\"index.php\" class=\"button\">Ich verstehe und möchte fortfahren.</a>";
-
 
394
	}
-
 
395
	$l_title_warn="Lieber Benutzer,";
-
 
396
	$l_explain_warn_name="Jemand namens ";
-
 
397
	$l_explain_warn_ip="mit dieser IP: ";
-
 
398
	$l_explain_warn_date="hat Ihre Verbindungsdaten eingesehen, für den ";
-
 
399
	$l_explain_warn_reason="Grund: ";
-
 
400
	$l_uam_domain = "Authorisierte Webseiten: ";
-
 
401
 
354
} else {	// English
402
} else {	// English
355
	$l_access_denied = "Access control";
403
	$l_access_denied = "Access control";
356
	$l_access_welcome = "Welcome on ALCASAR";
404
	$l_access_welcome = "Welcome to ALCASAR";
357
	$l_access_unavailable = "ACCESS UNAVAILABLE";
405
	$l_access_unavailable = "ACCESS UNAVAILABLE";
358
	$l_required_domain = "Required WEB site";
406
	$l_required_domain = "Required WEB site";
359
	$l_explain_acc_access = "This center control the portal. You must have an administrative account.";
407
	$l_explain_acc_access = "This center control the portal. You must have an administrative account.";
360
	$l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
408
	$l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
361
	$l_explain_net_pb = "Your portal has just detected that the Internet access is down";
409
	$l_explain_net_pb = "Your portal has just detected that the Internet access is down";
362
	$l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
410
	$l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive.";
363
	$l_contact_net_pb = "Contact your network responsive or your Internet provider for further information.";
411
	$l_contact_net_pb = "Contact your network responsive or your Internet provider for further information.";
364
	$l_sms_access = "<a href=\"//$hostname/autoregistrationinfo.php\">Create your account by SMS</a>";
412
	$l_sms_access = "<a href=\"//$hostname/autoregistrationinfo.php\">Create your account by SMS</a>";
365
	$l_install_certif = "Install ALCASAR AC Certificate";
413
	$l_install_certif = "Install ALCASAR AC Certificate";
366
	$l_install_certif_more = "Install ALCASAR AC Certificate";
414
	$l_install_certif_more = "Install ALCASAR AC Certificate";
367
	$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>";
415
	$l_certif_explain = "This will allow secure communications for your browser and ALCASAR<br>";
368
	$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
416
	$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
369
	$l_category = "category:";
417
	$l_category = "category:";
370
	if (!$user->connected) {
418
	if (!$user->connected) {
371
		$l_logout_explain = "No Internet consultation session is currently open on your system";
419
		$l_logout_explain = "No session is currently open";
372
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Open an Internet session</a>";
420
		$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Open an Internet session</a>";
373
	} else {
421
	} else {
374
		if ($user->username != $user->mac) { // authentication exception or not
422
		if ($user->username != $user->mac) { // authentication exception or not
375
			$l_logout_explain = "Close the session of the currently logged-in user.<br> User logged-on: <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history last connections:$connection_history";
423
			$l_logout_explain = "Close the session<br> User logged-on: <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history last connections:$connection_history";
376
			$l_logout = "<a href=\"$logout_link\">Logoff from the internet</a>";
424
			$l_logout = "<a href=\"$logout_link\">Logoff from the Internet</a>";
377
		} else {
425
		} else {
378
			$l_logout_explain = "Your system ($user->username) is in exception of authentication.<br><br>$nb_connection_history Last logins:$connection_history";
426
			$l_logout_explain = "Your system ($user->username) is in exception of authentication.<br><br>$nb_connection_history Last logins:$connection_history";
379
			$l_logout = "Connections information";
427
			$l_logout = "Connections information";
380
		}
428
		}
381
	}
429
	}
382
	$l_password_change = "<a href=\"https://$hostname/password.php\">Change your password</a>";
430
	$l_password_change = "<a href=\"https://$hostname/password.php\">Change your password</a>";
383
	$l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
431
	$l_password_change_explain = "You should already have an Internet access account.";
384
	$l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
432
	$l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
385
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
433
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
386
	$l_service_sms = "SMS service enable";
434
	$l_service_sms = "SMS service enable";
387
	$l_service_sms_n = "SMS service disable";
435
	$l_service_sms_n = "SMS service disable";
388
	$l_acc_sms = "Auto registration by SMS";
436
	$l_acc_sms = "Auto registration by SMS";
Line 419... Line 467...
419
$img_internet    = (($user->connected) ? $img_connect : ($network_pb ? $img_warning : $img_access));
467
$img_internet    = (($user->connected) ? $img_connect : ($network_pb ? $img_warning : $img_access));
420
 
468
 
421
if ($direct_access) {
469
if ($direct_access) {
422
	// Read the "Domain allowed" file
470
	// Read the "Domain allowed" file
423
	$domainsAllowed = [];
471
	$domainsAllowed = [];
424
	$fileContent = file(DOMAIN_ALLOWED_LIST);
-
 
425
	if ($fileContent) { // the file isn't empty
472
	$fileContent = file(DOMAIN_ALLOWED_LIST); if ($fileContent) { // the file isn't empty
426
		foreach ($fileContent as $line) {
473
       	foreach ($fileContent as $line) {
427
			if (!empty(trim($line))) {
474
			if (!empty(trim($line))) {
428
				$domain_fields = explode('#', $line);
475
				$domain_fields = explode('#', $line);
429
				if (!empty(trim($domain_fields[1]))) {
476
				if (!empty(trim($domain_fields[1]))) {
430
					$domain = explode('"', $domain_fields[0]);
477
					$domain = explode('"', $domain_fields[0]);
431
					$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
478
					$domain[1] = ltrim($domain[1], '.'); // remove every '.' from the beginning of domain
432
					$domainsAllowed[] = (object) [
479
					$domainsAllowed[] = (object) [
433
						'name'   => trim($domain_fields[1]),
480
						'name'   => trim($domain_fields[1]),
434
						'domain' => trim($domain[1])
481
						'domain' => trim($domain[1])
435
					];
482
					];
-
 
483
					
436
				}
484
				}
437
			}
485
			}
438
		}
486
		}
439
	}
487
	}
440
} else {
488
} else {
Line 467... Line 515...
467
	$filteredUrlHtml = $l_required_domain.' : '.htmlspecialchars($_SERVER['HTTP_HOST']);
515
	$filteredUrlHtml = $l_required_domain.' : '.htmlspecialchars($_SERVER['HTTP_HOST']);
468
	if (!empty($categories)) {
516
	if (!empty($categories)) {
469
		$filteredUrlHtml .= "<br>$l_category ".implode(', ', $categories);
517
		$filteredUrlHtml .= "<br>$l_category ".implode(', ', $categories);
470
	}
518
	}
471
}
519
}
-
 
520
////////////////////////////////////////////////////////////////////////
-
 
521
/////////////////////////// TEST VARIABLES /////////////////////////////
-
 
522
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 
523
//$service_SMS_status = true;
-
 
524
//$direct_access = true;
-
 
525
//$network_pb = false;
-
 
526
//$domainsAllowed[] = (object) [
-
 
527
//	'name'   => 'name_test',
-
 
528
//	'domain' => 'domain_test' 
-
 
529
//];
-
 
530
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 
531
 
-
 
532
 
472
 
533
 
473
// Cleaning the cache
534
// Cleaning the cache
474
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
535
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
475
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
536
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
476
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
537
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
477
header('Cache-Control: post-check=0, pre-check=0', false);
538
header('Cache-Control: post-check=0, pre-check=0', false);
478
header('Pragma: no-cache');
539
header('Pragma: no-cache');
479
?>
540
?>
-
 
541
 
480
<!DOCTYPE html>
542
<!DOCTYPE html>
481
<html>
543
<html>
482
	<head>
544
	<head>
483
		<meta charset="UTF-8">
545
		<meta charset="UTF-8">
-
 
546
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
484
		<title>ALCASAR - <?= $l_title ?></title>
547
		<title>ALCASAR - <?= $l_title ?></title>
485
		<link type="text/css" href="<?= ((!$direct_access) ? "//$hostname" : '') ?>/css/style_intercept.css" rel="stylesheet">
548
		<link type="text/css" href="<?= ((!$direct_access) ? "//$hostname" : '') ?>/css/bootstrap.min.css" rel="stylesheet">
486
		<?php if ($direct_access): ?>
-
 
487
			<script>
-
 
488
			function setBoxInfoContent(param){
-
 
489
				document.getElementById('box_info').innerHTML = document.getElementById(param).innerHTML;
549
		<link type="text/css" href="/css/index_style.css" rel="stylesheet">
490
			}
550
 
491
			</script>
-
 
492
		<?php endif; ?>
-
 
493
	</head>
551
	</head>
-
 
552
	<body>
-
 
553
 
494
	<body<?= (($direct_access) ? ' onload="setBoxInfoContent(\'text_conn\');"' : '') ?>>
554
	<div class="col-xs-12 col-md-10 col-md-offset-1" id="gui">
-
 
555
 
-
 
556
		<!-- HeaderBox -->
495
		<?php if ($direct_access): ?>
557
		<div class="row banner">
-
 
558
			<!-- Logo box -->
-
 
559
			<div id="boite_logo" class="hidden-xs col-sm-2">
-
 
560
				<img class="img-responsive img-organisme" src="<?= ((!$direct_access) ? "//$hostname" : '') ?><?= $img_rep.$img_organisme ?>">
-
 
561
			</div>
-
 
562
 
-
 
563
			<!-- Title -->
496
			<div id="cadre_titre" class="titre_controle">
564
			<div id="cadre_titre" class="col-xs-12 col-sm-8">
-
 
565
					
-
 
566
				<?php if ($direct_access): ?>
497
				<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
567
				<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
498
				<?php if ($network_pb): ?>
568
				<?php if ($network_pb): ?>
499
					<span><?= $l_explain_net_pb ?></span>
569
					<div class="explanation_net_pb"><?= $l_explain_net_pb ?></div>
500
				<?php endif; ?>
570
				<?php endif; ?>
501
		<?php else: // the user is intercepted ?>
571
				<?php else: // the user is intercepted ?>
502
			<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'): // if user need to be warned that someone reads his logs ?>
-
 
503
				<div id="cadre_titre" class="titre_refus">
-
 
504
					<p id="acces_controle" class="titre_refus"><?= $l_title_warn ?></p>
-
 
505
			<?php else: // the user is blacklisted (or whitelisted) ?>
-
 
506
				<div id="cadre_titre" class="titre_refus">
-
 
507
					<p id="acces_controle" class="titre_refus"><?= $l_title ?></p>
-
 
508
			<?php endif; ?>
-
 
509
		<?php endif; ?>
-
 
510
 
572
 
-
 
573
					<?php // if user need to be warned that someone reads his logs ?>
-
 
574
					<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'): ?>
511
			<div id="boite_logo">
575
						<div id="cadre_titre" class="titre_refus">
512
				<img src="<?= ((!$direct_access) ? "//$hostname" : '') ?><?= $img_rep.$img_organisme ?>">
576
							<p id="acces_controle" class="titre_refus"><?= $l_title_warn ?></p>
513
			</div>
577
						</div>
514
		</div>
578
					
515
		<div id="contenu_acces">
579
					<?php else: // the user is blacklisted (or whitelisted) ?>
516
			<div id="box_url">
580
						<div id="cadre_titre" class="titre_refus">
517
				<?php if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))): // Print blacklist categories ?>
581
							<p id="acces_controle" class="titre_refus"><?= $l_title ?></p>
-
 
582
						</div>
518
					<?= $filteredUrlHtml ?>
583
					<?php endif; ?>
519
				<?php endif; ?>
584
				<?php endif; ?>
520
			</div>
585
			</div>
-
 
586
		</div>
521
 
587
 
-
 
588
		<!-- Main content box -->
-
 
589
		<div class="row">
-
 
590
			<div id="contenu_acces" class="col-xs-12 col-lg-offset-1 col-lg-10">
-
 
591
				<div id="box_url">
522
			<?php if ($direct_access): ?>
592
					<?php // Print blacklist categories ?>
523
				<div class="box_menu<?= (!$network_pb) ? '' : ' box-menu-disabled' ?>" id="box_conn" <?= (!$network_pb) ? 'onmouseover="setBoxInfoContent(\'text_conn\');"' : 'title=\'Not available\'' ?>>
593
					<?php if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))):  ?>
524
					<span><?= $l_logout ?></span>
594
						<?= $filteredUrlHtml ?>
525
					<img src="<?= $img_rep.$img_internet ?>">
595
					<?php endif; ?>
526
				</div>
596
				</div>
527
 
597
 
528
				<div class="box_menu<?= ($ssl_enable) ? '' : ' box-menu-disabled' ?>" id="box_certif" <?= ($ssl_enable) ? 'onmouseover="setBoxInfoContent(\'text_certif\');"' : 'title=\'Not available\'' ?>>
-
 
529
					<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
-
 
530
					<img src="<?= $img_rep.$img_certificate ?>">
-
 
531
				</div>
-
 
532
 
598
 
-
 
599
				<!-- Menu -->
-
 
600
				<div class="menu-container container col_xs_12 col-sm-7">
-
 
601
					<?php if ($direct_access): ?>
-
 
602
						<div class="box_menu<?= (!$network_pb) ? '' : ' box-menu-disabled' ?>" id="box_conn" <?= (!$network_pb) ? '' : 'title=\'Not available\'' ?>>
-
 
603
							<span><?= $l_logout ?></span>
-
 
604
							<div class="menu-image">						
-
 
605
								<img class="img-responsive" src="<?= $img_rep.$img_internet ?>">
-
 
606
							</div>
-
 
607
						</div>
-
 
608
					
-
 
609
						<div class="box_menu_right box_menu<?= ($ssl_enable) ? '' : ' box-menu-disabled' ?>" id="box_certif" <?= ($ssl_enable) ? '' : 'title=\'Not available\'' ?>>
-
 
610
							<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
-
 
611
							<div class="menu-image">
-
 
612
								<img class="img-responsive" src="<?= $img_rep.$img_certificate ?>">
-
 
613
							</div>
-
 
614
						</div>
-
 
615
 
533
				<div class="box_menu" id="box_mdp" onmouseover="setBoxInfoContent('text_mdp');">
616
						<div class="box_menu" id="box_mdp" >
-
 
617
							<div class="menu-image">
534
					<img src="<?= $img_rep.$img_pwd ?>">
618
								<img class="img-responsive" src="<?= $img_rep.$img_pwd ?>">
-
 
619
							</div>
535
					<span><?= $l_password_change ?></span>
620
							<span><?= $l_password_change ?></span>
-
 
621
						</div>
-
 
622
 
-
 
623
					<?php if ($service_SMS_status === true): ?>
-
 
624
							<div class="box_menu_right box_menu" id="box_acc">
-
 
625
								<span><?= $l_sms_access ?></span>
-
 
626
								<div class="menu-image">
-
 
627
									<img class="img-responsive menu-image" src="<?= $img_rep.$img_sms ?>">
-
 
628
								</div>
-
 
629
							</div>
-
 
630
					<?php endif; ?>
536
				</div>
631
				</div>
-
 
632
				
537
 
633
 
538
				<?php if ($service_SMS_status === true): ?>
-
 
539
					<div class="box_menu" id="box_acc" onmouseover="setBoxInfoContent('text_acc');">
-
 
540
						<span><?= $l_sms_access ?></span>
634
				<!-- Info Box -->
541
						<img src="<?= $img_rep.$img_sms ?>">
635
				<div class="info-box-container col-sm-5">	
542
					</div>
-
 
543
				<?php endif; ?>
636
					<div id="box_infos">
544
 
-
 
545
				<div class="div-cache" id="text_conn">
-
 
546
					<h2><?= $l_logout ?></h2>
637
						<h2 class="box_infos_titles"><?= $l_logout ?></h2>
547
					<p><?= $l_logout_explain ?></p>
638
						<p class="box_infos_explanations"><?= $l_logout_explain ?>
-
 
639
							
548
					<?php if (!empty($domainsAllowed)): ?>
640
						<?php if (!empty($domainsAllowed)): ?>
549
						<p><?= $l_uam_domain ?>
641
							<p class="domain_allowed_title"><?= $l_uam_domain ?></p>
550
							<ul>
642
							<ul>
551
								<?php foreach ($domainsAllowed as $domainAllowed): ?>
643
								<?php foreach ($domainsAllowed as $domainAllowed): ?>
552
									<li><a href="http://<?= $domainAllowed->domain ?>"><?= $domainAllowed->name ?></a></li>
644
									<li><a href="http://<?= $domainAllowed->domain ?>"><?= $domainAllowed->name ?></a></li>
553
								<?php endforeach; ?>
645
								<?php endforeach; ?>
554
							</ul>
646
							</ul>
555
						</p>
-
 
556
					<?php endif; ?>
647
						<?php endif; ?>
557
					<img src="<?= $img_rep.$img_internet ?>">
-
 
558
				</div>
-
 
559
 
648
 
560
				<div class="div-cache" id="text_certif">
649
						<h2 class="box_infos_titles"><?= $l_install_certif_more ?></a></h2>
561
					<h2><a href="<?= $certCa_link ?>"><?= $l_install_certif_more ?></a></h2>
650
						<p class="box_infos_explanations"><?= "$l_certif_explain $l_certif_explain_help" ?></p>
562
					<p><?= "$l_certif_explain $l_certif_explain_help" ?></p>
651
						<h2 class="box_infos_titles"><?= $l_password_change ?></h2>
563
					<img src="<?= $img_rep.$img_certificate ?>">
652
						<p class="box_infos_explanations"><?= $l_password_change_explain ?></p>
564
				</div>
653
						
565
 
-
 
566
				<div class="div-cache" id="text_mdp">
654
						<?php if ($service_SMS_status === true): ?>
567
					<h2><?= $l_password_change ?></h2>
655
							<h2 class="box_infos_titles"><?= $l_sms_access ?></h2>
568
					<p><?= $l_password_change_explain ?></p>
656
							<p class="box_infos_explanations"><?= $l_sms_explain ?></p>
-
 
657
							<p style="color: green; text-align: center;"><?= $l_service_sms ?></p>
-
 
658
						<?php endif; ?>
-
 
659
						<?php else: // the user is intercepted ?>
-
 
660
							<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1'): // user need to be warned that someone reads his logs ?>
-
 
661
								<div id="box_refuse">
569
					<img src="<?= $img_rep.$img_pwd ?>">
662
									<img src="//<?= $hostname.$img_rep.$img_warning ?>">
-
 
663
									<p><?= $l_explain_warn ?></p>
570
				</div>
664
								</div>
571
 
-
 
572
				<?php if ($service_SMS_status === true): ?>
665
								<div id="liens_redir">
573
					<div class="div-cache" id="text_acc">
666
									<p><?= $l_continue_link ?></p>
-
 
667
								</div>
574
						<h2><?= $l_sms_access ?></h2>
668
							<?php else: ?>
-
 
669
								<div id="box_refuse">
-
 
670
									<img src="//<?= $hostname.$img_rep.$img_false ?>">
575
						<p><?= $l_sms_explain ?></p>
671
									<p><?= $l_explain ?></p>
-
 
672
								</div>
576
						<p style="color: green; text-align: center;"><?= $l_service_sms ?></p>
673
								<div id="liens_redir">
577
						<img src="<?= $img_rep.$img_sms ?>">
674
									<p><?= $l_back_page ?></p>
-
 
675
								</div>
-
 
676
							<?php endif; ?>
-
 
677
						<?php endif; ?>
578
					</div>
678
					</div>
579
				<?php endif; ?>
-
 
580
 
-
 
581
				<div id="box_info">
-
 
582
				</div>
679
				</div>
583
			<?php else: // the user is intercepted ?>
680
				<?php if (($network_pb) && (!$direct_access)): ?>
584
				<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1'): // user need to be warned that someone reads his logs ?>
-
 
585
					<div id="box_refuse">
-
 
586
						<img src="//<?= $hostname.$img_rep.$img_warning ?>">
-
 
587
						<p><?= $l_explain_warn ?></p>
-
 
588
					</div>
-
 
589
					<div id="liens_redir">
-
 
590
						<p><?= $l_continue_link ?></p>
-
 
591
					</div>
-
 
592
				<?php else: ?>
-
 
593
					<div id="box_refuse">
-
 
594
						<img src="//<?= $hostname.$img_rep.$img_false ?>">
-
 
595
						<p><?= $l_explain ?></p>
681
					<span>Diagnostic : <?= $diagnostic ?></span>
596
					</div>
-
 
597
					<div id="liens_redir">
-
 
598
						<p><?= $l_back_page ?></p>
-
 
599
					</div>
-
 
600
				<?php endif; ?>
682
				<?php endif; ?>
601
			<?php endif; ?>
-
 
602
 
-
 
603
			<?php if (($network_pb) && (!$direct_access)): ?>
-
 
604
				<span>Diagnostic : <?= $diagnostic ?></span>
-
 
605
			<?php endif; ?>
-
 
606
		</div>
-
 
607
 
-
 
608
		<?php if ($direct_access): // display the admin logo (wheel) at the bottom right ?>
-
 
609
			<div id="corner">
-
 
610
				<div id="adm" class="corn">
-
 
611
					<a href="<?= "https://$hostname/acc/" ?>"><img src="<?= $img_rep.$img_adm ?>"></a>
-
 
612
				</div>
-
 
613
			</div>
683
			</div>
-
 
684
		
-
 
685
			<?php if ($direct_access): // display the admin logo (wheel) at the bottom right ?>
-
 
686
				<div id="corner">
-
 
687
					<div id="adm" class="corn">
-
 
688
						<a href="<?= "https://$hostname/acc/" ?>"><img src="<?= $img_rep.$img_adm ?>"></a>
-
 
689
					</div>
-
 
690
				
-
 
691
			</div>
-
 
692
		</div>
614
		<?php endif; ?>
693
		<?php endif; ?>
-
 
694
	</div>
-
 
695
	<div class="row col-xs-12">
-
 
696
		<div id="boite_logo" class="col-xs-12 hidden-sm hidden-md hidden-lg">
-
 
697
			<img class="img-responsive img-organisme" src="<?= ((!$direct_access) ? "//$hostname" : '') ?><?= $img_rep.$img_organisme ?>">
-
 
698
		</div>
-
 
699
	</div>
-
 
700
 
-
 
701
 
615
	</body>
702
	</body>
616
</html>
703
</html>