21,15 → 21,16 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']); |
$Language = strtolower(substr(chop($Langue[0]),0,2)); } |
if($Language == 'fr'){ |
$l_title1 = "Filtrage de noms de domaine et d'URL"; |
$l_error_open_file="Erreur d'ouverture du fichier"; |
$l_title1="Filtrage de noms de domaine et d'URL"; |
$l_dnsfilter_on="Le filtrage de noms de domaine et d'URL est actuellement activé"; |
$l_dnsfilter_off="Le filtrage de noms de domaine et d'URL est actuellement désactivé"; |
$l_switch_filtering_on="Activer le filtrage"; |
$l_switch_filtering_off="Désactiver le filtrage"; |
$l_main_bl="Liste noire"; |
$l_bl_version="Version actuelle :"; |
$l_bl_categories="Choix des catégories à filtrer"; |
$l_bl="Liste noire"; |
$l_wl="Liste blanche"; |
$l_list_version="Version de la liste : "; |
$l_bl_categories="Sélectionnez les catégories à filtrer"; |
$l_wl_categories="Sélectionnez les catégories à autoriser"; |
$l_download_bl="Télécharger la dernière version"; |
$l_fingerprint="L'empreinte numérique du fichier téléchargé est : "; |
$l_fingerprint2="Vérifiez-là en suivant ce lien (ligne 'blacklists.tar.gz') : "; |
39,13 → 40,16 |
$l_specific_filtering="Filtrage special"; |
$l_forbidden_dns="Noms de domaine filtrés"; |
$l_forbidden_dns_explain="Entrez un nom de domaine par ligne (exemple : .domaine.org)"; |
$l_allowed_dns="Noms de domaine autorisés"; |
$l_one_dns="Entrez un nom de domaine par ligne (exemple : .domaine.org)"; |
$l_maj_rehabilitated="Noms de domaine ou URLs réhabilités"; |
$l_rehabilitated_dns="Noms de domaine réhabilités"; |
$l_rehabilitated_dns_explain="Entrez ici des noms de domaine bloqués par la liste noire <BR> que vous souhaitez réhabiliter."; |
$l_add_to_bl="Noms de domaine ou URLs ajoutés à la liste noire"; |
$l_add_to_wl="Noms de domaine ou URLs ajoutés à la liste blanche"; |
$l_forbidden_url="URL filtrés"; |
$l_forbidden_url_explain="Entrez une URL par ligne (exemple : www.domaine.org/perso/index.htm)"; |
$l_allowed_url="URL authorisés"; |
$l_rehabilitated_url="URL réhabilités"; |
$l_rehabilitated_url_explain="Entrez ici des URL bloquées par la liste noire <BR> que vous souhaitez réhabiliter."; |
$l_one_url="Entrez une URL par ligne (exemple : www.domaine.org/perso/index.htm)"; |
57,15 → 61,16 |
$l_youtube_id="(<a href='http://www.youtube.com/education_signup' target='cat_help' onclick=window.open('http://www.youtube.com/education_signup','cat_help','width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes') title='Youtube for school'>lien pour créer un identifiant Youtube (Id)</a>)"; |
} |
else { |
$l_title1 = "Domain names and URL filtering"; |
$l_error_open_file="Error opening the file"; |
$l_title1="Domain names and URL filtering"; |
$l_dnsfilter_on="Actually, the Domain name and URL filter is on"; |
$l_dnsfilter_off="Actually, the Domain name and URL filter is off"; |
$l_switch_filtering_on="Switch the Filter on"; |
$l_switch_filtering_off="Switch the Filter off"; |
$l_main_bl="Blacklist"; |
$l_bl_version="Current version : "; |
$l_bl_categories="Choice of filtered categories"; |
$l_bl="BlackList"; |
$l_wl="WhiteList"; |
$l_list_version="List version : "; |
$l_bl_categories="Select the categories to filter"; |
$l_wl_categories="Select the categories to allow"; |
$l_download_bl="Download the last version"; |
$l_fingerprint="The digital fingerprint of the downloaded blacklist is : "; |
$l_fingerprint2="Verify it with this link (line 'blacklists.tar.gz') : "; |
75,13 → 80,16 |
$l_specific_filtering="Specific filtering"; |
$l_forbidden_dns="Filtered domain names"; |
$l_forbidden_dns_explain="Enter one domain name per row (exemple : .domain.org)"; |
$l_allowed_dns="Allowed domain names"; |
$l_one_dns="Enter one domain name per row (example : .domain.org)"; |
$l_maj_rehabilitated="Domain names or URLs rehabilitated"; |
$l_rehabilitated_dns="Rehabilitated domain names"; |
$l_rehabilitated_dns_explain="Enter here domain names that are blocked by the blacklist <BR> and you want to rehabilitate."; |
$l_add_to_bl="Domain names or URLs to add to blacklist"; |
$l_add_to_wl="Domain names or URLs to add to whitelist"; |
$l_forbidden_url="Filtered URL"; |
$l_forbidden_url_explain="Enter one URL per row (example : www.domaine.org/perso/index.htm)"; |
$l_allowed_url="Allowed URL"; |
$l_rehabilitated_url="Rehabilitated URL"; |
$l_rehabilitated_url_explain="Enter here URL that are blocked by the blacklist <BR> and you want to rehabilitate."; |
$l_one_url="Enter one URL per row (example : www.domaine.org/perso/index.htm)"; |
92,12 → 100,16 |
$l_safe_youtube="For Youtube, enter your ID here : "; |
$l_youtube_id="(<a href='http://www.youtube.com/education_signup' target='cat_help' onclick=window.open('http://www.youtube.com/education_signup','cat_help','width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes') title='Youtube for school'>link to create a Youtube Id</a>)"; |
} |
$bl_categories="/usr/local/etc/alcasar-bl-categories"; |
$bl_categories_enabled="/usr/local/etc/alcasar-bl-categories-enabled"; |
$dir_blacklist="/etc/dansguardian/lists/blacklist/"; |
$conf_file="/usr/local/etc/alcasar.conf"; |
$urlregex_file="/etc/dansguardian/lists/urlregexplist"; |
$bannedsite_file="/etc/dansguardian/lists/bannedsitelist"; |
$dir_etc="/usr/local/etc/"; |
$dir_dg="/etc/dansguardian/lists/"; |
$bl_categories=$dir_etc."alcasar-bl-categories"; |
$bl_categories_enabled=$dir_etc."alcasar-bl-categories-enabled"; |
$wl_categories=$dir_etc."alcasar-wl-categories"; |
$wl_categories_enabled=$dir_etc."alcasar-wl-categories-enabled"; |
$conf_file=$dir_etc."alcasar.conf"; |
$dir_blacklist=$dir_dg."blacklist/"; |
$urlregex_file=$dir_dg."urlregexplist"; |
$bannedsite_file=$dir_dg."bannedsitelist"; |
$dir_tmp="/tmp/blacklists"; |
# default values |
if (is_file ($conf_file)) |
125,17 → 137,17 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --off"); |
$DNS_FILTERING="off"; |
break; |
case 'Download_bl' : |
case 'Download_list' : |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --download"); |
break; |
case 'Active_bl' : |
case 'Active_list' : |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --adapt"); |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --reload"); |
break; |
case 'Reject_bl' : |
case 'Reject_list' : |
unlink ("$dir_tmp/blacklists.tar.gz"); unlink ("$dir_tmp/md5sum"); |
break; |
case 'MAJ_cat' : |
case 'MAJ_cat_bl' : |
$tab=file($bl_categories_enabled); |
if ($tab) |
{ |
151,23 → 163,48 |
fclose($pointeur); |
} |
else {echo "$l_error_open_file $bl_categories_enabled";} |
$fichier=fopen("/etc/dansguardian/lists/blacklists/ossi/domains","w+"); |
$fichier=fopen($dir_dg."blacklists/ossi/domains","w+"); |
fputs($fichier, form_filter($_POST['OSSI_bl_domains'])); |
fclose($fichier); |
unset($_POST['OSSI_bl_domains']); |
$fichier=fopen("/etc/dansguardian/lists/exceptionsitelist","w+"); |
fputs($fichier, form_filter($_POST['OSSI_wl_domains'])); |
$fichier=fopen($dir_dg."exceptionsitelist","w+"); |
fputs($fichier, form_filter($_POST['BL_rehabilited_domains'])); |
fclose($fichier); |
unset($_POST['OSSI_wl_domains']); |
$fichier=fopen("/etc/dansguardian/lists/blacklists/ossi/urls","w+"); |
unset($_POST['BL_rehabilited_domains']); |
$fichier=fopen($dir_dg."blacklists/ossi/urls","w+"); |
fputs($fichier, form_filter($_POST['OSSI_bl_urls'])); |
fclose($fichier); |
unset($_POST['OSSI_bl_urls']); |
$fichier=fopen("/etc/dansguardian/lists/exceptionurllist","w+"); |
$fichier=fopen($dir_dg."exceptionurllist","w+"); |
fputs($fichier, form_filter($_POST['BL_rehabilited_urls'])); |
fclose($fichier); |
unset($_POST['BL_rehabilited_urls']); |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --reload"); |
break; |
case 'MAJ_cat_wl' : |
$tab=file($wl_categories_enabled); |
if ($tab) |
{ |
$pointeur=fopen($wl_categories_enabled, "w+"); |
foreach ($_POST as $key => $value) |
{ |
if (strstr($key,'chk-')) |
{ |
$line=str_replace('chk-','',$key)."\n"; |
fwrite($pointeur,$line); |
} |
} |
fclose($pointeur); |
} |
else {echo "$l_error_open_file $wl_categories_enabled";} |
$fichier=fopen($dir_dg."blacklists/ossi/domains_wl","w+"); |
fputs($fichier, form_filter($_POST['OSSI_wl_domains'])); |
fclose($fichier); |
unset($_POST['OSSI_wl_domains']); |
$fichier=fopen($dir_dg."blacklists/ossi/urls_wl","w+"); |
fputs($fichier, form_filter($_POST['OSSI_wl_urls'])); |
fclose($fichier); |
unset($_POST['OSSI_wl_urls']); |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --reload"); |
break; |
case 'Specific_filtering' : |
$pureip="-pureip_off"; $safesearch="-safesearch_off"; ; |