Subversion Repositories ALCASAR

Rev

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

Rev 3002 Rev 3026
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: index.php 3002 2022-04-03 21:39:16Z rexy $
2
# $Id: index.php 3026 2022-06-30 21:53:54Z 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 Stéphane ERARD & Alexandre VEZIN
6
# The contents of this file may be used under the terms of the GNU
6
# The contents of this file may be used under the terms of the GNU
7
# General Public License Version 2, provided that the above copyright
7
# General Public License Version 2, provided that the above copyright
8
# notice and this permission notice is included in all copies or
8
# notice and this permission notice is included in all copies or
9
# substantial portions of the software.
9
# substantial portions of the software.
10
 
10
 
Line 41... Line 41...
41
		$conf[trim($tmp[0])] = trim($tmp[1]);
41
		$conf[trim($tmp[0])] = trim($tmp[1]);
42
	}
42
	}
43
}
43
}
44
fclose($file_conf);
44
fclose($file_conf);
45
 
45
 
-
 
46
$page = "index";
46
$organisme = $conf["ORGANISM"];
47
$organisme = $conf["ORGANISM"];
47
$hostname  = $conf["HOSTNAME"].'.'.$conf["DOMAIN"];
48
$hostname  = $conf["HOSTNAME"].'.'.$conf["DOMAIN"];
48
$ssl_status = ($conf['HTTPS_LOGIN'] === 'on');
49
$ssl_status = ($conf['HTTPS_LOGIN'] === 'on');
49
$protocol = ($ssl_status) ? 'https://' : 'http://';
50
$protocol = ($ssl_status) ? 'https://' : 'http://';
50
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
51
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
Line 552... Line 553...
552
		</script>
553
		</script>
553
		<script type="text/javascript" src="<?= $service_wifi4eu_server ?>"></script>
554
		<script type="text/javascript" src="<?= $service_wifi4eu_server ?>"></script>
554
<? endif; ?>
555
<? endif; ?>
555
	</head>
556
	</head>
556
	<body>
557
	<body>
557
	<div class="col-xs-12 col-md-10 col-md-offset-1"> 
558
	<div class="col-12 col-lg-10 offset-lg-1">
558
 
559
 
559
		<!-- HeaderBox -->
-
 
560
		<div class="row banner">
-
 
561
			<!-- Logo box -->
-
 
562
			<div class="img_banner hidden-xs col-sm-3 col-md-2 col-lg-2">
-
 
563
				<img class="img-responsive img-organisme" src="<?= ((!$direct_access) ? "//$hostname" : '') ?><?= $img_rep.$img_organisme ?>">
-
 
564
			</div>
-
 
565
 
-
 
566
			<!-- Title -->
-
 
567
			<div id="cadre_titre" class="titre_banner col-xs-12 col-sm-8">
-
 
568
				<?php if ($direct_access): ?>
-
 
569
					<?php if ($service_wifi4eu_status): ?>
-
 
570
						<img id="wifi4eubanner">
-
 
571
					<?php else: ?>
-
 
572
						<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
-
 
573
					<?php endif; ?>
-
 
574
				<?php if ($network_pb): ?>
-
 
575
					<div class="explanation_net_pb"><?= $l_explain_net_pb ?></div>
-
 
576
				<?php endif; ?>
-
 
577
				<?php else: // the user is intercepted ?>
560
		<?php require_once(__DIR__.'/header.php'); ?>
578
					<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'): // if user need to be warm that someone reads his log ?>
-
 
579
						<div id="cadre_titre" class="titre_refus">
-
 
580
							<p id="acces_controle" class="titre_refus"><?= $l_title_warn ?></p>
-
 
581
						</div>
-
 
582
					<?php else: // the user is blacklisted (or whitelisted) ?>
-
 
583
						<div id="cadre_titre" class="titre_refus">
-
 
584
							<p id="acces_controle" class="titre_refus"><?= $l_title ?></p>
-
 
585
						</div>
-
 
586
					<?php endif; ?>
-
 
587
				<?php endif; ?>
-
 
588
			</div>
-
 
589
			
-
 
590
			<!-- Logo box -->
-
 
591
			<div class="img_banner hidden-xs col-sm-3 col-md-2 col-lg-2">
-
 
592
				<img class="img-responsive img-organisme" src="<?= ((!$direct_access) ? "//$hostname" : '') ?><?= $img_rep.$img_acc ?>">
-
 
593
			</div>
-
 
594
		</div>
-
 
595
 
561
 
596
		<!-- Main content box -->
562
		<!-- Main content box -->
597
		<div class="row">
563
		<div class="row">
598
			<div id="contenu_acces" class="col-xs-12 col-lg-offset-1 col-lg-10">
564
			<div id="contenu_acces" class="col-12 offset-lg-1 col-lg-10 row">
