Line 68... |
Line 68... |
68 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
68 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
69 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
69 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
70 |
$Language = strtolower(substr(chop($Langue[0]),0,2));
|
70 |
$Language = strtolower(substr(chop($Langue[0]),0,2));
|
71 |
}
|
71 |
}
|
72 |
if($Language == 'fr'){
|
72 |
if($Language == 'fr'){
|
73 |
$l_bl="Liste noire générale";
|
73 |
$l_bl="Liste noire principale";
|
74 |
$l_load="Chargement...";
|
74 |
$l_load="Chargement...";
|
75 |
$l_list_version="Version de la liste : ";
|
75 |
$l_list_version="Version de la liste : ";
|
76 |
$l_bl_categories="Sélectionnez les catégories à filtrer";
|
76 |
$l_bl_categories="Sélectionnez les catégories à filtrer";
|
77 |
$l_download_bl="Télécharger la dernière version";
|
77 |
$l_download_bl="Télécharger la dernière version";
|
78 |
$l_fingerprint="L'empreinte numérique du fichier téléchargé est : ";
|
78 |
$l_fingerprint="L'empreinte numérique du fichier téléchargé est : ";
|
Line 93... |
Line 93... |
93 |
$l_record="Enregistrer les modifications";
|
93 |
$l_record="Enregistrer les modifications";
|
94 |
$l_wait="Une fois validées, 10 secondes sont nécessaires pour traiter vos modifications";
|
94 |
$l_wait="Une fois validées, 10 secondes sont nécessaires pour traiter vos modifications";
|
95 |
$l_ip_filtering="Filtrer les URLs contenant une adresse IP au lieu d'un nom de domaine (ex: http://25.56.58.59/index.htm)";
|
95 |
$l_ip_filtering="Filtrer les URLs contenant une adresse IP au lieu d'un nom de domaine (ex: http://25.56.58.59/index.htm)";
|
96 |
$l_safe_searching="Activer le contrôle scolaire/parental pour 'YouTube' et pour les moteurs de recherche 'Google', 'Bing' et 'Qwant'.";
|
96 |
$l_safe_searching="Activer le contrôle scolaire/parental pour 'YouTube' et pour les moteurs de recherche 'Google', 'Bing' et 'Qwant'.";
|
97 |
$l_error_open_file="Erreur d'ouverture du fichier";
|
97 |
$l_error_open_file="Erreur d'ouverture du fichier";
|
98 |
$l_additional_file_title="Fichiers de 'listes noires' additionnels";
|
98 |
$l_additional_file_title="Listes noires additionnelles";
|
99 |
$l_file_list="Liste des fichiers";
|
99 |
$l_file_list="Liste des fichiers";
|
100 |
$l_add_file="Ajouter un fichier";
|
100 |
$l_add_file="Ajouter un fichier";
|
101 |
$l_add_file_explain="Chaque ligne du fichier doit être une adresse IP ou un nom de domaine";
|
101 |
$l_add_file_explain="Chaque ligne du fichier doit être une adresse IP ou un nom de domaine";
|
102 |
$l_file_name="Nom du fichier";
|
102 |
$l_file_name="Nom du fichier";
|
103 |
$l_file_action="Action";
|
103 |
$l_file_action="Action";
|
Line 107... |
Line 107... |
107 |
$l_nb_ip="Nombre d'IP";
|
107 |
$l_nb_ip="Nombre d'IP";
|
108 |
$l_nb_domain_names="Nombre de noms de domaine";
|
108 |
$l_nb_domain_names="Nombre de noms de domaine";
|
109 |
$l_nbDomainNames="Noms de domaine :";
|
109 |
$l_nbDomainNames="Noms de domaine :";
|
110 |
$l_nbUrl="Url :";
|
110 |
$l_nbUrl="Url :";
|
111 |
$l_nbIp="Ip :";
|
111 |
$l_nbIp="Ip :";
|
112 |
$l_update_cat="Mise a jour des catégories automatiquement toutes les 12h (seulement 'malware' actuellement)?";
|
112 |
$l_update_cat="Blacklist principale (catégorie 'malware' uniquement)";
|
- |
|
113 |
$l_update_cat_header="Mise à jour automatique des Blacklists";
|
- |
|
114 |
$l_update_success="Mise à jour ratée";
|
- |
|
115 |
$l_update_failed="Mise à jour réussie";
|
113 |
$l_disable="Désactiver";
|
116 |
$l_disable="Désactiver";
|
114 |
$l_enable="Activer";
|
117 |
$l_enable="Activer";
|
- |
|
118 |
$l_update="Mise a jour";
|
- |
|
119 |
$l_no_update_configured="Aucun script de mise à jour trouvée";
|
115 |
$l_file_state="Etat";
|
120 |
$l_file_state="Etat";
|
116 |
}
|
121 |
}
|
117 |
else {
|
122 |
else {
|
118 |
$l_bl="General BlackList";
|
123 |
$l_bl="Main BlackList";
|
119 |
$l_load="Loading...";
|
124 |
$l_load="Loading...";
|
120 |
$l_list_version="List version : ";
|
125 |
$l_list_version="List version : ";
|
121 |
$l_bl_categories="Select the categories to filter";
|
126 |
$l_bl_categories="Select the categories to filter";
|
122 |
$l_download_bl="Download the last version";
|
127 |
$l_download_bl="Download the last version";
|
123 |
$l_fingerprint="The digital fingerprint of the downloaded blacklist is : ";
|
128 |
$l_fingerprint="The digital fingerprint of the downloaded blacklist is : ";
|
Line 139... |
Line 144... |
139 |
$l_record="Save changes";
|
144 |
$l_record="Save changes";
|
140 |
$l_wait="Once validated, 10 seconds are necessary to compute your modifications";
|
145 |
$l_wait="Once validated, 10 seconds are necessary to compute your modifications";
|
141 |
$l_ip_filtering="Filtering URLs that contain an IP address instead of a domain name (ie: http://25.56.58.59/index.htm)";
|
146 |
$l_ip_filtering="Filtering URLs that contain an IP address instead of a domain name (ie: http://25.56.58.59/index.htm)";
|
142 |
$l_safe_searching="Enabling school/parental control for 'YouTube' and for the search engines 'Google', 'Bing' and 'Qwant'";
|
147 |
$l_safe_searching="Enabling school/parental control for 'YouTube' and for the search engines 'Google', 'Bing' and 'Qwant'";
|
143 |
$l_error_open_file="Error opening file";
|
148 |
$l_error_open_file="Error opening file";
|
144 |
$l_additional_file_title="Additional blacklist files";
|
149 |
$l_additional_file_title="Additional blacklists";
|
145 |
$l_file_list="Files list";
|
150 |
$l_file_list="Files list";
|
146 |
$l_add_file="Add a file";
|
151 |
$l_add_file="Add a file";
|
147 |
$l_add_file_explain="Each line of the file must be an IP address or a domain name";
|
152 |
$l_add_file_explain="Each line of the file must be an IP address or a domain name";
|
148 |
$l_file_name="Filename";
|
153 |
$l_file_name="Filename";
|
149 |
$l_file_action="Action";
|
154 |
$l_file_action="Action";
|
Line 153... |
Line 158... |
153 |
$l_nb_ip="Number of IP";
|
158 |
$l_nb_ip="Number of IP";
|
154 |
$l_nb_domain_names="Number of domain names";
|
159 |
$l_nb_domain_names="Number of domain names";
|
155 |
$l_nbDomainNames="Domain names :";
|
160 |
$l_nbDomainNames="Domain names :";
|
156 |
$l_nbUrl="Url :";
|
161 |
$l_nbUrl="Url :";
|
157 |
$l_nbIp="Ip :";
|
162 |
$l_nbIp="Ip :";
|
158 |
$l_update_cat="Update automaticly categories every 12 hours (only 'malware' for now)?";
|
163 |
$l_update_cat="Main Blacklist (only 'malware' category)";
|
- |
|
164 |
$l_update_cat_header="Automatic Update of Blacklists";
|
- |
|
165 |
$l_update_success="Update succeeded";
|
- |
|
166 |
$l_update_failed="Update failed";
|
159 |
$l_disable="Disable";
|
167 |
$l_disable="Disable";
|
160 |
$l_enable="Enable";
|
168 |
$l_enable="Enable";
|
- |
|
169 |
$l_update="Update";
|
- |
|
170 |
$l_no_update_configured="No update script configured";
|
161 |
$l_file_state="State";
|
171 |
$l_file_state="State";
|
162 |
}
|
172 |
}
|
163 |
$dir_etc="/usr/local/etc/";
|
173 |
$dir_etc="/usr/local/etc/";
|
164 |
$dir_dg="/etc/e2guardian/lists/";
|
174 |
$dir_dg="/etc/e2guardian/lists/";
|
165 |
$dir_blacklist=$dir_dg."blacklists/";
|
175 |
$dir_blacklist=$dir_dg."blacklists/";
|
Line 172... |
Line 182... |
172 |
$conf_file=$dir_etc."alcasar.conf";
|
182 |
$conf_file=$dir_etc."alcasar.conf";
|
173 |
$domainfilter_file="/etc/unbound/conf.d/blacklist/domainfilter.conf";
|
183 |
$domainfilter_file="/etc/unbound/conf.d/blacklist/domainfilter.conf";
|
174 |
$bannedsite_file=$dir_dg."bannedsitelist";
|
184 |
$bannedsite_file=$dir_dg."bannedsitelist";
|
175 |
$dir_tmp="/tmp/blacklists";
|
185 |
$dir_tmp="/tmp/blacklists";
|
176 |
$update_file_cat="/usr/local/etc/update_cat.conf";
|
186 |
$update_file_cat="/usr/local/etc/update_cat.conf";
|
177 |
|
- |
|
- |
|
187 |
$update_file_ossi_cat="/usr/local/etc/update_ossi_cat.conf";
|
178 |
$bl_safesearch="off";
|
188 |
$bl_safesearch="off";
|
179 |
$bl_pureip="off";
|
189 |
$bl_pureip="off";
|
- |
|
190 |
$updateable_ossi_bls=["ossi-bl-candc"];
|
180 |
|
191 |
|
181 |
# default values
|
192 |
# default values
|
182 |
if (is_file ($conf_file))
|
193 |
if (is_file ($conf_file))
|
183 |
{
|
194 |
{
|
184 |
$tab=file($conf_file);
|
195 |
$tab=file($conf_file);
|
Line 226... |
Line 237... |
226 |
case 'MAJ_cat_bl' :
|
237 |
case 'MAJ_cat_bl' :
|
227 |
if (file_exists($bl_categories_enabled))
|
238 |
if (file_exists($bl_categories_enabled))
|
228 |
{
|
239 |
{
|
229 |
exec("/bin/sed -i \"/^ossi-/!d\" $bl_categories_enabled"); // keep ossi custom categories
|
240 |
exec("/bin/sed -i \"/^ossi-/!d\" $bl_categories_enabled"); // keep ossi custom categories
|
230 |
$pointeur=fopen($bl_categories_enabled, "a+");
|
241 |
$pointeur=fopen($bl_categories_enabled, "a+");
|
231 |
$fichier=fopen($update_file_cat,"w+");
|
- |
|
232 |
foreach ($_POST as $key => $value)
|
242 |
foreach ($_POST as $key => $value)
|
233 |
{
|
243 |
{
|
234 |
if (strstr($key,'chk-'))
|
244 |
if (strstr($key,'chk-'))
|
235 |
{
|
245 |
{
|
236 |
$line=str_replace('chk-','',$key)."\n";
|
246 |
$line=str_replace('chk-','',$key)."\n";
|
237 |
fwrite($pointeur,$line);
|
247 |
fwrite($pointeur,$line);
|
238 |
if(trim($line) == 'malware' && $_POST['update_cat'] == 1) //auto-update of malware
|
- |
|
239 |
{
|
- |
|
240 |
fputs($fichier, "malware rsync://ftp.ut-capitole.fr/blacklist/dest/malware\n");
|
- |
|
241 |
}
|
- |
|
242 |
}
|
248 |
}
|
243 |
}
|
249 |
}
|
244 |
fclose($pointeur);
|
250 |
fclose($pointeur);
|
245 |
fclose($fichier);
|
- |
|
246 |
}
|
251 |
}
|
247 |
else {echo "$l_error_open_file $bl_categories_enabled";}
|
252 |
else {echo "$l_error_open_file $bl_categories_enabled";}
|
248 |
$fichier=fopen($dir_blacklist."ossi-bl/domains","w+");
|
253 |
$fichier=fopen($dir_blacklist."ossi-bl/domains","w+");
|
249 |
fputs($fichier, form_filter($_POST['OSSI_bl']));
|
254 |
fputs($fichier, form_filter($_POST['OSSI_bl']));
|
250 |
fclose($fichier);
|
255 |
fclose($fichier);
|
Line 270... |
Line 275... |
270 |
exec ("sudo /usr/local/bin/alcasar-url_filter_bl.sh -safesearch_$bl_safesearch -pureip_$bl_pureip");
|
275 |
exec ("sudo /usr/local/bin/alcasar-url_filter_bl.sh -safesearch_$bl_safesearch -pureip_$bl_pureip");
|
271 |
break;
|
276 |
break;
|
272 |
case 'MAJ_ossi_file' :
|
277 |
case 'MAJ_ossi_file' :
|
273 |
foreach($_POST as $fichier => $value)
|
278 |
foreach($_POST as $fichier => $value)
|
274 |
{
|
279 |
{
|
275 |
if($fichier != "choix")
|
280 |
if($fichier != "choix" && $fichier != "update_cat")
|
276 |
{
|
281 |
{
|
277 |
$action=$_POST[$fichier];
|
282 |
$action=$_POST[$fichier];
|
278 |
if($action == $l_remove) //delete
|
283 |
if($action == $l_remove) //delete
|
279 |
{
|
284 |
{
|
280 |
exec("/bin/sed -i ".escapeshellarg("/^$fichier\$/d")." $bl_categories_enabled");
|
285 |
exec("/bin/sed -i ".escapeshellarg("/^$fichier\$/d")." $bl_categories_enabled");
|
Line 282... |
Line 287... |
282 |
exec("rm -rf $dir_blacklist".escapeshellarg($fichier));
|
287 |
exec("rm -rf $dir_blacklist".escapeshellarg($fichier));
|
283 |
exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
|
288 |
exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
|
284 |
}
|
289 |
}
|
285 |
if($action == $l_disable) //disable
|
290 |
if($action == $l_disable) //disable
|
286 |
{
|
291 |
{
|
- |
|
292 |
|
287 |
exec("/bin/sed -i ".escapeshellarg("/^$fichier\$/d")." $bl_categories_enabled");
|
293 |
exec("/bin/sed -i ".escapeshellarg("/^$fichier\$/d")." $bl_categories_enabled");
|
288 |
exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
|
294 |
exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
|
289 |
}
|
295 |
}
|
290 |
if($action == $l_enable) //enable
|
296 |
if($action == $l_enable) //enable
|
291 |
{
|
297 |
{
|
292 |
file_put_contents ($bl_categories_enabled, $fichier."\n", FILE_APPEND);
|
298 |
file_put_contents($bl_categories_enabled, $fichier."\n", FILE_APPEND);
|
293 |
exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
|
299 |
exec("sudo /usr/local/bin/alcasar-bl.sh --reload 2>&1", $out, $ret);
|
- |
|
300 |
}
|
- |
|
301 |
if($action == $l_update) //update
|
- |
|
302 |
{
|
- |
|
303 |
if ($fichier == ossi-bl-candc)
|
- |
|
304 |
{
|
- |
|
305 |
exec("sudo /usr/local/bin/alcasar-bl-autoupdate.sh --update_ossi-bl-candc 2>&1", $out, $ret);
|
- |
|
306 |
if ($ret == 0)
|
- |
|
307 |
{
|
- |
|
308 |
echo "<p>".$l_update_success."</p>";
|
- |
|
309 |
}
|
- |
|
310 |
else
|
- |
|
311 |
{
|
- |
|
312 |
echo "<p>".$l_update_failed.":</p>";
|
- |
|
313 |
foreach($out as $line)
|
- |
|
314 |
{
|
- |
|
315 |
echo "<p>".$line."</p>";
|
- |
|
316 |
}
|
- |
|
317 |
}
|
- |
|
318 |
}
|
- |
|
319 |
}
|
- |
|
320 |
}
|
- |
|
321 |
}
|
- |
|
322 |
break;
|
- |
|
323 |
case 'Autoupdate' :
|
- |
|
324 |
// Reset updatelists, truncate files
|
- |
|
325 |
$f = fopen($update_file_ossi_cat, 'w');
|
- |
|
326 |
fclose($f);
|
- |
|
327 |
$f = fopen($update_file_ossi_cat, 'w');
|
- |
|
328 |
fclose($f);
|
- |
|
329 |
|
- |
|
330 |
foreach($_POST as $fichier => $value)
|
- |
|
331 |
{
|
- |
|
332 |
// General BL
|
- |
|
333 |
if ($fichier == 'update_cat' && $value == 1)
|
- |
|
334 |
{
|
- |
|
335 |
if (file_exists($bl_categories_enabled))
|
- |
|
336 |
{
|
- |
|
337 |
file_put_contents($update_file_cat, "malware rsync://ftp.ut-capitole.fr/blacklist/dest/malware\n", FILE_APPEND);
|
294 |
}
|
338 |
}
|
295 |
}
|
339 |
}
|
- |
|
340 |
// C&C Server List
|
- |
|
341 |
if ($fichier == 'ossi-bl-candc' && $value == 1)
|
- |
|
342 |
{
|
- |
|
343 |
file_put_contents($update_file_ossi_cat, "alcasar-bl-autoupdate.sh --update_ossi-bl-candc\n", FILE_APPEND);
|
- |
|
344 |
}
|
296 |
}
|
345 |
}
|
297 |
break;
|
346 |
break;
|
298 |
case 'MAJ_ossi_file_upload' :
|
347 |
case 'MAJ_ossi_file_upload' :
|
299 |
$file_name = str_replace (".", "_",basename($_FILES['fichier_ip']['name']));
|
348 |
$file_name = str_replace (".", "_",basename($_FILES['fichier_ip']['name']));
|
300 |
$dest_dir = $dir_blacklist."ossi-bl-".$file_name; # /etc/e2guardian/list/blacklist/ossi-bl-XXXXXXXX
|
349 |
$dest_dir = $dir_blacklist."ossi-bl-".$file_name; # /etc/e2guardian/list/blacklist/ossi-bl-XXXXXXXX
|
Line 304... |
Line 353... |
304 |
$file=$_FILES['fichier_ip']['tmp_name'];
|
353 |
$file=$_FILES['fichier_ip']['tmp_name'];
|
305 |
exec('/usr/bin/dos2unix '.escapeshellarg($file));
|
354 |
exec('/usr/bin/dos2unix '.escapeshellarg($file));
|
306 |
if(move_uploaded_file($_FILES['fichier_ip']['tmp_name'], $dest_dir."/domains")) // copy in the file "domains" (containing @ip & domain names (like over Toulouse categories))
|
355 |
if(move_uploaded_file($_FILES['fichier_ip']['tmp_name'], $dest_dir."/domains")) // copy in the file "domains" (containing @ip & domain names (like over Toulouse categories))
|
307 |
{
|
356 |
{
|
308 |
touch ($dest_dir."/urls"); // create the URL file even if it isn't used
|
357 |
touch ($dest_dir."/urls"); // create the URL file even if it isn't used
|
309 |
file_put_contents ($bl_categories, $dest_dir."\n", FILE_APPEND); # add to the categories list
|
358 |
file_put_contents ($bl_categories, $dest_dir."\n", FILE_APPEND); // add to the categories list
|
310 |
file_put_contents ($bl_categories_enabled, "ossi-bl-".$file_name."\n", FILE_APPEND); //Enabled by default
|
359 |
file_put_contents ($bl_categories_enabled, "ossi-bl-".$file_name."\n", FILE_APPEND); //Enabled by default
|
311 |
exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
|
360 |
exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
|
312 |
}
|
361 |
}
|
313 |
else
|
362 |
else
|
314 |
{
|
363 |
{
|
Line 388... |
Line 437... |
388 |
}
|
437 |
}
|
389 |
else {
|
438 |
else {
|
390 |
echo "$l_error_open_file $bl_categories";
|
439 |
echo "$l_error_open_file $bl_categories";
|
391 |
}
|
440 |
}
|
392 |
|
441 |
|
393 |
//update categories with rsync
|
- |
|
394 |
$update_select = array();
|
- |
|
395 |
$update_select[0] = "";
|
- |
|
396 |
$update_select[1] = "";
|
- |
|
397 |
|
- |
|
398 |
if ( 0 == filesize( $update_file_cat ) ) $update_select[0] = "checked";
|
- |
|
399 |
else $update_select[1] = "checked";
|
- |
|
400 |
|
- |
|
401 |
echo "</tr>\n";
|
442 |
echo "</tr>\n";
|
402 |
echo "<tr><td valign='middle' align='left' colspan=10>";
|
443 |
echo "<tr><td valign='middle' align='left' colspan=10>";
|
403 |
echo "<center>$l_update_cat
|
444 |
echo "<center>
|
404 |
<input type='radio' name='update_cat' value=0 $update_select[0]> $l_disable
|
- |
|
405 |
<input type='radio' name='update_cat' value=1 $update_select[1]> $l_enable
|
- |
|
406 |
<input type='submit' value='$l_record'></center>";
|
445 |
<input type='submit' value='$l_record'></center>";
|
407 |
echo "</td></tr>";
|
446 |
echo "</td></tr>";
|
408 |
echo "<tr><td valign='middle' align='left' colspan=10>";
|
447 |
echo "<tr><td valign='middle' align='left' colspan=10>";
|
409 |
echo "<center><b>$l_maj_rehabilitated</b></center></td></tr>";
|
448 |
echo "<center><b>$l_maj_rehabilitated</b></center></td></tr>";
|
410 |
echo "<tr><td width=50% colspan=5 align=center>";
|
449 |
echo "<tr><td width=50% colspan=5 align=center>";
|
Line 437... |
Line 476... |
437 |
<?php
|
476 |
<?php
|
438 |
echo "<tr><td width=50% colspan=5 align=center>";
|
477 |
echo "<tr><td width=50% colspan=5 align=center>";
|
439 |
echo "<H3>$l_file_list</H3>";
|
478 |
echo "<H3>$l_file_list</H3>";
|
440 |
echo "<form action='bl_filter.php' method='POST'>";
|
479 |
echo "<form action='bl_filter.php' method='POST'>";
|
441 |
echo "<input type='hidden' name='choix' value='MAJ_ossi_file'>";
|
480 |
echo "<input type='hidden' name='choix' value='MAJ_ossi_file'>";
|
442 |
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>";
|
481 |
echo "<table cellspacing=2 cellpadding=3 border=1><tr><th>$l_file_name<th>$l_nb_ip<th>$l_nb_domain_names<th colspan=3>$l_file_action</tr>";
|
443 |
//list OSSI custom categories
|
482 |
//list OSSI custom categories
|
444 |
$fichiersbl = array_diff(scandir($dir_blacklist), array('..','.','ossi-bl','ossi-wl'));
|
483 |
$fichiersbl = array_diff(scandir($dir_blacklist), array('..','.','ossi-bl','ossi-wl'));
|
445 |
$fichiersbl = preg_grep("/^ossi-bl-/",$fichiersbl);
|
484 |
$fichiersbl = preg_grep("/^ossi-bl-/",$fichiersbl);
|
446 |
foreach($fichiersbl as $fichier => $value)
|
485 |
foreach($fichiersbl as $fichier => $value)
|
447 |
{
|
486 |
{
|
448 |
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'";
|
487 |
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'";
|
449 |
if (file_exists ($dir_bl_domain_names_enabled.$value)) echo " value='$l_disable'>"; else echo " value='$l_enable'>";
|
488 |
if (file_exists ($dir_bl_domain_names_enabled.$value)) echo " value='$l_disable'>"; else echo " value='$l_enable'>";
|
450 |
echo "</center></td><td><center><input type='submit' name='$value' value='$l_remove'></center></td></tr>";
|
489 |
echo "</center></td><td><center><input type='submit' name='$value' value='$l_remove'></center></td>";
|
- |
|
490 |
if (in_array($value,$updateable_ossi_bls)) echo "<td><center><input type='submit' name='$value' value='$l_update'></center></td>"; else echo "<td><center>$l_no_update_configured</center></td>";
|
- |
|
491 |
echo "</tr>";
|
451 |
}
|
492 |
}
|
- |
|
493 |
|
- |
|
494 |
echo "</table>";
|
452 |
echo "</table></form><br></td>";
|
495 |
echo "</form><br></td>";
|
453 |
echo "<td width=50% colspan=5 align=center><H3>$l_add_file</H3>";
|
496 |
echo "<td width=50% colspan=5 align=center><H3>$l_add_file</H3>";
|
454 |
echo "$l_add_file_explain";
|
497 |
echo "$l_add_file_explain";
|
455 |
echo "<form action='bl_filter.php' method='POST' enctype='multipart/form-data'>";
|
498 |
echo "<form action='bl_filter.php' method='POST' enctype='multipart/form-data'>";
|
456 |
echo "<input type='hidden' name='choix' value='MAJ_ossi_file_upload'>";
|
499 |
echo "<input type='hidden' name='choix' value='MAJ_ossi_file_upload'>";
|
457 |
echo "<input type='file' name='fichier_ip'>";
|
500 |
echo "<input type='file' name='fichier_ip'>";
|
458 |
echo "<input type='submit' onClick=\"this.disabled=true; this.value='$l_load';submit();\" value='$l_submit'>";
|
501 |
echo "<input type='submit' onClick=\"this.disabled=true; this.value='$l_load';submit();\" value='$l_submit'>";
|
459 |
echo "</form>";
|
502 |
echo "</form>";
|
460 |
echo "</td></tr>";
|
503 |
echo "</td></tr>";
|
461 |
echo "</table><br>";
|
504 |
echo "</table><br>";
|
- |
|
505 |
|
- |
|
506 |
// Autoupdate Section
|
- |
|
507 |
// ----------------------
|
- |
|
508 |
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
|
- |
|
509 |
echo ' <tr><th>'.$l_update_cat_header.'</th></tr>';
|
- |
|
510 |
echo ' <tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>';
|
- |
|
511 |
echo '</table>';
|
- |
|
512 |
|
- |
|
513 |
echo "<form action='bl_filter.php' method='POST'>";
|
- |
|
514 |
echo "<input type='hidden' name='choix' value='Autoupdate'>";
|
- |
|
515 |
?>
|
- |
|
516 |
<table width="100%" border=1 cellspacing=0 cellpadding=1>
|
- |
|
517 |
<tr><td>
|
- |
|
518 |
<?php
|
- |
|
519 |
echo "<table cellspacing=2 cellpadding=3 border=1>";
|
- |
|
520 |
echo "<tr>";
|
- |
|
521 |
|
- |
|
522 |
// general BL
|
- |
|
523 |
$update_select = ["", ""];
|
- |
|
524 |
if ( 0 == filesize( $update_file_cat ) ) $update_select[0] = "checked";
|
- |
|
525 |
else $update_select[1] = "checked";
|
- |
|
526 |
echo "<td>".$l_update_cat."</td>";
|
- |
|
527 |
echo "<td><input type='radio' name='update_cat' value=0 ".$update_select[0]." >".$l_disable;
|
- |
|
528 |
echo "<input type='radio' name='update_cat' value=1 ".$update_select[1]." >".$l_enable;
|
- |
|
529 |
echo "</td>";
|
- |
|
530 |
// Display update checkbox for each updateable ossi-bl
|
- |
|
531 |
foreach($updateable_ossi_bls as $value)
|
- |
|
532 |
{
|
- |
|
533 |
//check if autoupdate is enabled
|
- |
|
534 |
$update_ossi_select = ["", ""];
|
- |
|
535 |
if ( strpos(file_get_contents($update_file_ossi_cat),$value) !== false ) $update_ossi_select[1] = "checked";
|
- |
|
536 |
else $update_ossi_select[0] = "checked";
|
- |
|
537 |
echo "<tr><td>".$value."</td>";
|
- |
|
538 |
echo "<td><input type='radio' name='".$value."' value=0 ".$update_ossi_select[0]." >".$l_disable;
|
- |
|
539 |
echo "<input type='radio' name='".$value."' value=1 ".$update_ossi_select[1]." >".$l_enable."</td>";
|
- |
|
540 |
echo "</tr>";
|
- |
|
541 |
}
|
- |
|
542 |
echo "</tr></td><br />";
|
- |
|
543 |
echo "</table>";
|
- |
|
544 |
echo "<input type='submit' value='$l_record'></center>";
|
- |
|
545 |
echo "</table>";
|
- |
|
546 |
echo "</form>";
|
462 |
?>
|
547 |
?>
|
463 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
548 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
464 |
<tr><th><?php echo $l_specific_filtering; ?></th></tr>
|
549 |
<tr><th><?php echo $l_specific_filtering; ?></th></tr>
|
465 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
|
550 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
|
466 |
</table>
|
551 |
</table>
|