Subversion Repositories ALCASAR

Rev

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

Rev 1332 Rev 1339
Line 14... Line 14...
14
	else
14
	else
15
		{
15
		{
16
		echo "$filename doesn't exist";
16
		echo "$filename doesn't exist";
17
		}
17
		}
18
	}
18
	}
-
 
19
function echo_ip_file ($filename)
-
 
20
{
-
 
21
	exec("cat $filename | cut -d ' ' -f3", $resultat);
-
 
22
	for($i=0; $i<exec("wc -l $filename"); $i++)
-
 
23
	{
-
 
24
		echo $resultat[$i]."\n";
-
 
25
	}
-
 
26
}
19
?>
27
?>
20
<table width="100%" border="0" cellspacing="0" cellpadding="0">
28
<table width="100%" border="0" cellspacing="0" cellpadding="0">
21
	<tr><th>
29
	<tr><th>
22
	<?php echo $l_list_version; echo date ("F d Y", filemtime ('/etc/dansguardian/lists/blacklists/README'));?>
30
	<?php echo $l_list_version; echo date ("F d Y", filemtime ('/etc/dansguardian/lists/blacklists/README'));?>
23
	</th></tr>
31
	</th></tr>
Line 44... Line 52...
44
	echo " ($l_warning)";
52
	echo " ($l_warning)";
45
	}
53
	}
46
?>
54
?>
47
</FORM>
55
</FORM>
48
</td></tr>
56
</td></tr>
49
</table>
57
</table><br/>
50
<table width="100%" border="0" cellspacing="0" cellpadding="0">
58
<table width="100%" border="0" cellspacing="0" cellpadding="0">
51
	<tr><th><?php echo $l_bl; ?></th></tr>
59
	<tr><th><?php echo $l_bl; ?></th></tr>
52
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
60
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
53
</table>
61
</table>
54
<table width="100%" border=1 cellspacing=0 cellpadding=1>
62
<table width="100%" border=1 cellspacing=0 cellpadding=1>
Line 66... Line 74...
66
		{
74
		{
67
		$ligne=fgets($pointeur, 4096);
75
		$ligne=fgets($pointeur, 4096);
68
		if ($ligne)
76
		if ($ligne)
69
			{
77
			{
70
			if ($cols == 1) { echo "<tr>";}
78
			if ($cols == 1) { echo "<tr>";}
71
			$categorie=trim(basename($ligne));
79
				$categorie=trim(basename($ligne));
-
 
80
			if($categorie != "ossi")
-
 
81
			{
72
			echo "<td><a href='bl_categories_help.php?liste=bl&cat=$categorie' target='cat_help' onclick=window.open('bl_categories_help.php','cat_help','width=600,height=450,toolbar=no,scrollbars=yes,resizable=yes') title='categories help page'>$categorie</a><br>";
82
				echo "<td><a href='bl_categories_help.php?liste=bl&cat=$categorie' target='cat_help' onclick=window.open('bl_categories_help.php','cat_help','width=600,height=450,toolbar=no,scrollbars=yes,resizable=yes') title='categories help page'>$categorie</a><br>";
73
			echo "<input type='checkbox' name='chk-$categorie'";
83
				echo "<input type='checkbox' name='chk-$categorie'";
74
			// si la ligne est commentée -> categorie non selectionnée
84
				// si la ligne est commentée -> categorie non selectionnée
75
			if (preg_match('/^#/',$ligne, $r)) { echo ">";}
85
				if (preg_match('/^#/',$ligne, $r)) { echo ">";}
76
			else { echo "checked>"; }
86
				else { echo "checked>"; }
77
			echo "</td>";
87
				echo "</td>";
78
			$cols++;
88
				$cols++;
-
 
89
			}
79
			if ($cols > 10) {
90
			if ($cols > 10) {
80
				echo "</tr>";
91
				echo "</tr>";
81
				$cols=1; }
92
				$cols=1; }
82
			}
93
			}
83
		}
94
		}
Line 87... Line 98...
87
	echo "$l_error_open_file $bl_categories";
98
	echo "$l_error_open_file $bl_categories";
88
	}
99
	}