599
				<?php if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))): // print blacklist categories ?>
565
				<?php if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))): // print blacklist categories ?>
600
				<div id="box_url">
566
				<div id="box_url">
601
					<br>
567
					<br>
602
					<?= $l_explain ?>
568
					<?= $l_explain ?>
603
				</div>
569
				</div>
604
				<?php endif; ?>
570
				<?php endif; ?>
605
 
571
 
606
				<!-- Menu -->
572
				<!-- Menu -->
607
				<div class="menu-container container col_xs_12 col-sm-7">
573
				<div class="menu-container container col-12 col-md-7">
608
					<?php if ($direct_access): ?>
574
					<?php if ($direct_access): ?>
609
						<div class="box_menu<?= (!$network_pb) ? '' : ' box-menu-disabled' ?>" id="box_conn" <?= (!$network_pb) ? '' : 'title=\'Not available\'' ?>>
575
						<div class="box_menu<?= (!$network_pb) ? '' : ' box-menu-disabled' ?>" id="box_conn" <?= (!$network_pb) ? '' : 'title=\'Not available\'' ?>>
610
							<span><?= $l_logout ?></span>
576
							<span><?= $l_logout ?></span>
611
							<div class="menu-image">
577
							<div class="menu-image">
612
								<img class="img-responsive" src="<?= $img_rep.$img_internet ?>">
578
								<img class="img-fluid" src="<?= $img_rep.$img_internet ?>">
613
							</div>
579
							</div>
614
						</div>
580
						</div>
615
 
581
 
616
						<div class="box_menu_right box_menu" id="box_certif">
582
						<div class="box_menu_right box_menu" id="box_certif">
617
							<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
583
							<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
618
							<div class="menu-image">
584
							<div class="menu-image">
619
								<img class="img-responsive" src="<?= $img_rep.$img_certificate ?>">
585
								<img class="img-fluid" src="<?= $img_rep.$img_certificate ?>">
620
							</div>
586
							</div>
621
						</div>
587
						</div>
622
 
588
 
623
						<div class="box_menu" id="box_mdp" >
589
						<div class="box_menu" id="box_mdp" >
624
							<div class="menu-image">
590
							<div class="menu-image">
625
								<img class="img-responsive" src="<?= $img_rep.$img_pwd ?>">
591
								<img class="img-fluid" src="<?= $img_rep.$img_pwd ?>">
626
							</div>
592
							</div>
627
							<span><?= $l_password_change ?></span>
593
							<span><?= $l_password_change ?></span>
628
						</div>
594
						</div>
629
 
595
 
630
					<?php if ($service_SMS_status === true): ?>
596
					<?php if ($service_SMS_status === true): ?>
631
						<div class="box_menu_right box_menu" id="box_sms">
597
						<div class="box_menu_right box_menu" id="box_sms">
632
							<span><?= $l_sms_access ?></span>
598
							<span><?= $l_sms_access ?></span>
633
							<div class="menu-image">
599
							<div class="menu-image">
634
								<img class="img-responsive menu-image" src="<?= $img_rep.$img_sms ?>">
600
								<img class="img-fluid menu-image" src="<?= $img_rep.$img_sms ?>">
635
							</div>
601
							</div>
636
						</div>
602
						</div>
637
					<?php endif; ?>
603
					<?php endif; ?>
638
 
604
 
639
					<?php if ($service_Email_status === true): ?>
605
					<?php if ($service_Email_status === true): ?>
640
						<div class="box_menu_right box_menu" id="box_email">
606
						<div class="box_menu_right box_menu" id="box_email">
641
							<span><?= $l_email_access ?></span>
607
							<span><?= $l_email_access ?></span>
642
							<div class="menu-image">
608
							<div class="menu-image">
643
								<img class="img-responsive menu-image" src="<?= $img_rep.$img_email ?>">
609
								<img class="img-fluid menu-image" src="<?= $img_rep.$img_email ?>">
644
							</div>
610
							</div>
645
						</div>
611
						</div>
646
					<?php endif; ?>
612
					<?php endif; ?>
647
				</div>
613
				</div>
648
 
614
 
649
				<!-- Info Box -->
615
				<!-- Info Box -->
650
				<div class="info-box-container col-sm-5">	
616
				<div class="info-box-container col-md-5">	
651
					<div id="box_infos">
617
					<div id="box_infos">
652
						<p class="box_infos_explanations"><?= $l_logout_explain ?>
618
						<p class="box_infos_explanations"><?= $l_logout_explain ?>
653
							
619
							
654
						<?php if (!empty($domainsAllowed)): ?>
620
						<?php if (!empty($domainsAllowed)): ?>
655
							<p class="domain_allowed_title"><?= $l_uam_domain ?></p>
621
							<p class="domain_allowed_title"><?= $l_uam_domain ?></p>