Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1902 → Rev 1903

/web/acc/admin/bl_categories_help.php
29,6 → 29,7
$l_example="Exemple(s) : ";
$l_error_cat = "Erreur de categorie";
$l_error_list = "Erreur de listing";
$l_tor_node = "Cette liste correspond au noeud du réseau Tor. Si cette liste est activée, les utilisateurs blacklistés ne pourront pas accéder au réseau Tor</br>";
}
else
{
43,6 → 44,7
$l_example="Example(s) : ";
$l_error_cat = "Error category";
$l_error_list = "Error listing";
$l_tor_node = "This list is Tor's nodes. If you enable this list, users won't reach Tor network.</br> ";
 
}
if(isset($_GET['cat']))
83,9 → 85,21
else
{
if (file_exists($bl_categorie_domain_file))
{
$nb_domains = exec("wc -l $bl_categorie_domain_file | cut -d ' ' -f1");
}
else
$nb_domains = $l_error_open_file." ".$bl_categorie_domain_file;
{
if($categorie!='ossi-tor_node.txt')
{
$nb_domains = $l_error_open_file." ".$bl_categorie_domain_file;
}
else
{
$nb_domains = "";
$_GET["titre"] = 'ip';
}
}
if(file_exists($bl_categorie_ip_file))
$nb_ip = exec("wc -l $bl_categorie_ip_file | cut -d ' ' -f1");
else
215,7 → 229,8
{
$filtre = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file;
}
$filtre_domain = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file;
if($categorie!='ossi-tor_node.txt')
$filtre_domain = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file;
if(!isset($ossi))
$filtre_url = $liste == "bl" ? $bl_categorie_url_file : "";
$filtre_ip = $liste == "bl" ? $bl_categorie_ip_file : $wl_categorie_ip_file;
230,9 → 245,24
}
else
{
echo "$l_nb_domains <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_domain&titre=domain&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes'>$nb_domains</a></b><br>";
echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes'>$nb_ip</a></b><br>";
if($categorie=='ossi-tor_node.txt')
{
echo $l_tor_node;
echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes'>$nb_ip</a></b><br>";
}
else
{
if(isset($_GET['state']))
{
echo "$l_nb_domains <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_domain&titre=domain&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes&state=disable'>$nb_domains</a></b><br>";
echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes&state=disable'>$nb_ip</a></b><br>";
}
else
{
echo "$l_nb_domains <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_domain&titre=domain&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes'>$nb_domains</a></b><br>";
echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_ip=$nb_ip&ossi=yes'>$nb_ip</a></b><br>";
}
}
}
?>
</td></tr>
/web/acc/admin/bl_filter.php
299,18 → 299,22
{
exec("rm -rf $upload_dir_ip$fichier");
exec("rm -rf $upload_dir_domain_names$fichier");
exec("rm -rf $dir_ip$fichier");
exec("rm -rf $dir_domain_names$fichier");
exec ("sudo /usr/local/bin/alcasar-bl.sh --reload");
}
if($action == $l_disable) //disable
{
exec("mv -f $upload_dir_ip$fichier $dir_ip$fichier");
exec("mv -f $upload_dir_domain_names$fichier $dir_domain_names$fichier");
if($fichier!='ossi-tor_node.txt')
exec("mv -f $upload_dir_domain_names$fichier $dir_domain_names$fichier");
exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
}
if($action == $l_enable) //enable
{
exec("mv -f $dir_ip$fichier $upload_dir_ip$fichier");
exec("mv -f $dir_domain_names$fichier $upload_dir_domain_names$fichier");
if($fichier!='ossi-tor_node.txt')
exec("mv -f $dir_domain_names$fichier $upload_dir_domain_names$fichier");
exec ("sudo /usr/local/bin/alcasar-bl.sh --reload");
}
}
498,7 → 502,11
$fichiersIp = preg_grep("/^ossi-/",$fichiersIp);
foreach($fichiersIp as $fichier => $value)
{
echo "<tr><td><center><a href='bl_categories_help.php?liste=bl&cat=$value&ossi=yes&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 $upload_dir_ip$value | awk '{print $1}'")."</center></td><td><center>".exec("wc -l $upload_dir_domain_names$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>";
if($value=='ossi-tor_node.txt')
echo "<tr><td><center><a href='bl_categories_help.php?liste=bl&cat=$value&ossi=yes&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 $upload_dir_ip$value | awk '{print $1}'")."</center></td><td><center>".exec("wc -l $upload_dir_domain_names$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' disabled></center></td></tr>";
else
echo "<tr><td><center><a href='bl_categories_help.php?liste=bl&cat=$value&ossi=yes&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 $upload_dir_ip$value | awk '{print $1}'")."</center></td><td><center>".exec("wc -l $upload_dir_domain_names$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>";
}
//liste des fichiers desactivés
$fichiersIp = array_diff(scandir($dir_ip), array('ossi','ossi-ip-safesearch','..','.'));
505,7 → 513,10
$fichiersIp = preg_grep("/^ossi-/",$fichiersIp);
foreach($fichiersIp as $fichier => $value)
{
echo "<tr><td bgcolor='BEBEBE'><center><a href='bl_categories_help.php?liste=bl&cat=$value&ossi=yes&filtre=domain&state=disable' 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 bgcolor='BEBEBE'><center>".exec("wc -l $upload_dir_ip$value | awk '{print $1}'")."</center></td><td bgcolor='BEBEBE'><center>".exec("wc -l $upload_dir_domain_names$value | awk '{print $1}'")."</center></td><td bgcolor='BEBEBE'><center><input type='submit' name='$value' value='$l_enable'></center></td><td bgcolor='BEBEBE'><center><input type='submit' name='$value' value='$l_remove'></center></td></tr>";
if($value=='ossi-tor_node.txt')
echo "<tr><td bgcolor='BEBEBE'><center><a href='bl_categories_help.php?liste=bl&cat=$value&ossi=yes&filtre=domain&state=disable' 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 bgcolor='BEBEBE'><center>".exec("wc -l $dir_ip$value | awk '{print $1}'")."</center></td><td bgcolor='BEBEBE'><center>".exec("wc -l $dir_domain_names$value | awk '{print $1}'")."</center></td><td bgcolor='BEBEBE'><center><input type='submit' name='$value' value='$l_enable'></center></td><td bgcolor='BEBEBE'><center><input type='submit' name='$value' value='$l_remove' disabled></center></td></tr>";
else
echo "<tr><td bgcolor='BEBEBE'><center><a href='bl_categories_help.php?liste=bl&cat=$value&ossi=yes&filtre=domain&state=disable' 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 bgcolor='BEBEBE'><center>".exec("wc -l $dir_ip$value | awk '{print $1}'")."</center></td><td bgcolor='BEBEBE'><center>".exec("wc -l $dir_domain_names$value | awk '{print $1}'")."</center></td><td bgcolor='BEBEBE'><center><input type='submit' name='$value' value='$l_enable'></center></td><td bgcolor='BEBEBE'><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'>";
/web/acc/admin/wl_filter.php
243,6 → 243,8
{
exec("rm -rf $upload_dir_ip$fichier");
exec("rm -rf $upload_dir_domain_names$fichier");
exec("rm -rf $dir_ip$fichier");
exec("rm -rf $dir_domain_names$fichier");
exec ("sudo /usr/local/bin/alcasar-bl.sh --reload");
}
if($action == $l_disable) //disable
389,7 → 391,7
$fichiersIp = preg_grep("/^ossi-/",$fichiersIp);
foreach($fichiersIp as $fichier => $value)
{
echo "<tr><td bgcolor='BEBEBE'><center><a href='bl_categories_help.php?liste=wl&cat=$value&ossi=yes&filtre=domain&state=disable' 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 bgcolor='BEBEBE'><center>".exec("wc -l $upload_dir_ip$value | awk '{print $1}'")."</center></td><td bgcolor='BEBEBE'><center>".exec("wc -l $upload_dir_domain_names$value | awk '{print $1}'")."</center></td><td bgcolor='BEBEBE'><center><input type='submit' name='$value' value='$l_enable'></center></td><td bgcolor='BEBEBE'><center><input type='submit' name='$value' value='$l_remove'></center></td></tr>";
echo "<tr><td bgcolor='BEBEBE'><center><a href='bl_categories_help.php?liste=wl&cat=$value&ossi=yes&filtre=domain&state=disable' 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 bgcolor='BEBEBE'><center>".exec("wc -l $dir_ip$value | awk '{print $1}'")."</center></td><td bgcolor='BEBEBE'><center>".exec("wc -l $dir_domain_names$value | awk '{print $1}'")."</center></td><td bgcolor='BEBEBE'><center><input type='submit' name='$value' value='$l_enable'></center></td><td bgcolor='BEBEBE'><center><input type='submit' name='$value' value='$l_remove'></center></td></tr>";
}