Subversion Repositories ALCASAR

Rev

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

Rev 2127 Rev 2134
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: index.php 2127 2017-02-26 23:20:08Z richard $
2
# $Id: index.php 2134 2017-03-12 19:53:15Z richard $
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 474... Line 474...
474
		<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
474
		<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
475
	if ($network_pb) {
475
	if ($network_pb) {
476
		echo "	<span>$l_explain_net_pb</span>";
476
		echo "	<span>$l_explain_net_pb</span>";
477
	}
477
	}
478
}
478
}
-
 
479
else{ # the user is intercepted
-
 
480
	exec("sudo /usr/sbin/ipset list not_filtered | grep $remote_ip | wc -l 2>&1", $ipset_not_filtered);
-
 
481
	# if user is in "ipset_not_filtered" then he must refresh its dns cache (we are in the interception process)
-
 
482
	if ($ipset_not_filtered[0] == '1'){
-
 
483
		echo "<script>window.location.reload(true)</script>"; # force DNS request
479
else{
484
	}
480
	# if user need to be warned that someone reads his logs
485
	# if user need to be warned that someone reads his logs
481
	if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'){
486
	if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'){
482
		echo "
487
		echo "
483
		<div id=\"cadre_titre\" class=\"titre_refus\">
488
		<div id=\"cadre_titre\" class=\"titre_refus\">
484
		<p id=\"acces_controle\" class=\"titre_refus\">$l_title_warn</p>";
489
		<p id=\"acces_controle\" class=\"titre_refus\">$l_title_warn</p>";
485
	}
490
	}
486
	else{
491
	else{ # the user is blacklisted (or whitelisted)
487
		echo "
492
		echo "
488
		<div id=\"cadre_titre\" class=\"titre_refus\">
493
		<div id=\"cadre_titre\" class=\"titre_refus\">
489
		<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>";
494
		<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>";
490
	}
495
	}
491
}
496
}
Line 603... Line 608...
603
	}
608
	}
604
}
609
}
605
	if (($network_pb)&&(! $direct_access)) {
610
	if (($network_pb)&&(! $direct_access)) {
606
		echo "	<span>Diagnostic : $diagnostic</span>";
611
		echo "	<span>Diagnostic : $diagnostic</span>";
607
	}
612
	}
-
 
613
	echo "</div>";
-
 
614
	if($direct_access){ # display the admin logo (wheel) at the bottom right
-
 
615
		echo "<div id=\"corner\">";
-
 
616
		echo "<div id=\"adm\" class=\"corn\">";
-
 
617
		echo "<a href=\"https://$hostname/acc/\"><img src=\"$img_rep$img_adm\"></a>";
-
 
618
		echo "</div>";
-
 
619
		echo "</div>";
-
 
620
	}
608
?>
621
?>
609
		</div>
-
 
610
		<div id="corner">
-
 
611
			<div id="adm" class="corn">
-
 
612
				<a href="https://<?php echo $hostname; ?>/acc/"><img src=<?php echo $img_rep.''.$img_adm; ?>></a>
-
 
613
			</div>
-
 
614
		</div>
-
 
615
	</body>
622
	</body>
616
</html>
623
</html>