Subversion Repositories ALCASAR

Rev

Rev 1903 | Rev 1936 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1903 Rev 1904
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<HTML><!-- written by Rexy -->
2
<HTML><!-- written by Rexy -->
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
$wl_iptables_dir="/usr/local/share/iptables-wl/";
9
$bl_dnsmasq_dir="/usr/local/share/dnsmasq-bl/";
9
$bl_dnsmasq_dir="/usr/local/share/dnsmasq-bl/";
10
$wl_dnsmasq_dir="/usr/local/share/dnsmasq-wl/";
10
$wl_dnsmasq_dir="/usr/local/share/dnsmasq-wl/";
11
if(isset($_GET['ossi'])) $ossi = $_GET['ossi'];
11
if(isset($_GET['ossi'])) $ossi = $_GET['ossi'];
12
# Choice of language
12
# Choice of language
13
$Language = 'en';
13
$Language = 'en';
14
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
14
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
15
{
15
{
16
	 $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
16
	 $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
17
	 $Language = strtolower(substr(chop($Langue[0]),0,2));
17
	 $Language = strtolower(substr(chop($Langue[0]),0,2));
18
}
18
}
19
if($Language == 'fr')
19
if($Language == 'fr')
20
{
20
{
21
	$l_title = "Catégories de la liste noire";
21
	$l_title = "Catégories de la liste noire";
22
	$l_error_open_file="Erreur d'ouverture du fichier";
22
	$l_error_open_file="Erreur d'ouverture du fichier";
23
	$l_close="Fermer";
23
	$l_close="Fermer";
24
	$l_description_cat="Cette catégorie n'est pas décrite";
24
	$l_description_cat="Cette catégorie n'est pas décrite";
25
	$l_name_cat ="Cette catégorie n'a pas de nom";
25
	$l_name_cat ="Cette catégorie n'a pas de nom";
26
	$l_nb_domains="Nombre de noms de domaine filtrés :";
26
	$l_nb_domains="Nombre de noms de domaine filtrés :";
27
	$l_nb_urls="Nombre d'URL filtrés :";
27
	$l_nb_urls="Nombre d'URL filtrés :";
28
	$l_nb_ip="Nombre d'IP filtrées :";
28
	$l_nb_ip="Nombre d'IP filtrées :";
29
	$l_example="Exemple(s) : ";
29
	$l_example="Exemple(s) : ";
30
	$l_error_cat = "Erreur de categorie";
30
	$l_error_cat = "Erreur de categorie";
31
	$l_error_list = "Erreur de listing";
31
	$l_error_list = "Erreur de listing";
32
	$l_tor_node = "Cette liste correspond au noeud du réseau Tor. Si cette liste est activée, les utilisateurs blacklistés ne pourront pas accéder au réseau Tor</br>";
32
	$l_tor_node = "Cette liste correspond au noeud du réseau Tor. Si cette liste est activée, les utilisateurs blacklistés ne pourront pas accéder au réseau Tor</br>";
33
}
33
}
34
else
34
else
35
{
35
{
36
	$l_title = "Blacklist categories";
36
	$l_title = "Blacklist categories";
37
	$l_error_open_file="Error opening the file";
37
	$l_error_open_file="Error opening the file";
38
	$l_close="Close";
38
	$l_close="Close";
39
	$l_description_cat="This category isn't describe";
39
	$l_description_cat="This category isn't describe";
40
	$l_name_cat ="This category has not name";
40
	$l_name_cat ="This category has not name";
41
	$l_nb_domains="Number of filtered domain names :";
41
	$l_nb_domains="Number of filtered domain names :";
42
	$l_nb_urls="Number of filtered URL :";
42
	$l_nb_urls="Number of filtered URL :";
43
	$l_nb_ip="Number of filtered IP :";
43
	$l_nb_ip="Number of filtered IP :";
44
	$l_example="Example(s) : ";
44
	$l_example="Example(s) : ";
45
	$l_error_cat = "Error category";
45
	$l_error_cat = "Error category";
46
	$l_error_list = "Error listing";
46
	$l_error_list = "Error listing";
47
	$l_tor_node = "This list is Tor's nodes. If you enable this list, users won't reach Tor network.</br> ";
47
	$l_tor_node = "This list is Tor's nodes. If you enable this list, users won't reach Tor network.</br> ";
48
 
48
 
49
}
49
}
50
if(isset($_GET['cat']))
50
if(isset($_GET['cat']))
51
{
51
{
52
	$categorie = $_GET['cat'];
52
	$categorie = $_GET['cat'];
53
} 
53
} 
54
else
54
else
55
{
55
{
56
	$categorie = $l_error_cat;
56
	$categorie = $l_error_cat;
57
}
57
}
58
if(isset($_GET['liste']))
58
if(isset($_GET['liste']))
59
{
59
{
60
	$liste = $_GET['liste'];
60
	$liste = $_GET['liste'];
61
}
61
}
62
else
62
else
63
{
63
{
64
	$liste = $l_error_list;
64
	$liste = $l_error_list;
65
}
65
}
66
if($liste == "bl")
66
if($liste == "bl")
67
{
67
{
68
	if(isset($ossi))
68
	if(isset($ossi))
69
	{
69
	{
70
	if(isset($_GET['state']) && $_GET['state']=='disable')
70
	if(isset($_GET['state']) && $_GET['state']=='disable')
71
	{
71
	{
72
		$bl_categorie_domain_file = "/usr/local/share/dnsmasq-bl/".$categorie;
72
		$bl_categorie_domain_file = "/usr/local/share/dnsmasq-bl/".$categorie;
73
		$bl_categorie_ip_file = "/usr/local/share/iptables-bl/".$categorie;
73
		$bl_categorie_ip_file = "/usr/local/share/iptables-bl/".$categorie;
74
	}
74
	}
75
	else
75
	else
76
	{
76
	{
77
		$bl_categorie_domain_file = "/usr/local/share/dnsmasq-bl-enabled/".$categorie;
77
		$bl_categorie_domain_file = "/usr/local/share/dnsmasq-bl-enabled/".$categorie;
78
		$bl_categorie_ip_file = "/usr/local/share/iptables-bl-enabled/".$categorie;
78
		$bl_categorie_ip_file = "/usr/local/share/iptables-bl-enabled/".$categorie;
79
	}
79
	}
80
	if(isset($_GET['nb_domains']) && isset($_GET['nb_urls']) && isset($_GET['nb_ip']))
80
	if(isset($_GET['nb_domains']) && isset($_GET['nb_urls']) && isset($_GET['nb_ip']))
81
	{
81
	{
82
		$nb_domains = $_GET['nb_domains'];
82
		$nb_domains = $_GET['nb_domains'];
83
		$nb_ip = $_GET['nb_ip'];
83
		$nb_ip = $_GET['nb_ip'];
84
	}
84
	}
85
	else
85
	else
86
	{
86
	{
87
		if (file_exists($bl_categorie_domain_file))
87
		if (file_exists($bl_categorie_domain_file))
88
		{
88
		{
89
			$nb_domains = exec("wc -l $bl_categorie_domain_file | cut -d ' ' -f1");
89
			$nb_domains = exec("wc -l $bl_categorie_domain_file | cut -d ' ' -f1");
90
		}
90
		}
91
		else
91
		else
92
		{
92
		{
93
			if($categorie!='ossi-tor_node.txt')
93
			if($categorie!='ossi-tor_node_ip')
94
			{
94
			{
95
				$nb_domains = $l_error_open_file." ".$bl_categorie_domain_file;
95
				$nb_domains = $l_error_open_file." ".$bl_categorie_domain_file;
96
			}
96
			}
97
			else
97
			else
98
			{
98
			{
99
				$nb_domains = "";
99
				$nb_domains = "";
100
				$_GET["titre"] = 'ip';
100
				$_GET["titre"] = 'ip';
101
			}
101
			}
102
		}
102
		}
103
		if(file_exists($bl_categorie_ip_file))
103
		if(file_exists($bl_categorie_ip_file))
104
			$nb_ip = exec("wc -l $bl_categorie_ip_file | cut -d ' ' -f1");
104
			$nb_ip = exec("wc -l $bl_categorie_ip_file | cut -d ' ' -f1");
105
		else
105
		else
106
			$nb_ip = $l_error_open_file." ".$bl_categorie_ip_file;
106
			$nb_ip = $l_error_open_file." ".$bl_categorie_ip_file;
107
	}
107
	}
108
	}
108
	}
109
	else
109
	else
110
	{
110
	{
111
	
111
	
112
	
112
	
113
	$bl_categorie_domain_file = $bl_dnsmasq_dir.$categorie.".conf";
113
	$bl_categorie_domain_file = $bl_dnsmasq_dir.$categorie.".conf";
114
	$bl_categorie_url_file = $bl_dir.$categorie."/urls";
114
	$bl_categorie_url_file = $bl_dir.$categorie."/urls";
115
	$bl_categorie_ip_file = $bl_iptables_dir.$categorie;
115
	$bl_categorie_ip_file = $bl_iptables_dir.$categorie;
116
	if(isset($_GET['nb_domains']) && isset($_GET['nb_urls']) && isset($_GET['nb_ip']))
116
	if(isset($_GET['nb_domains']) && isset($_GET['nb_urls']) && isset($_GET['nb_ip']))
117
	{
117
	{
118
		$nb_domains = $_GET['nb_domains'];
118
		$nb_domains = $_GET['nb_domains'];
119
		$nb_urls = $_GET['nb_urls'];
119
		$nb_urls = $_GET['nb_urls'];
120
		$nb_ip = $_GET['nb_ip'];
120
		$nb_ip = $_GET['nb_ip'];
121
	}
121
	}
122
	else
122
	else
123
	{
123
	{
124
		if (file_exists($bl_categorie_domain_file))
124
		if (file_exists($bl_categorie_domain_file))
125
			$nb_domains = exec("wc -l $bl_categorie_domain_file | cut -d ' ' -f1");
125
			$nb_domains = exec("wc -l $bl_categorie_domain_file | cut -d ' ' -f1");
126
		else
126
		else
127
			$nb_domains = $l_error_open_file." ".$bl_categorie_domain_file;
127
			$nb_domains = $l_error_open_file." ".$bl_categorie_domain_file;
128
		if (file_exists($bl_categorie_url_file))
128
		if (file_exists($bl_categorie_url_file))
129
			$nb_urls = exec ("wc -l $bl_categorie_url_file | cut -d ' ' -f1");
129
			$nb_urls = exec ("wc -l $bl_categorie_url_file | cut -d ' ' -f1");
130
		else
130
		else
131
			$nb_urls = $l_error_open_file." ".$bl_categorie_url_file;
131
			$nb_urls = $l_error_open_file." ".$bl_categorie_url_file;
132
		if(file_exists($bl_categorie_ip_file))
132
		if(file_exists($bl_categorie_ip_file))
133
			$nb_ip = exec("wc -l $bl_categorie_ip_file | cut -d ' ' -f1");
133
			$nb_ip = exec("wc -l $bl_categorie_ip_file | cut -d ' ' -f1");
134
		else
134
		else
135
			$nb_ip = $l_error_open_file." ".$bl_categorie_ip_file;
135
			$nb_ip = $l_error_open_file." ".$bl_categorie_ip_file;
136
	}
136
	}
137
	}
137
	}
138
}
138
}
139
else
139
else
140
{
140
{
141
	
141
	
142
	if(isset($ossi))
142
	if(isset($ossi))
143
	{
143
	{
144
	if(isset($_GET['state']) && $_GET['state']=='disable')
144
	if(isset($_GET['state']) && $_GET['state']=='disable')
145
	{
145
	{
146
		$wl_categorie_domain_file = "/usr/local/share/dnsmasq-wl/".$categorie;
146
		$wl_categorie_domain_file = "/usr/local/share/dnsmasq-wl/".$categorie;
147
		$wl_categorie_ip_file = "/usr/local/share/iptables-wl/".$categorie;
147
		$wl_categorie_ip_file = "/usr/local/share/iptables-wl/".$categorie;
148
	}
148
	}
149
	else
149
	else
150
	{
150
	{
151
		$wl_categorie_domain_file = "/usr/local/share/dnsmasq-wl-enabled/".$categorie;
151
		$wl_categorie_domain_file = "/usr/local/share/dnsmasq-wl-enabled/".$categorie;
152
		$wl_categorie_ip_file = "/usr/local/share/iptables-wl-enabled/".$categorie;
152
		$wl_categorie_ip_file = "/usr/local/share/iptables-wl-enabled/".$categorie;
153
	}
153
	}
154
	if(isset($_GET['nb_domains']) && isset($_GET['nb_urls']) && isset($_GET['nb_ip']))
154
	if(isset($_GET['nb_domains']) && isset($_GET['nb_urls']) && isset($_GET['nb_ip']))
155
	{
155
	{
156
		$nb_domains = $_GET['nb_domains'];
156
		$nb_domains = $_GET['nb_domains'];
157
		$nb_ip = $_GET['nb_ip'];
157
		$nb_ip = $_GET['nb_ip'];
158
	}
158
	}
159
	else
159
	else
160
	{
160
	{
161
		if (file_exists($wl_categorie_domain_file))
161
		if (file_exists($wl_categorie_domain_file))
162
			$nb_domains = exec("wc -l $wl_categorie_domain_file | cut -d ' ' -f1");
162
			$nb_domains = exec("wc -l $wl_categorie_domain_file | cut -d ' ' -f1");
163
		else
163
		else
164
			$nb_domains = $l_error_open_file." ".$wl_categorie_domain_file;
164
			$nb_domains = $l_error_open_file." ".$wl_categorie_domain_file;
165
		if(file_exists($wl_categorie_ip_file))
165
		if(file_exists($wl_categorie_ip_file))
166
			$nb_ip = exec("wc -l $wl_categorie_ip_file | cut -d ' ' -f1");
166
			$nb_ip = exec("wc -l $wl_categorie_ip_file | cut -d ' ' -f1");
167
		else
167
		else
168
			$nb_ip = $l_error_open_file." ".$wl_categorie_ip_file;
168
			$nb_ip = $l_error_open_file." ".$wl_categorie_ip_file;
169
	}
169
	}
170
	}
170
	}
171
	else
171
	else
172
	{	
172
	{	
173
	$wl_categorie_domain_file = $wl_dnsmasq_dir.$categorie.".conf";
173
	$wl_categorie_domain_file = $wl_dnsmasq_dir.$categorie.".conf";
174
	$wl_categorie_ip_file = $wl_iptables_dir.$categorie;
174
	$wl_categorie_ip_file = $wl_iptables_dir.$categorie;
175
	if(isset($_GET['nb_domains']))
175
	if(isset($_GET['nb_domains']))
176
	{
176
	{
177
		$nb_domains = $_GET['nb_domains'];
177
		$nb_domains = $_GET['nb_domains'];
178
		$nb_urls = 0;
178
		$nb_urls = 0;
179
		$nb_ip = 0;
179
		$nb_ip = 0;
180
	}
180
	}
181
	else
181
	else
182
	{
182
	{
183
		if (file_exists($wl_categorie_domain_file))
183
		if (file_exists($wl_categorie_domain_file))
184
			$nb_domains = exec("wc -l $wl_categorie_domain_file | cut -d ' ' -f1");
184
			$nb_domains = exec("wc -l $wl_categorie_domain_file | cut -d ' ' -f1");
185
		else
185
		else
186
			$nb_domains = $l_error_open_file." ".$wl_categorie_domain_file;
186
			$nb_domains = $l_error_open_file." ".$wl_categorie_domain_file;
187
		$nb_urls = 0;
187
		$nb_urls = 0;
188
		$nb_ip = 0;
188
		$nb_ip = 0;
189
	}
189
	}
190
	}
190
	}
191
}
191
}
192
$global_usage = file($bl_dir."global_usage");
192
$global_usage = file($bl_dir."global_usage");
193
$langue = strtoupper($Language);
193
$langue = strtoupper($Language);
194
if(isset($categorie) && !isset($ossi))
194
if(isset($categorie) && !isset($ossi))
195
{
195
{
196
	$fin1 = 0; $fin2 = 0;
196
	$fin1 = 0; $fin2 = 0;
197
	foreach($global_usage as $line)
197
	foreach($global_usage as $line)
198
	{
198
	{
199
		if(preg_match("#^NAME:.$categorie$#", $line) == 1)
199
		if(preg_match("#^NAME:.$categorie$#", $line) == 1)
200
			$fin1 = 1;
200
			$fin1 = 1;
201
		if($fin1 && preg_match("#^DESC.$langue:.#", $line) == 1)
201
		if($fin1 && preg_match("#^DESC.$langue:.#", $line) == 1)
202
			$l_description_cat = preg_replace("#^DESC.$langue:.#", "", $line);
202
			$l_description_cat = preg_replace("#^DESC.$langue:.#", "", $line);
203
		if($fin1 && preg_match("#^NAME.$langue:.#", $line) == 1)
203
		if($fin1 && preg_match("#^NAME.$langue:.#", $line) == 1)
204
		{
204
		{
205
			$l_name_cat = preg_replace("#^NAME.$langue:.#", "", $line);
205
			$l_name_cat = preg_replace("#^NAME.$langue:.#", "", $line);
206
			$fin2 = 1;
206
			$fin2 = 1;
207
		}
207
		}
208
		if($fin2) break;
208
		if($fin2) break;
209
		
209
		
210
	}
210
	}
211
}
211
}
212
echo "<TITLE>$l_title</TITLE>";
212
echo "<TITLE>$l_title</TITLE>";
213
?>
213
?>
214
<link rel="stylesheet" href="/css/style.css" type="text/css">
214
<link rel="stylesheet" href="/css/style.css" type="text/css">
215
</HEAD>
215
</HEAD>
216
<body>
216
<body>
217
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
217
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
218
	<tr><th><?php if(isset($categorie)){echo $categorie ;}else{echo $l_error_cat;}?></th></tr>
