Line 193... |
Line 193... |
193 |
$l_file_state="State";
|
193 |
$l_file_state="State";
|
194 |
}
|
194 |
}
|
195 |
$dir_etc="/usr/local/etc/";
|
195 |
$dir_etc="/usr/local/etc/";
|
196 |
$dir_dg="/etc/dansguardian/lists/";
|
196 |
$dir_dg="/etc/dansguardian/lists/";
|
197 |
$dir_bl_ip="/usr/local/share/iptables-bl/";
|
197 |
$dir_bl_ip="/usr/local/share/iptables-bl/";
|
- |
|
198 |
$dir_bl_dns="/usr/local/share/dnsmasq-bl/";
|
198 |
$bl_categories=$dir_etc."alcasar-bl-categories";
|
199 |
$bl_categories=$dir_etc."alcasar-bl-categories";
|
199 |
$bl_categories_enabled=$dir_etc."alcasar-bl-categories-enabled";
|
200 |
$bl_categories_enabled=$dir_etc."alcasar-bl-categories-enabled";
|
200 |
$conf_file=$dir_etc."alcasar.conf";
|
201 |
$conf_file=$dir_etc."alcasar.conf";
|
201 |
$dir_blacklist=$dir_dg."blacklist/";
|
202 |
$dir_blacklist=$dir_dg."blacklist/";
|
202 |
$urlregex_file=$dir_dg."urlregexplist";
|
203 |
$urlregex_file=$dir_dg."urlregexplist";
|
Line 260... |
Line 261... |
260 |
}
|
261 |
}
|
261 |
|
262 |
|
262 |
fclose($pointeur);
|
263 |
fclose($pointeur);
|
263 |
}
|
264 |
}
|
264 |
else {echo "$l_error_open_file $bl_categories_enabled";}
|
265 |
else {echo "$l_error_open_file $bl_categories_enabled";}
|
265 |
$fichier=fopen($dir_dg."blacklists/ossi/domains","w+");
|
266 |
$fichier=fopen($dir_bl_dns."ossi.conf","w+");
|
266 |
fputs($fichier, form_filter($_POST['OSSI_bl_domains']));
|
267 |
fputs($fichier, form_filter($_POST['OSSI_bl_domains']));
|
267 |
fclose($fichier);
|
268 |
fclose($fichier);
|
268 |
unset($_POST['OSSI_bl_domains']);
|
269 |
unset($_POST['OSSI_bl_domains']);
|
269 |
$fichier=fopen($dir_dg."exceptionsitelist","w+");
|
270 |
$fichier=fopen($dir_dg."exceptionsitelist","w+");
|
270 |
fputs($fichier, form_filter($_POST['BL_rehabilited_domains']));
|
271 |
fputs($fichier, form_filter($_POST['BL_rehabilited_domains']));
|
Line 417... |
Line 418... |
417 |
$ligne=fgets($pointeur, 4096);
|
418 |
$ligne=fgets($pointeur, 4096);
|
418 |
if ($ligne)
|
419 |
if ($ligne)
|
419 |
{
|
420 |
{
|
420 |
if ($cols == 1) { echo "<tr>";}
|
421 |
if ($cols == 1) { echo "<tr>";}
|
421 |
$categorie=trim(basename($ligne));
|
422 |
$categorie=trim(basename($ligne));
|
422 |
if($categorie != "ossi")
|
423 |
if($categorie != "ossi") // don't display ossi
|
423 |
{
|
424 |
{
|
424 |
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>";
|
425 |
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>";
|
425 |
echo "<input type='checkbox' name='chk-$categorie'";
|
426 |
echo "<input type='checkbox' name='chk-$categorie'";
|
426 |
// si la ligne est commentée -> categorie non selectionnée
|
427 |
// si la ligne est commentée -> categorie non selectionnée
|
427 |
if (preg_match('/^#/',$ligne, $r)) { echo ">";}
|
428 |
if (preg_match('/^#/',$ligne, $r)) { echo ">";}
|
Line 470... |
Line 471... |
470 |
echo "<tr><td valign='middle' align='left' colspan=10>";
|
471 |
echo "<tr><td valign='middle' align='left' colspan=10>";
|
471 |
echo "<center><b>$l_add_to_bl</b></center></td></tr>";
|
472 |
echo "<center><b>$l_add_to_bl</b></center></td></tr>";
|
472 |
echo "<tr><td width=50% colspan=5 align=center>";
|
473 |
echo "<tr><td width=50% colspan=5 align=center>";
|
473 |
echo "<H3>$l_forbidden_dns</H3>$l_one_dns<BR>";
|
474 |
echo "<H3>$l_forbidden_dns</H3>$l_one_dns<BR>";
|
474 |
echo "<textarea name='OSSI_bl_domains' rows=3 cols=40>";
|
475 |
echo "<textarea name='OSSI_bl_domains' rows=3 cols=40>";
|
475 |
echo_file ($dir_dg."blacklists/ossi/domains");
|
476 |
echo_file ($dir_bl_dns."ossi.conf");
|
476 |
echo "</textarea></td>";
|
477 |
echo "</textarea></td>";
|
477 |
echo "<td width=50% colspan=5 align=center>";
|
478 |
echo "<td width=50% colspan=5 align=center>";
|
478 |
echo "<H3>$l_forbidden_ip</H3>$l_forbidden_ip_explain<BR>";
|
479 |
echo "<H3>$l_forbidden_ip</H3>$l_forbidden_ip_explain<BR>";
|
479 |
echo "<textarea name='OSSI_bl_ip' rows=3 cols=40>";
|
480 |
echo "<textarea name='OSSI_bl_ip' rows=3 cols=40>";
|
480 |
echo_ip_file ($dir_bl_ip."ossi");
|
481 |
echo_ip_file ($dir_bl_ip."ossi");
|