89
echo "</td></tr>";
100
echo "</td></tr>";
90
echo "<tr><td valign='middle' align='left' colspan=10>";
101
echo "<tr><td valign='middle' align='left' colspan=10>";
91
echo "<center><b>$l_maj_rehabilitated</b></center></td></tr>";
102
echo "<center><b>$l_maj_rehabilitated</b></center></td></tr>";
92
echo "<tr><td colspan=5 align=center>";
103
echo "<tr><td width=50% colspan=5 align=center>";
93
echo "<H3>$l_rehabilitated_dns</H3>$l_rehabilitated_dns_explain<BR>$l_one_dns<BR>";
104
echo "<H3>$l_rehabilitated_dns</H3>$l_rehabilitated_dns_explain<BR>$l_one_dns<BR>";
94
echo "<textarea name='BL_rehabilited_domains' rows=3 cols=40>";
105
echo "<textarea name='BL_rehabilited_domains' rows=3 cols=40>";
95
echo_file ($dir_dg."exceptionsitelist");
106
echo_file ($dir_dg."exceptionsitelist");
96
echo "</textarea></td>";
107
echo "</textarea></td>";
97
echo "<td colspan=5 align=center>";
108
echo "<td width=50% colspan=5 align=center>";
98
echo "<H3>$l_rehabilitated_url</H3>$l_rehabilitated_url_explain<BR>$l_one_url<BR>";
109
echo "<H3>$l_rehabilitated_ip</H3>$l_rehabilitated_ip_explain<BR>$l_one_ip<BR>";
99
echo "<textarea name='BL_rehabilited_urls' rows=3 cols=40>";
110
echo "<textarea name='BL_rehabilited_ip' rows=3 cols=40>";
100
echo_file ($dir_dg."exceptionurllist");
111
echo_file ($dir_dg."exceptioniplist");
101
echo "</textarea></td></tr><tr><td colspan=10>";
112
echo "</textarea></td></tr><tr><td width=50% colspan=10>";
102
echo "<tr><td valign='middle' align='left' colspan=10>";
113
echo "<tr><td valign='middle' align='left' colspan=10>";
103
echo "<center><b>$l_add_to_bl</b></center></td></tr>";
114
echo "<center><b>$l_add_to_bl</b></center></td></tr>";
104
echo "<tr><td colspan=5 align=center>";
115
echo "<tr><td width=50% colspan=5 align=center>";
105
echo "<H3>$l_forbidden_dns</H3>$l_forbidden_dns_explain<BR>";
116
echo "<H3>$l_forbidden_dns</H3>$l_forbidden_dns_explain<BR>";
106
echo "<textarea name='OSSI_bl_domains' rows=3 cols=40>";
117
echo "<textarea name='OSSI_bl_domains' rows=3 cols=40>";
107
echo_file ($dir_dg."blacklists/ossi/domains");
118
echo_file ($dir_dg."blacklists/ossi/domains");
108
echo "</textarea></td>";
119
echo "</textarea></td>";
109
echo "<td colspan=5 align=center>";
120
echo "<td width=50% colspan=5 align=center>";
110
echo "<H3>$l_forbidden_url</H3>$l_forbidden_url_explain<BR>";
121
echo "<H3>$l_forbidden_ip</H3>$l_forbidden_ip_explain<BR>";
111
echo "<textarea name='OSSI_bl_urls' rows=3 cols=40>";
122
echo "<textarea name='OSSI_bl_ip' rows=3 cols=40>";
112
echo_file ($dir_dg."blacklists/ossi/urls");
123
echo_ip_file ($dir_bl_ip."ossi");
113
echo "</textarea></td></tr><tr><td colspan=10>";
124
echo "</textarea></td></tr><tr><td colspan=10>";
114
echo "<input type='submit' value='$l_record'>";
125
echo "<input type='submit' value='$l_record'>";
115
echo "</form> ($l_wait)";
126
echo "</form> ($l_wait)";
-
 
127
echo "</table></td><br/>";
-
 
128
?>
-
 
129
<table width="100%" border="0" cellspacing="0" cellpadding="0">
-
 
130
	<tr><th><?php echo $l_ip_file_title; ?></th></tr>
-
 
131
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
-
 
132
</table>
-
 
133
<table width="100%" border=1 cellspacing=0 cellpadding=1>
-
 
134
<form action='bl_filter.php' method='POST'>
-
 
135
<input type='hidden' name='choix' value='MAJ_ip_file_delete'>
-
 
136
<?php
-
 
137
echo "<tr><td width=50% colspan=5 align=center>";
-
 
138
echo "<H3>$l_file_list</H3>";
-
 
139
echo "<table cellspacing=2 cellpadding=3 border=1><tr><th>$l_file_name<th>$l_nb_ip<th>$l_file_remove</tr>";
-
 
140
exec("cd $upload_dir && ls ossi-*", $fichiersIp);
-
 
141
foreach($fichiersIp as $fichier => $value)
-
 