218
	<tr><th><?php if(isset($categorie)){echo $categorie ;}else{echo $l_error_cat;}?></th></tr>
219
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
219
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
220
</TABLE>
220
</TABLE>
221
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
221
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
222
	<tr><td valign="middle" align="left">
222
	<tr><td valign="middle" align="left">
223
		<?php
223
		<?php
224
		if(isset($_GET["filtre"]))
224
		if(isset($_GET["filtre"]))
225
		{
225
		{
226
			$filtre = $_GET["filtre"];
226
			$filtre = $_GET["filtre"];
227
		}
227
		}
228
		else
228
		else
229
		{
229
		{
230
			$filtre = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file;
230
			$filtre = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file;
231
		}
231
		}
232
		if($categorie!='ossi-tor_node.txt')
232
		if($categorie!='ossi-tor_node_ip')
233
			$filtre_domain = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file;
233
			$filtre_domain = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file;
234
		if(!isset($ossi))
234
		if(!isset($ossi))
235
			$filtre_url = $liste == "bl" ? $bl_categorie_url_file : "";
235
			$filtre_url = $liste == "bl" ? $bl_categorie_url_file : "";
236
		$filtre_ip = $liste == "bl" ? $bl_categorie_ip_file : $wl_categorie_ip_file;
236
		$filtre_ip = $liste == "bl" ? $bl_categorie_ip_file : $wl_categorie_ip_file;
