Line 21... |
Line 21... |
21 |
function form_filter_ip($form_content, $color)
|
21 |
function form_filter_ip($form_content, $color)
|
22 |
{
|
22 |
{
|
23 |
//# reconstruction des ip
|
23 |
//# reconstruction des ip
|
24 |
$list = explode("\n", form_filter($form_content));
|
24 |
$list = explode("\n", form_filter($form_content));
|
25 |
$new_list = "";
|
25 |
$new_list = "";
|
26 |
foreach($list as &$value)
|
26 |
foreach ($list as &$value)
|
27 |
{
|
27 |
{
|
28 |
if(preg_match('/([0-9]{1,3}.){3}[0-9]{1,3}/', $value))
|
28 |
if(preg_match('/([0-9]{1,3}.){3}[0-9]{1,3}/', $value))
|
29 |
{
|
29 |
{
|
30 |
$new_list = $new_list.$value."\n";
|
30 |
$new_list = $new_list.$value."\n";
|
31 |
}
|
31 |
}
|
Line 247... |
Line 247... |
247 |
}
|
247 |
}
|
248 |
}
|
248 |
}
|
249 |
exec ("sudo /usr/local/bin/alcasar-url_filter_wl.sh -safesearch_$wl_safesearch");
|
249 |
exec ("sudo /usr/local/bin/alcasar-url_filter_wl.sh -safesearch_$wl_safesearch");
|
250 |
break;
|
250 |
break;
|
251 |
case 'MAJ_ossi_file' :
|
251 |
case 'MAJ_ossi_file' :
|
252 |
foreach($_POST as $fichier => $value)
|
252 |
foreach ($_POST as $fichier => $value)
|
253 |
{
|
253 |
{
|
254 |
if($fichier != "choix")
|
254 |
if($fichier != "choix")
|
255 |
{
|
255 |
{
|
256 |
$action=$_POST[$fichier];
|
256 |
$action=$_POST[$fichier];
|
257 |
if($action == $l_remove) //delete
|
257 |
if($action == $l_remove) //delete
|
Line 318... |
Line 318... |
318 |
$cols=1;
|
318 |
$cols=1;
|
319 |
if (file_exists($wl_categories))
|
319 |
if (file_exists($wl_categories))
|
320 |
{
|
320 |
{
|
321 |
$wl_files = file($wl_categories);
|
321 |
$wl_files = file($wl_categories);
|
322 |
$wl_files = preg_grep("/ossi-/", $wl_files, 1); // don't display ossi custom categories
|
322 |
$wl_files = preg_grep("/ossi-/", $wl_files, 1); // don't display ossi custom categories
|
323 |
foreach($wl_files as $fichier => $value)
|
323 |
foreach ($wl_files as $fichier => $value)
|
324 |
{
|
324 |
{
|
325 |
if ($cols == 1) { echo "<tr>";}
|
325 |
if ($cols == 1) { echo "<tr>";}
|
326 |
$categorie=trim(basename($value));
|
326 |
$categorie=trim(basename($value));
|
327 |
echo "<td><a href='bl_categories_help.php?liste=wl&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>";
|
327 |
echo "<td><a href='bl_categories_help.php?liste=wl&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>";
|
328 |
echo "<input type='checkbox' name='chk-$categorie'";
|
328 |
echo "<input type='checkbox' name='chk-$categorie'";
|
Line 365... |
Line 365... |
365 |
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>";
|
365 |
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>";
|
366 |
|
366 |
|
367 |
//list OSSI custom categories
|
367 |
//list OSSI custom categories
|
368 |
$fichierswl = array_diff(scandir($dir_blacklist), array('..','.','ossi-bl','ossi-wl'));
|
368 |
$fichierswl = array_diff(scandir($dir_blacklist), array('..','.','ossi-bl','ossi-wl'));
|
369 |
$fichierswl = preg_grep("/^ossi-wl-/",$fichierswl);
|
369 |
$fichierswl = preg_grep("/^ossi-wl-/",$fichierswl);
|
370 |
foreach($fichierswl as $fichier => $value)
|
370 |
foreach ($fichierswl as $fichier => $value)
|
371 |
{
|
371 |
{
|
372 |
echo "<tr><td><center><a href='bl_categories_help.php?liste=wl&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_wl_ip$value | cut -d\" \" -f1")."</center></td><td><center>".exec("wc -l $dir_wl_domain_names$value.conf | cut -d\" \" -f1")."</center></td><td><center><input type='submit' name='$value'";
|
372 |
echo "<tr><td><center><a href='bl_categories_help.php?liste=wl&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_wl_ip$value | cut -d\" \" -f1")."</center></td><td><center>".exec("wc -l $dir_wl_domain_names$value.conf | cut -d\" \" -f1")."</center></td><td><center><input type='submit' name='$value'";
|
373 |
if (file_exists ($dir_wl_domain_names_enabled.$value)) echo " value='$l_disable'>"; else echo " value='$l_enable'>";
|
373 |
if (file_exists ($dir_wl_domain_names_enabled.$value)) echo " value='$l_disable'>"; else echo " value='$l_enable'>";
|
374 |
echo "</center></td><td><center><input type='submit' name='$value' value='$l_remove'></center></td></tr>";
|
374 |
echo "</center></td><td><center><input type='submit' name='$value' value='$l_remove'></center></td></tr>";
|
375 |
}
|
375 |
}
|