240,7 → 240,7 |
$fichier=fopen($update_file_cat,"w+"); |
$pointeur=fopen($bl_categories_enabled, "w+"); |
foreach ($_POST as $key => $value) |
{ |
{ |
if (strstr($key,'chk-')) |
{ |
$line=str_replace('chk-','',$key)."\n"; |
250,10 → 250,10 |
fputs($fichier, "malware rsync://ftp.ut-capitole.fr/blacklist/dest/malware\n"); |
} |
} |
} |
} |
|
fclose($pointeur); |
} |
} |
else {echo "$l_error_open_file $bl_categories_enabled";} |
$fichier=fopen($dir_blacklist."ossi-bl/domains","w+"); |
fputs($fichier, form_filter($_POST['OSSI_bl'])); |
291,11 → 291,9 |
} |
if($action == $l_disable) //disable |
{ |
echo "$dir_ip_enabled$fichier"; |
//exec("rm -f $dir_ip_enabled$fichier"); |
//exec("rm -f $dir_domain_names_enabled$fichier"); |
//exec("sed -i \"/$fichier/d\" $bl_categories_enabled"); |
//exec("sudo /usr/local/bin/alcasar-bl.sh --reload"); |
exec("rm -f $dir_ip_enabled$fichier"); |
exec("rm -f $dir_domain_names_enabled$fichier"); |
exec("sudo /usr/local/bin/alcasar-bl.sh --reload"); |
} |
if($action == $l_enable) //enable |
{ |
447,10 → 445,10 |
|
//list OSSI custom categories |
$fichiersbl = array_diff(scandir($dir_blacklist), array('..','.','ossi-bl','ossi-wl')); |
$fichiersbl = preg_grep("/^ossi-bl-/",$fichiersbl); |
$fichiersbl = preg_grep("/^ossi-/",$fichiersbl); |
foreach($fichiersbl as $fichier => $value) |
{ |
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>"; |
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>"; |
} |
echo "</table><br/></td></form><form action='bl_filter.php' method='POST' enctype='multipart/form-data'>"; |
echo "<input type='hidden' name='choix' value='MAJ_ossi_file_upload'><td width=50% colspan=5 align=center>"; |