237
		$compat_categorie=strtr($categorie,"-","_");
237
		$compat_categorie=strtr($categorie,"-","_");
238
		if(!isset($ossi))
238
		if(!isset($ossi))
239
		{
239
		{
240
		echo "<br><center><b>$l_name_cat</b></center>";
240
		echo "<br><center><b>$l_name_cat</b></center>";
241
		echo "<center><b>$l_description_cat</b></center><br>";
241
		echo "<center><b>$l_description_cat</b></center><br>";
242
		echo "$l_nb_domains <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_domain&titre=domain&nb_domains=$nb_domains&nb_urls=$nb_urls&nb_ip=$nb_ip'>$nb_domains</a></b><br>";
242
		echo "$l_nb_domains <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_domain&titre=domain&nb_domains=$nb_domains&nb_urls=$nb_urls&nb_ip=$nb_ip'>$nb_domains</a></b><br>";
243
		echo "$l_nb_urls <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_url&titre=url&nb_domains=$nb_domains&nb_urls=$nb_urls&nb_ip=$nb_ip'>$nb_urls</a></b><br>";
243
		echo "$l_nb_urls <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_url&titre=url&nb_domains=$nb_domains&nb_urls=$nb_urls&nb_ip=$nb_ip'>$nb_urls</a></b><br>";
244
		echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_urls=$nb_urls&nb_ip=$nb_ip'>$nb_ip</a></b><br>";
244
		echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_urls=$nb_urls&nb_ip=$nb_ip'>$nb_ip</a></b><br>";
245
		}
245
		}
