/web/acc/admin/bl_categories_help.php |
---|
142,7 → 142,7 |
if(isset($categorie)) |
{ |
$fin1 = 0; $fin2 = 0; |
foreach($global_usage as $line) |
foreach ($global_usage as $line) |
{ |
if(preg_match("#^NAME:.$categorie$#", $line) == 1) |
{ |
/web/acc/admin/bl_filter.php |
---|
23,7 → 23,7 |
//# reconstruction des ip |
$list = explode("\n", form_filter($form_content)); |
$new_list = ""; |
foreach($list as &$value) |
foreach ($list as &$value) |
{ |
if(preg_match('/([0-9]{1,3}.){3}[0-9]{1,3}/', $value)) |
{ |
330,7 → 330,7 |
exec ("sudo /usr/local/bin/alcasar-url_filter_bl.sh -safesearch_$bl_safesearch -pureip_$bl_pureip"); |
break; |
case 'MAJ_ossi_file' : |
foreach($_POST as $fichier => $value) |
foreach ($_POST as $fichier => $value) |
{ |
if($fichier != "choix" && $fichier != "update_cat") |
{ |
365,7 → 365,7 |
else |
{ |
echo "<p>".$l_update_failed.":</p>"; |
foreach($out as $line) |
foreach ($out as $line) |
{ |
echo "<p>".$line."</p>"; |
} |
382,7 → 382,7 |
$f = fopen($update_file_ossi_cat, 'w'); |
fclose($f); |
foreach($_POST as $fichier => $value) |
foreach ($_POST as $fichier => $value) |
{ |
// General BL |
if ($fichier == 'update_cat' && $value == 1) |
474,7 → 474,7 |
{ |
$bl_files = file($bl_categories); |
$bl_files = preg_grep("/ossi-/", $bl_files, 1); // don't display ossi custom categories |
foreach($bl_files as $fichier => $value) |
foreach ($bl_files as $fichier => $value) |
{ |
if ($cols == 1) { echo "<tr>";} |
$categorie=trim(basename($value)); |
538,7 → 538,7 |
//list OSSI custom categories |
$fichiersbl = array_diff(scandir($dir_blacklist), array('..','.','ossi-bl','ossi-wl')); |
$fichiersbl = preg_grep("/^ossi-bl-/",$fichiersbl); |
foreach($fichiersbl as $fichier => $value) |
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_bl_ip$value | cut -d\" \" -f1")."</center></td><td><center>".exec("wc -l $dir_bl_domain_names$value.conf | cut -d\" \" -f1")."</center></td><td><center><input type='submit' name='$value'"; |
if (file_exists ($dir_bl_domain_names_enabled.$value)) echo " value='$l_disable'>"; else echo " value='$l_enable'>"; |
584,7 → 584,7 |
echo "<input type='radio' name='update_cat' value=1 ".$update_select[1]." >".$l_enable; |
echo "</td>"; |
// Display update checkbox for each updateable ossi-bl |
foreach($updateable_ossi_bls as $value) |
foreach ($updateable_ossi_bls as $value) |
{ |
//check if autoupdate is enabled |
$update_ossi_select = ["", ""]; |
/web/acc/admin/services.php |
---|
158,7 → 158,7 |
function checkServiceStatus($service){ |
$response = false; |
exec("sudo /usr/bin/systemctl is-active ".escapeshellarg("$service.service"), $retval); |
foreach( $retval as $val ) { |
foreach ( $retval as $val ) { |
if ($val == "active"){ |
$response = true; |
break; |
262,7 → 262,7 |
<div class="panel-row"> |
<table width="100%" border=0 cellspacing=0 cellpadding=0> |
<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr> |
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?> |
<?php foreach ( $MainServiceStatus as $serviceName => $statusOK ) { ?> |
<tr> |
<?php if ($statusOK) { ?> |
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td> |
288,7 → 288,7 |
<table width="100%" border=0 cellspacing=0 cellpadding=0> |
<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr> |
<!-- <TR align="center"> --> |
<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?> |
<?php foreach ( $FilterServiceStatus as $serviceName => $statusOK ) { ?> |
<tr> |
<?php if ($statusOK) { ?> |
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td> |
/web/acc/admin/wl_filter.php |
---|
23,7 → 23,7 |
//# reconstruction des ip |
$list = explode("\n", form_filter($form_content)); |
$new_list = ""; |
foreach($list as &$value) |
foreach ($list as &$value) |
{ |
if(preg_match('/([0-9]{1,3}.){3}[0-9]{1,3}/', $value)) |
{ |
249,7 → 249,7 |
exec ("sudo /usr/local/bin/alcasar-url_filter_wl.sh -safesearch_$wl_safesearch"); |
break; |
case 'MAJ_ossi_file' : |
foreach($_POST as $fichier => $value) |
foreach ($_POST as $fichier => $value) |
{ |
if($fichier != "choix") |
{ |
320,7 → 320,7 |
{ |
$wl_files = file($wl_categories); |
$wl_files = preg_grep("/ossi-/", $wl_files, 1); // don't display ossi custom categories |
foreach($wl_files as $fichier => $value) |
foreach ($wl_files as $fichier => $value) |
{ |
if ($cols == 1) { echo "<tr>";} |
$categorie=trim(basename($value)); |
367,7 → 367,7 |
//list OSSI custom categories |
$fichierswl = array_diff(scandir($dir_blacklist), array('..','.','ossi-bl','ossi-wl')); |
$fichierswl = preg_grep("/^ossi-wl-/",$fichierswl); |
foreach($fichierswl as $fichier => $value) |
foreach ($fichierswl as $fichier => $value) |
{ |
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'"; |
if (file_exists ($dir_wl_domain_names_enabled.$value)) echo " value='$l_disable'>"; else echo " value='$l_enable'>"; |