Subversion Repositories ALCASAR

Rev

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

Rev 1287 Rev 1295
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: index.php 1287 2014-01-08 23:01:20Z richard $
2
# $Id: index.php 1295 2014-01-13 12:31:04Z richard $
3
#
3
#
4
# index.php for ALCASAR captive portal
4
# index.php for ALCASAR 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 275... Line 275...
275
			</div>
275
			</div>
276
		</div>
276
		</div>
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
//search in the blacklist categories
280
if (! $direct_access){
281
if ((! $direct_access) && (! $network_pb)){
281
	$pattern = preg_replace('/www./','',$_SERVER['HTTP_HOST']);
282
	$pattern = preg_replace('/www./','',$_SERVER['HTTP_HOST']);
282
	$domain_bl = exec("grep -Re ^$pattern /etc/dansguardian/lists/blacklists/*/domains|cut -d'/' -f6");
283
	exec("grep -Re ^$pattern /etc/dansguardian/lists/blacklists/*/domains|cut -d'/' -f6", $output);
-
 
284
	unset ($line);
-
 
285
	foreach ($output as $row) {
-
 
286
		$line=$line.(trim($row)).", ";
-
 
287
	} 
283
	echo "$l_required_domain : $_SERVER[HTTP_HOST]<BR>$l_category $domain_bl";
288
	echo "$l_required_domain : $_SERVER[HTTP_HOST]";
-
 
289
	if ($line != "") { echo "<BR>".rtrim ("$l_category $line", ", ");}
284
}
290
}
285
?>
291
?>
286
			</div>
292
			</div>
287
 
293
 
288
<?php
294
<?php