246
		else
246
		else
247
		{
247
		{
248
			if($categorie=='ossi-tor_node.txt')
248
			if($categorie=='ossi-tor_node_ip')
249
			{
249
			{
250
				echo $l_tor_node;
250
				echo $l_tor_node;
251
				echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes'>$nb_ip</a></b><br>";
251
				echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes'>$nb_ip</a></b><br>";
252
			}
252
			}
253
			else
253
			else
254
			{
254
			{
255
				if(isset($_GET['state']))
255
				if(isset($_GET['state']))
256
				{
256
				{
257
					echo "$l_nb_domains <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_domain&titre=domain&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes&state=disable'>$nb_domains</a></b><br>";
257
					echo "$l_nb_domains <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_domain&titre=domain&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes&state=disable'>$nb_domains</a></b><br>";
258
					echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes&state=disable'>$nb_ip</a></b><br>";
258
					echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes&state=disable'>$nb_ip</a></b><br>";
259
				}
259
				}
260
				else
260
				else
261
				{
261
				{
262
					echo "$l_nb_domains <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_domain&titre=domain&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes'>$nb_domains</a></b><br>";
262
					echo "$l_nb_domains <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_domain&titre=domain&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes'>$nb_domains</a></b><br>";
263
					echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes'>$nb_ip</a></b><br>";
263
					echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes'>$nb_ip</a></b><br>";
264
				}
264
				}
265
			}
265
			}
266
		}
266
		}
