318 |
richard |
1 |
<?php
|
|
|
2 |
function echo_file ($filename)
|
|
|
3 |
{
|
|
|
4 |
if (file_exists($filename))
|
|
|
5 |
{
|
|
|
6 |
if (filesize($filename) != 0)
|
|
|
7 |
{
|
|
|
8 |
$pointeur=fopen($filename,"r");
|
|
|
9 |
$tampon = fread($pointeur, filesize($filename));
|
|
|
10 |
fclose($pointeur);
|
|
|
11 |
echo $tampon;
|
|
|
12 |
}
|
|
|
13 |
}
|
|
|
14 |
else
|
|
|
15 |
{
|
|
|
16 |
echo "$l_error_openfile $filename";
|
|
|
17 |
}
|
|
|
18 |
}
|
|
|
19 |
?>
|
|
|
20 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
21 |
<tr><th><?php echo $l_main_bl; ?></th></tr>
|
|
|
22 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
|
|
|
23 |
</table>
|
|
|
24 |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
|
|
|
25 |
<tr><td valign="middle" align="left" colspan=10>
|
|
|
26 |
<FORM action='dns_filter.php' method=POST>
|
|
|
27 |
<?php
|
|
|
28 |
echo "<center>$l_bl_version";
|
842 |
richard |
29 |
echo date ("F d Y", filemtime ('/etc/dansguardian/lists/blacklists/README'));
|
318 |
richard |
30 |
echo "</center><BR>";
|
878 |
richard |
31 |
$dir_tmp="/tmp/blacklists";
|
|
|
32 |
if (file_exists("$dir_tmp/blacklists.tar.gz"))
|
|
|
33 |
{
|
|
|
34 |
echo "$l_fingerprint"; echo_file ("$dir_tmp/md5sum");
|
|
|
35 |
echo "<br>$l_fingerprint2<a href='http://dsi.ut-capitole.fr/blacklists/download/MD5SUM.LST' target='cat_help' onclick=window.open('http://dsi.ut-capitole.fr/blacklists/download/MD5SUM.LST','cat_help','width=600,height=150,toolbar=no,scrollbars=yes,resizable=yes') title='verify fingerprint'>dsi.ut-capitole.fr/blacklists/download/MD5SUM.LST</a><br>";
|
|
|
36 |
echo "<input type='hidden' name='choix' value='Active_bl'>";
|
|
|
37 |
echo "<input type='submit' value='$l_activate_bl'>";
|
|
|
38 |
echo " ($l_warning)";
|
|
|
39 |
}
|
|
|
40 |
else
|
|
|
41 |
{
|
|
|
42 |
echo "<input type='hidden' name='choix' value='Download_bl'>";
|
|
|
43 |
echo "<input type='submit' value='$l_download_bl'>";
|
|
|
44 |
echo " ($l_warning)";
|
|
|
45 |
}
|
318 |
richard |
46 |
?>
|
|
|
47 |
</FORM>
|
|
|
48 |
</td></tr>
|
|
|
49 |
<tr><td valign="middle" align="left" colspan=10>
|
|
|
50 |
<FORM action='dns_filter.php' method=POST>
|
|
|
51 |
<input type='hidden' name='choix' value='MAJ_cat'>
|
|
|
52 |
<?php
|
|
|
53 |
echo "<center>$l_bl_categories</center></td></tr>";
|
|
|
54 |
//on lit et on interprete le fichier de catégories
|
|
|
55 |
$cols=1;
|
|
|
56 |
if (file_exists($bl_categories))
|
|
|
57 |
{
|
|
|
58 |
$pointeur=fopen($bl_categories,"r");
|
|
|
59 |
while (!feof ($pointeur))
|
|
|
60 |
{
|
|
|
61 |
$ligne=fgets($pointeur, 4096);
|
|
|
62 |
if ($ligne)
|
|
|
63 |
{
|
|
|
64 |
if ($cols == 1) { echo "<tr>";}
|
|
|
65 |
$categorie=trim(basename($ligne));
|
|
|
66 |
echo "<td><a href='bl_categories_help.php?cat=$categorie' target='cat_help' onclick=window.open('bl_categories_help.php','cat_help','width=600,height=150,toolbar=no,scrollbars=no,resizable=yes') title='categories help page'>$categorie</a><br>";
|
|
|
67 |
echo "<input type='checkbox' name='chk-$categorie'";
|
|
|
68 |
// si la ligne est commentée -> categorie non selectionnée
|
|
|
69 |
if (preg_match('/^#/',$ligne, $r)) { echo ">";}
|
|
|
70 |
else { echo "checked>"; }
|
|
|
71 |
echo "</td>";
|
|
|
72 |
$cols++;
|
|
|
73 |
if ($cols > 10) {
|
|
|
74 |
echo "</tr>";
|
|
|
75 |
$cols=1; }
|
|
|
76 |
}
|
|
|
77 |
}
|
|
|
78 |
fclose($pointeur);
|
|
|
79 |
}
|
|
|
80 |
else {
|
|
|
81 |
echo "$l_error_open_file $bl_categories";
|
|
|
82 |
}
|
878 |
richard |
83 |
echo "</td></tr>";
|
|
|
84 |
echo "<tr><td valign='middle' align='left' colspan=10>";
|
876 |
richard |
85 |
echo "<center><b>$l_maj_rehabilitated</b></center></td></tr>";
|
|
|
86 |
echo "<tr><td colspan=5 align=center>";
|
|
|
87 |
echo "<H3>$l_rehabilitated_dns</H3>$l_rehabilitated_dns_explain<BR>$l_one_dns<BR>";
|
|
|
88 |
echo "<textarea name='OSSI_wl_domains' rows=5 cols=40>";
|
|
|
89 |
echo_file ("/etc/dansguardian/lists/exceptionsitelist");
|
|
|
90 |
echo "</textarea></td>";
|
|
|
91 |
echo "<td colspan=5 align=center>";
|
|
|
92 |
echo "<H3>$l_rehabilitated_url</H3>$l_rehabilitated_url_explain<BR>$l_one_url<BR>";
|
|
|
93 |
echo "<textarea name='OSSI_wl_urls' rows=5 cols=40>";
|
|
|
94 |
echo_file ("/etc/dansguardian/lists/exceptionurllist");
|
|
|
95 |
echo "</textarea></td></tr><tr><td colspan=10>";
|
878 |
richard |
96 |
echo "<tr><td valign='middle' align='left' colspan=10>";
|
|
|
97 |
echo "<center><b>$l_add_to_bl</b></center></td></tr>";
|
|
|
98 |
echo "<tr><td colspan=5 align=center>";
|
|
|
99 |
echo "<H3>$l_forbidden_dns</H3>$l_forbidden_dns_explain<BR>";
|
|
|
100 |
echo "<textarea name='OSSI_bl_domains' rows=5 cols=40>";
|
|
|
101 |
echo_file ("/etc/dansguardian/lists/blacklists/ossi/domains");
|
|
|
102 |
echo "</textarea></td>";
|
|
|
103 |
echo "<td colspan=5 align=center>";
|
|
|
104 |
echo "<H3>$l_forbidden_url</H3>$l_forbidden_url_explain<BR>";
|
|
|
105 |
echo "<textarea name='OSSI_bl_urls' rows=5 cols=40>";
|
|
|
106 |
echo_file ("/etc/dansguardian/lists/blacklists/ossi/urls");
|
|
|
107 |
echo "</textarea></td></tr><tr><td colspan=10>";
|
876 |
richard |
108 |
echo "<input type='submit' value='$l_record'>";
|
|
|
109 |
echo "</form> ($l_wait)";
|
|
|
110 |
?>
|
|
|
111 |
</td></tr>
|
318 |
richard |
112 |
</TABLE>
|
|
|
113 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
878 |
richard |
114 |
<tr><th><?php echo $l_specific_filtering; ?></th></tr>
|
318 |
richard |
115 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
|
|
|
116 |
</table>
|
|
|
117 |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
|
|
|
118 |
<FORM action='dns_filter.php' method='POST'>
|
878 |
richard |
119 |
<input type='hidden' name='choix' value='Specific_filtering'>
|
876 |
richard |
120 |
<?php
|
318 |
richard |
121 |
?>
|
878 |
richard |
122 |
<tr><td>
|
|
|
123 |
<input type='checkbox' name='chk-ip'> <?php echo "$l_ip_filtering"?>
|
|
|
124 |
<tr><td>
|
|
|
125 |
<input type='checkbox' name='chk-safe-search'> <?php echo "$l_safe_searching"?>
|
|
|
126 |
<br><?php echo "$l_safe_youtube"?><input type='text' name='Youtube-ID' size='30'>
|
|
|
127 |
<tr><td>
|
359 |
richard |
128 |
<input type='submit' value='<?php echo "$l_record"?>'>
|
878 |
richard |
129 |
</form>
|
318 |
richard |
130 |
</td></tr>
|
|
|
131 |
</TABLE>
|