Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 882 → Rev 885

/web/acc/admin/dns_filter.php
33,7 → 33,8
$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') : ";
$l_activate_bl="Activer cette version";
$l_activate_bl="Activer la nouvelle version";
$l_reject_bl="Rejeter";
$l_warning="Temps estimé : une minute.";
$l_specific_filtering="Filtrage special";
$l_forbidden_dns="Noms de domaine filtrés";
51,8 → 52,9
$l_record="Enregistrer les modifications";
$l_wait="Une fois validées, 30 secondes sont nécessaires pour traiter vos modifications";
$l_ip_filtering="Filtrer les URLs contenant une adresse IP au lien d'un nom de domaine (ex: http://25.56.58.59/index.htm)";
$l_safe_searching="Activer le contrôle scolaire/parentale pour les moteurs de recherche suivants : google, yahoo, bing, alltheweb, lycos, metacrawler et Youtube.";
$l_safe_youtube="Pour Youtube, créez un ID et entrez le ici : ";
$l_safe_searching="Activer le contrôle scolaire/parentale des moteurs de recherche : google, yahoo, bing, metacrawler et Youtube.";
$l_safe_youtube="Pour Youtube, entrez votre identifiant ici : ";
$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";
67,7 → 69,8
$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') : ";
$l_activate_bl="Activate this version";
$l_activate_bl="Activate the new version";
$l_reject_bl="Reject";
$l_warning="Estimated time : one minute.";
$l_specific_filtering="Specific filtering";
$l_forbidden_dns="Filtered domain names";
85,8 → 88,9
$l_record="Save changes";
$l_wait="Once validated, 30 seconds is necessary to compute your modifications";
$l_ip_filtering="Filtering URLs that contain an IP address instead of a domain name (ie: http://25.56.58.59/index.htm)";
$l_safe_searching="Enabling school/parental control for the following search engines : google, yahoo, bing, alltheweb, lycos, metacrawler and Youtube.";
$l_safe_youtube="For Youtube, create an ID and write it here : ";
$l_safe_searching="Enabling school/parental control for the search engines google, yahoo, bing, metacrawler and Youtube.";
$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";
94,6 → 98,22
$conf_file="/usr/local/etc/alcasar.conf";
$urlregex_file="/etc/dansguardian/lists/urlregexplist";
$bannedsite_file="/etc/dansguardian/lists/bannedsitelist";
$dir_tmp="/tmp/blacklists";
# default values
if (is_file ($conf_file))
{
$tab=file($conf_file);
if ($tab)
{
foreach ($tab as $line)
{
$field=explode("=", $line);
if ($field[0] == "DNS_FILTERING") {$DNS_FILTERING=trim($field[1]);}
if ($field[0] == "YOUTUBE_ID") {$YOUTUBE_ID=trim($field[1]);}
}
}
}
else { echo "$l_error_open_file $conf_file";}
if (isset($_POST['choix'])){ $choix=$_POST['choix']; } else { $choix=""; }
switch ($choix)
{
110,6 → 130,9
exec ("sudo /usr/local/sbin/alcasar-bl.sh --adapt");
exec ("sudo /usr/local/sbin/alcasar-bl.sh --reload");
break;
case 'Reject_bl' :
unlink ("$dir_tmp/blacklists.tar.gz"); unlink ("$dir_tmp/md5sum");
break;
case 'MAJ_cat' :
$tab=file($bl_categories_enabled);
if ($tab)
151,8 → 174,12
if (strstr($key,'chk-ip')) $pureip="-pureip_on";
if (strstr($key,'chk-safesearch')) $safesearch="-safesearch_on";
}
echo "$pureip, $safesearch";
break;
if ($_POST['Youtube_ID'] == '') { $New_ID="ABCD1234567890abcdef";} // default ID (no action)
else {$New_ID=$_POST['Youtube_ID'];}
file_put_contents($conf_file, str_replace("YOUTUBE_ID=$YOUTUBE_ID", "YOUTUBE_ID=$New_ID", file_get_contents($conf_file)));
$YOUTUBE_ID=$New_ID;
exec ("sudo /usr/local/sbin/alcasar-url_filter.sh $safesearch $pureip");
break;
}
?>
</TABLE>
163,20 → 190,6
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
<tr><td valign="middle" align="left">
<?php
# default values
if (is_file ($conf_file))
{
$tab=file($conf_file);
if ($tab)
{
foreach ($tab as $line)
{
$field=explode("=", $line);
if ($field[0] == "DNS_FILTERING") {$DNS_FILTERING=trim($field[1]);}
}
}
}
else { echo "$l_error_open_file $conf_file";}
if ($DNS_FILTERING == "on")
{
echo "<CENTER><H3>$l_dnsfilter_on</H3></CENTER>";