267
		?>
267
		?>
268
	</td></tr>
268
	</td></tr>
269
</TABLE>
269
</TABLE>
270
<br>
270
<br>
271
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
271
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
272
	<tr><th>
272
	<tr><th>
273
		<?php
273
		<?php
274
		if(isset($_GET["titre"]))
274
		if(isset($_GET["titre"]))
275
		{
275
		{
276
			$titre = $_GET["titre"];
276
			$titre = $_GET["titre"];
277
		}
277
		}
278
		else
278
		else
279
		{
279
		{
280
			$titre = "domain";
280
			$titre = "domain";
281
		}
281
		}
282
		echo $l_example.$titre;
282
		echo $l_example.$titre;
283
		?>
283
		?>
284
	</th></tr>
284
	</th></tr>
285
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
285
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
286
</TABLE>
286
</TABLE>
287
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
287
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
288
	<tr><td valign="middle" align="left">
288
	<tr><td valign="middle" align="left">
289
<?php
289
<?php
290
		if($titre == "domain")
290
		if($titre == "domain")
291
		{
291
		{
292
 
292
 
293
			$filtre = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file;
293
			$filtre = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file;
294
			exec("head -n 15 $filtre | cut -d '/' -f2", $resultat);
294
			exec("head -n 15 $filtre | cut -d '/' -f2", $resultat);
295
		}
295
		}