142
{
-
 
143
	echo "<tr><td><center>".exec("sed 's/^.....//g' <<< $value")."</center></td><td><center>".exec("wc -l $upload_dir$value | awk '{print $1}'")."</center></td><td><center><input type='submit' name='$value' value='$l_remove'></center></td></tr>";
-
 
144
}
-
 
145
echo "</table><br/></td></form><form action='bl_filter.php' method='POST' enctype='multipart/form-data'>";
-
 
146
echo "<input type='hidden' name='choix' value='MAJ_ip_file_upload'><td width=50% colspan=5 align=center>";
-
 
147
echo "<H3>$l_add_ip_file</H3>";
-
 
148
echo "<input type='file' name='fichier_ip'>";
-
 
149
echo "<input type='submit' value='$l_submit'>";
-
 
150
echo "</td></tr>";
-
 
151
echo "</form>";
-
 
152
echo "</table><br/>";
116
?>
153
?>
117
</td></tr>
-
 
118
</TABLE>
-
 
119
<table width="100%" border="0" cellspacing="0" cellpadding="0">
154
<table width="100%" border="0" cellspacing="0" cellpadding="0">
120
	<tr><th><?php echo $l_wl; ?></th></tr>
155
	<tr><th><?php echo $l_wl; ?></th></tr>
121
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
156
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
122
</table>
157
</table>
123
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
158
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
Line 155... Line 190...
155
else	{
190
else	{
156
	echo "$l_error_open_file $wl_categories";
191
	echo "$l_error_open_file $wl_categories";
157
	}
192
	}
158
echo "<tr><td valign='middle' align='left' colspan=10>";
193
echo "<tr><td valign='middle' align='left' colspan=10>";
159
echo "<center><b>$l_add_to_wl</b></center></td></tr>";
194
echo "<center><b>$l_add_to_wl</b></center></td></tr>";
160
echo "<tr><td colspan=5 align=center>";
195
echo "<tr><td width=50% colspan=5 align=center>";
161
echo "<H3>$l_allowed_dns</H3>$l_forbidden_dns_explain<BR>";
196
echo "<H3>$l_allowed_dns</H3>$l_forbidden_dns_explain<BR>";
162
echo "<textarea name='OSSI_wl_domains' rows=3 cols=40>";
197
echo "<textarea name='OSSI_wl_domains' rows=3 cols=40>";
163
echo_file ($dir_dg."blacklists/ossi/domains_wl");
198
echo_file ($dir_dg."blacklists/ossi/domains_wl");
164
echo "</textarea></td>";
199
echo "</textarea></td>";
165
echo "<td colspan=5 align=center>";
200
echo "<td width=50% colspan=5 align=center>";
166
echo "<H3>$l_allowed_url</H3>$l_forbidden_url_explain<BR>";
201
echo "<H3>$l_allowed_ip</H3>$l_forbidden_ip_explain<BR>";
167
echo "<textarea name='OSSI_wl_urls' rows=3 cols=40>";
202
echo "<textarea name='OSSI_wl_ip' rows=3 cols=40>";
168
echo_file ($dir_dg."blacklists/ossi/urls_wl");
203
echo_file ($dir_dg."blacklists/ossi/urls_wl");
169
echo "</textarea></td></tr><tr><td colspan=10>";
204
echo "</textarea></td></tr><tr><td colspan=10>";
170
echo "<input type='submit' value='$l_record' disabled>";
205
echo "<input type='submit' value='$l_record' disabled>";
171
echo "</form> (Please wait for the next vesion of ALCASAR)";
206
echo "</form> (Wait for a next version of ALCASAR !)";
172
?>
207
?>
173
</td></tr>
208
</td></tr>
174
</TABLE>
209
</TABLE><br/>
175
<table width="100%" border="0" cellspacing="0" cellpadding="0">
210
<table width="100%" border="0" cellspacing="0" cellpadding="0">
176
	<tr><th><?php echo $l_specific_filtering; ?></th></tr>
211
	<tr><th><?php echo $l_specific_filtering; ?></th></tr>
177
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
212
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
178
</table>
213
</table>
179
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
214
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
Line 239... Line 274...
239
	}
274
	}
240
else {
275
else {
241
	echo "$YOUTUBE_ID'>";
276
	echo "$YOUTUBE_ID'>";
242
	} 
277
	} 
243
echo " $l_youtube_id<tr><td>";
278
echo " $l_youtube_id<tr><td>";
244
echo "<input type='submit' value='$l_record'>";
279
echo "<input type='submit' value='$l_record'></td></tr>";
245
?>
280
?>
246
</form> 
281
</FORM> 
247
</td></tr>
-
 
248
</TABLE>
282
</TABLE>