Subversion Repositories ALCASAR

Rev

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

Rev 1332 Rev 1377
Line 3... Line 3...
3
<HEAD>
3
<HEAD>
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
<?
5
<?
6
$bl_dir="/etc/dansguardian/lists/blacklists/";
6
$bl_dir="/etc/dansguardian/lists/blacklists/";
7
$bl_iptables_dir="/usr/local/share/iptables-bl/";
7
$bl_iptables_dir="/usr/local/share/iptables-bl/";
-
 
8
$wl_iptables_dir="/usr/local/share/iptables-wl/";
8
$bl_dnsmasq_dir="/usr/local/share/dnsmasq-bl/";
9
$bl_dnsmasq_dir="/usr/local/share/dnsmasq-bl/";
9
$wl_dnsmasq_dir="/usr/local/share/dnsmasq-wl/";
10
$wl_dnsmasq_dir="/usr/local/share/dnsmasq-wl/";
10
# Choice of language
11
# Choice of language
11
$Language = 'en';
12
$Language = 'en';
12
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
13
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
Line 74... Line 75...
74
	}
75
	}
75
}
76
}
76
else
77
else
77
{
78
{
78
	$wl_categorie_domain_file = $wl_dnsmasq_dir.$categorie.".conf";
79
	$wl_categorie_domain_file = $wl_dnsmasq_dir.$categorie.".conf";
79
	$wl_categorie_url_file = "";
80
	$wl_categorie_ip_file = $wl_iptables_dir.$categorie;
80
	$wl_categorie_ip_file = "";
81
	if(isset($_GET['nb_domains']) && isset($_GET['nb_ip']))
-
 
82
	{
81
	if (file_exists($wl_categorie_domain_file))
83
		$nb_domains = $_GET['nb_domains'];
-
 
84
		$nb_urls = 0;
82
		$nb_domains = exec("wc -l $wl_categorie_domain_file | cut -d ' ' -f1");
85
		$nb_ip = $_GET['nb_ip'];
-
 
86
	}
83
	else
87
	else
-
 
88
	{
-
 
89
		if (file_exists($wl_categorie_domain_file))
-
 
90
			$nb_domains = exec("wc -l $wl_categorie_domain_file | cut -d ' ' -f1");
-
 
91
		else
84
		$nb_domains = $l_error_open_file." ".$wl_categorie_domain_file;
92
			$nb_domains = $l_error_open_file." ".$wl_categorie_domain_file;
85
	$nb_urls = 0;
93
		$nb_urls = 0;
-
 
94
		if(file_exists($wl_categorie_ip_file))
-
 
95
			$nb_ip = exec("wc -l $wl_categorie_ip_file | cut -d ' ' -f1");
86
	$nb_ip = 0;
96
		else
-
 
97
			$nb_ip = $l_error_open_file." ".$wl_categorie_ip_file;
-
 
98
	}
87
}
99
}
88
$global_usage = file($bl_dir."global_usage");
100
$global_usage = file($bl_dir."global_usage");
89
$langue = strtoupper($Language);
101
$langue = strtoupper($Language);
90
if($categorie == "ossi")
102
if($categorie == "ossi")
91
{
103
{