Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1851 → Rev 1852

/web/acc/admin/bl_categories_help.php
17,15 → 17,17
}
if($Language == 'fr')
{
$l_title = "Catégories de la liste noire";
$l_error_open_file="Erreur d'ouverture du fichier";
$l_close="Fermer";
$l_description_cat="Cette catégorie n'est pas décrite";
$l_description_ossi="Catégorie personnelle";
$l_nb_domains="Nombre de noms de domaine filtrés :";
$l_nb_urls="Nombre d'URL filtrés :";
$l_nb_ip="Nombre d'IP filtrées :";
$l_example="Exemple(s) : ";
$l_title = "Catégories de la liste noire";
$l_error_open_file="Erreur d'ouverture du fichier";
$l_close="Fermer";
$l_description_cat="Cette catégorie n'est pas décrite";
$l_name_cat ="Cette catégorie n'a pas de nom";
$l_nb_domains="Nombre de noms de domaine filtrés :";
$l_nb_urls="Nombre d'URL filtrés :";
$l_nb_ip="Nombre d'IP filtrées :";
$l_example="Exemple(s) : ";
$l_error_cat = "Erreur de categorie";
$l_error_list = "Erreur de listing";
}
else
{
33,20 → 35,31
$l_error_open_file="Error opening the file";
$l_close="Close";
$l_description_cat="This category isn't describe";
$l_description_ossi="Personal category";
$l_name_cat ="This category has not name";
$l_nb_domains="Number of filtered domain names :";
$l_nb_urls="Number of filtered URL :";
$l_nb_ip="Number of filtered IP :";
$l_example="Example(s) : ";
$l_error_cat = "Error category";
$l_error_list = "Error listing";
 
}
if(isset($_GET['cat']))
{
$categorie = $_GET['cat'];
}
else
{
$categorie = $l_error_cat;
}
if(isset($_GET['liste']))
{
$liste = $_GET['liste'];
}
else
{
$liste = $l_error_list;
}
if($liste == "bl")
{
$bl_categorie_domain_file = $bl_dnsmasq_dir.$categorie.".conf";
96,22 → 109,22
}
$global_usage = file($bl_dir."global_usage");
$langue = strtoupper($Language);
if($categorie == "ossi")
if(isset($categorie))
{
$l_description_cat = $l_description_ossi;
}
else
{
for($i=0; $i<count($global_usage); $i++)
$fin1 = 0; $fin2 = 0;
foreach($global_usage as $line)
{
if(preg_match("#^NAME:.$categorie$#", $global_usage[$i]) == 1)
if(preg_match("#^NAME:.$categorie$#", $line) == 1)
$fin1 = 1;
if($fin1 && preg_match("#^DESC.$langue:.#", $line) == 1)
$l_description_cat = preg_replace("#^DESC.$langue:.#", "", $line);
if($fin1 && preg_match("#^NAME.$langue:.#", $line) == 1)
{
$i++;
while(preg_match("#^DESC.$langue:#", $global_usage[$i]) == 0)
$i++;
$l_description_cat = preg_replace("#^DESC.$langue:.#", "", $global_usage[$i]);
break;
$l_name_cat = preg_replace("#^NAME.$langue:.#", "", $line);
$fin2 = 1;
}
if($fin2) break;
}
}
echo "<TITLE>$l_title</TITLE>";
120,7 → 133,7
</HEAD>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?php echo $categorie ;?></th></tr>
<tr><th><?php if(isset($categorie)){echo $categorie ;}else{echo $l_error_cat;}?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
135,10 → 148,11
$filtre = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file;
}
$filtre_domain = $liste == "bl" ? $bl_categorie_domain_file : $wl_categorie_domain_file;
$filtre_url = $liste == "bl" ? $bl_categorie_url_file : $wl_categorie_url_file;
$filtre_url = $liste == "bl" ? $bl_categorie_url_file : "";
$filtre_ip = $liste == "bl" ? $bl_categorie_ip_file : $wl_categorie_ip_file;
$compat_categorie=strtr($categorie,"-","_");
echo "<br><center><b>$l_description_cat</b></center><br>";
echo "<br><center><b>$l_name_cat</b></center>";
echo "<center><b>$l_description_cat</b></center><br>";
echo "$l_nb_domains <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_domain&titre=domain&nb_domains=$nb_domains&nb_urls=$nb_urls&nb_ip=$nb_ip'>$nb_domains</a></b><br>";
echo "$l_nb_urls <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_url&titre=url&nb_domains=$nb_domains&nb_urls=$nb_urls&nb_ip=$nb_ip'>$nb_urls</a></b><br>";
echo "$l_nb_ip <b><a href='?liste=$liste&cat=$categorie&filtre=$filtre_ip&titre=ip&nb_domains=$nb_domains&nb_urls=$nb_urls&nb_ip=$nb_ip'>$nb_ip</a></b><br>";