Subversion Repositories ALCASAR

Rev

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

Rev 1249 Rev 1286
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: index.php 1249 2013-10-22 22:09:01Z richard $
2
# $Id: index.php 1286 2014-01-06 22:35:12Z richard $
3
#
3
#
4
# index.php for ALACASAR captive portal
4
# index.php for ALACASAR captive portal
5
# by REXY
5
# by REXY
6
# UI & css style by stephane ERARD
6
# UI & css style by stephane ERARD
7
# The contents of this file may be used under the terms of the GNU
7
# The contents of this file may be used under the terms of the GNU
Line 277... Line 277...
277
		<div id="contenu_acces">
277
		<div id="contenu_acces">
278
			<div id="box_url">
278
			<div id="box_url">
279
<?php 
279
<?php 
280
if (! $direct_access){
280
if (! $direct_access){
281
	$pattern = preg_replace('/www./','',$_SERVER['HTTP_HOST']);
281
	$pattern = preg_replace('/www./','',$_SERVER['HTTP_HOST']);
282
	chdir('/etc/dansguardian/lists/blacklists/');
-
 
283
	$domain_bl = exec("grep -Re ^$pattern$ *");
282
	$domain_bl = exec("grep -Re ^$pattern /etc/dansguardian/lists/blacklists/*/domains|cut -d'/' -f6");
284
	$s = explode("/",$domain_bl);
-
 
285
	echo "$l_required_domain : $_SERVER[HTTP_HOST] ($l_category $s[0])";
283
	echo "$l_required_domain : $_SERVER[HTTP_HOST]<BR>$l_category $domain_bl";
286
}
284
}
287
?>
285
?>
288
			</div>
286
			</div>
289
 
287
 
290
<?php
288
<?php