296
		elseif($titre == "ip")
296
		elseif($titre == "ip")
297
		{
297
		{
298
			$filtre = $liste == "bl" ? $bl_categorie_ip_file : $wl_categorie_ip_file;
298
			$filtre = $liste == "bl" ? $bl_categorie_ip_file : $wl_categorie_ip_file;
299
			exec("head -n 15 $filtre | cut -d ' ' -f3", $resultat);
299
			exec("head -n 15 $filtre | cut -d ' ' -f3", $resultat);
300
		}
300
		}
301
		else
301
		else
302
		{
302
		{
303
			exec("head -n 15 $filtre", $resultat);
303
			exec("head -n 15 $filtre", $resultat);
304
		}
304
		}
305
		for($i=0; $i<count($resultat); $i++)
305
		for($i=0; $i<count($resultat); $i++)
306
			echo $resultat[$i]."<br/>";
306
			echo $resultat[$i]."<br/>";
307
		?>
307
		?>
308
	</td></tr>
308
	</td></tr>
309
</TABLE>
309
</TABLE>
310
<center><a href="javascript:window.close();"><b><?php echo "$l_close"; ?></b></a></center>
310
<center><a href="javascript:window.close();"><b><?php echo "$l_close"; ?></b></a></center>
311
</BODY>
311
</BODY>
312
</HTML>
312
</HTML>
313
 
313
 
314
 
314