Line 289... |
Line 289... |
289 |
exec("rm -rf $dir_blacklist$fichier");
|
289 |
exec("rm -rf $dir_blacklist$fichier");
|
290 |
exec ("sudo /usr/local/bin/alcasar-bl.sh --reload");
|
290 |
exec ("sudo /usr/local/bin/alcasar-bl.sh --reload");
|
291 |
}
|
291 |
}
|
292 |
if($action == $l_disable) //disable
|
292 |
if($action == $l_disable) //disable
|
293 |
{
|
293 |
{
|
- |
|
294 |
echo "$dir_ip_enabled$fichier";
|
294 |
exec("rm -f $dir_ip_enabled$fichier");
|
295 |
//exec("rm -f $dir_ip_enabled$fichier");
|
295 |
exec("rm -f $dir_domain_names_enabled$fichier");
|
296 |
//exec("rm -f $dir_domain_names_enabled$fichier");
|
- |
|
297 |
//exec("sed -i \"/$fichier/d\" $bl_categories_enabled");
|
296 |
exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
|
298 |
//exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
|
297 |
}
|
299 |
}
|
298 |
if($action == $l_enable) //enable
|
300 |
if($action == $l_enable) //enable
|
299 |
{
|
301 |
{
|
300 |
exec("ln -s $dir_ip$fichier $dir_ip_enabled$fichier");
|
302 |
exec("ln -s $dir_ip$fichier $dir_ip_enabled$fichier");
|
301 |
exec("ln -s $dir_domain_names$fichier $dir_domain_names_enables$fichier");
|
303 |
exec("ln -s $dir_domain_names$fichier $dir_domain_names_enables$fichier");
|
Line 443... |
Line 445... |
443 |
echo "<H3>$l_file_list</H3>";
|
445 |
echo "<H3>$l_file_list</H3>";
|
444 |
echo "<table cellspacing=2 cellpadding=3 border=1><tr><th>$l_file_name<th>$l_nb_ip<th>$l_nb_domain_names<th colspan=2>$l_file_action</tr>";
|
446 |
echo "<table cellspacing=2 cellpadding=3 border=1><tr><th>$l_file_name<th>$l_nb_ip<th>$l_nb_domain_names<th colspan=2>$l_file_action</tr>";
|
445 |
|
447 |
|
446 |
//list OSSI custom categories
|
448 |
//list OSSI custom categories
|
447 |
$fichiersbl = array_diff(scandir($dir_blacklist), array('..','.','ossi-bl','ossi-wl'));
|
449 |
$fichiersbl = array_diff(scandir($dir_blacklist), array('..','.','ossi-bl','ossi-wl'));
|
448 |
$fichiersbl = preg_grep("/^ossi-/",$fichiersbl);
|
450 |
$fichiersbl = preg_grep("/^ossi-bl-/",$fichiersbl);
|
449 |
foreach($fichiersbl as $fichier => $value)
|
451 |
foreach($fichiersbl as $fichier => $value)
|
450 |
{
|
452 |
{
|
451 |
echo "<tr><td><center><a href='bl_categories_help.php?liste=bl&cat=$value&filtre=domain' target='cat_help' onclick=window.open('bl_categories_help','cat_help','width=600,height=450,toolbar=no,scrollbars=yes,resizable=yes') title='categories help page'>".exec("sed 's/^.....//g' <<< $value")."</a></center></td><td><center>".exec("wc -l $dir_ip_enabled$value | awk '{print $1}'")."</center></td><td><center>".exec("wc -l $dir_domain_names_enabled$value | awk '{print $1}'")."</center></td><td><center><input type='submit' name='$value' value='$l_disable'></center></td><td><center><input type='submit' name='$value' value='$l_remove'></center></td></tr>";
|
453 |
echo "<tr><td><center><a href='bl_categories_help.php?liste=bl&cat=$value&filtre=domain' target='cat_help' onclick=window.open('bl_categories_help','cat_help','width=600,height=450,toolbar=no,scrollbars=yes,resizable=yes') title='categories help page'>".substr($value,8)."</a></center></td><td><center>".exec("wc -l $dir_ip$value | cut -d\" \" -f1")."</center></td><td><center>".exec("wc -l $dir_domain_names$value.conf | cut -d\" \" -f1")."</center></td><td><center><input type='submit' name='$value' value='$l_disable'></center></td><td><center><input type='submit' name='$value' value='$l_remove'></center></td></tr>";
|
452 |
}
|
454 |
}
|
453 |
echo "</table><br/></td></form><form action='bl_filter.php' method='POST' enctype='multipart/form-data'>";
|
455 |
echo "</table><br/></td></form><form action='bl_filter.php' method='POST' enctype='multipart/form-data'>";
|
454 |
echo "<input type='hidden' name='choix' value='MAJ_ossi_file_upload'><td width=50% colspan=5 align=center>";
|
456 |
echo "<input type='hidden' name='choix' value='MAJ_ossi_file_upload'><td width=50% colspan=5 align=center>";
|
455 |
echo "<H3>$l_add_file</H3>";
|
457 |
echo "<H3>$l_add_file</H3>";
|
456 |
echo "$l_add_file_explain";
|
458 |
echo "$l_add_file_explain";
|