Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2647 → Rev 2648

/web/acc/admin/bl_filter.php
67,7 → 67,7
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2));
$Language = strtolower(substr(chop($Langue[0]),0,2));
}
if($Language == 'fr'){
$l_bl="Liste noire générale";
93,14 → 93,12
$l_record="Enregistrer les modifications";
$l_wait="Une fois validées, 10 secondes sont nécessaires pour traiter vos modifications";
$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)";
$l_safe_searching="Activer le contrôle scolaire/parental des moteurs de recherche google.";
$l_safe_youtube="Pour un contrôle parental sur Youtube, suivez les étapes ici : ";
$l_youtube_id="(<a href='https://support.google.com/youtube/answer/174084?hl=fr' target='cat_help' onclick=\"window.open('https://support.google.com/youtube/answer/174084?hl=fr','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>)";
$l_safe_searching="Activer le contrôle scolaire/parental des moteurs de recherche Google, Bing et Youtube.";
$l_error_open_file="Erreur d'ouverture du fichier";
$l_additional_file_title="Fichiers de 'listes noires' additionnels";
$l_file_list="Liste des fichiers";
$l_add_file="Ajouter un fichier";
$l_add_file_explain="Chaque ligne du fichier doit être une adresse IP ou un nom de domaine";
$l_add_file_explain="Chaque ligne du fichier doit être une adresse IP ou un nom de domaine";
$l_file_name="Nom du fichier";
$l_file_action="Action";
$l_error_upload="Erreur d'envoi du fichier";
141,14 → 139,12
$l_record="Save changes";
$l_wait="Once validated, 10 seconds are 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 search engines google";
$l_safe_youtube="For a safe Youtube search, follow these steps : ";
$l_youtube_id="(<a href='https://support.google.com/youtube/answer/174084?hl=en' target='cat_help' onclick=\"window.open('https://support.google.com/youtube/answer/174084?hl=en','cat_help','width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes')\" title='Youtube for school'>link to create a Youtube Id</a>)";
$l_safe_searching="Enabling school/parental control for the search engines Google, Bing and Youtube";
$l_error_open_file="Error opening file";
$l_additional_file_title="Additional blacklist files";
$l_file_list="Files list";
$l_add_file="Add a file";
$l_add_file_explain="Each line of the file must be an IP address or a domain name";
$l_add_file_explain="Each line of the file must be an IP address or a domain name";
$l_file_name="Filename";
$l_file_action="Action";
$l_error_upload="Error during the upload process";
197,7 → 193,7
}
}
}
}
}
else { echo "$l_error_open_file $conf_file";}
if (isset($_POST['choix'])){ $choix=$_POST['choix']; } else { $choix=""; }
switch ($choix)
221,7 → 217,7
foreach ($_POST as $key => $value)
{
if (strstr($key,'chk-'))
{
{
$line=str_replace('chk-','',$key)."\n";
fwrite($pointeur,$line);
if(trim($line) == 'malware' && $_POST['update_cat'] == 1) //auto-update of malware
265,14 → 261,14
$action=$_POST[$fichier];
if($action == $l_remove) //delete
{
exec("/bin/sed -i ".escapeshellarg("/^$fichier\$/d")." $bl_categories_enabled");
exec("/bin/sed -i ".escapeshellarg("/$fichier\$/d")." $bl_categories");
exec("/bin/sed -i ".escapeshellarg("/^$fichier\$/d")." $bl_categories_enabled");
exec("/bin/sed -i ".escapeshellarg("/$fichier\$/d")." $bl_categories");
exec("rm -rf $dir_blacklist".escapeshellarg($fichier));
exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
}
if($action == $l_disable) //disable
{
exec("/bin/sed -i ".escapeshellarg("/^$fichier\$/d")." $bl_categories_enabled");
exec("/bin/sed -i ".escapeshellarg("/^$fichier\$/d")." $bl_categories_enabled");
exec("sudo /usr/local/bin/alcasar-bl.sh --reload");
}
if($action == $l_enable) //enable
291,7 → 287,7
exec("mkdir ".escapeshellarg($dest_dir));
$file=$_FILES['fichier_ip']['tmp_name'];
exec('/usr/bin/dos2unix '.escapeshellarg($file));
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))
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))
{
touch ($dest_dir."/urls"); // create the URL file even if it isn't used
file_put_contents ($bl_categories, $dest_dir."\n", FILE_APPEND); # add to the categories list
350,9 → 346,9
$nbUrl = exec("for file in `find /etc/e2guardian/lists/blacklists/ -name 'urls'`; do nb=$((nb+$(wc -l \$file | awk '{print $1}'))); done; echo \$nb");
$nbIp = exec("wc -l /usr/local/share/iptables-bl/* | tail -n 1 | awk '{print $1}'");
echo "<b>$l_nbDomainNames</b> $nbDomainNames, <b>$l_nbUrl</b> $nbUrl, <b>$l_nbIp</b> $nbIp<br/>";
echo "$l_bl_categories</center></td></tr>";
echo "$l_bl_categories</center></td></tr>";
//read & display all BL categories (checked or not)
$cols=1;
$cols=1;
if (file_exists($bl_categories))
{
$bl_files = file($bl_categories);
384,12 → 380,12
 
if ( 0 == filesize( $update_file_cat ) ) $update_select[0] = "checked";
else $update_select[1] = "checked";
 
echo "</tr>\n";
echo "<tr><td valign='middle' align='left' colspan=10>";
echo "<center>$l_update_cat
<input type='radio' name='update_cat' value=0 $update_select[0]> $l_disable
<input type='radio' name='update_cat' value=1 $update_select[1]> $l_enable
echo "<center>$l_update_cat
<input type='radio' name='update_cat' value=0 $update_select[0]> $l_disable
<input type='radio' name='update_cat' value=1 $update_select[1]> $l_enable
<input type='submit' value='$l_record'></center>";
echo "</td></tr>";
echo "<tr><td valign='middle' align='left' colspan=10>";
466,7 → 462,7
$ligne=fgets($pointeur, 4096);
if ($ligne)
{
if (preg_match('/^\*ip$/',$ligne, $r))
if (preg_match('/^\*ip$/',$ligne, $r))
{
echo " checked";
break;
505,14 → 501,10
else {
echo "$l_error_open_file $urlregex_file";
}
echo "> $l_safe_searching";
echo "<br>$l_safe_youtube";
echo " $l_youtube_id<tr><td>";
echo "> $l_safe_searching<tr><td>";
echo "<input type='submit' onClick=\"this.disabled=true; this.value='$l_load';submit();\" value='$l_record'></td></tr>";
?>
</table>
</form>
</form>
</BODY>
</HTML>
 
 
/web/acc/admin/wl_filter.php
79,9 → 79,7
$l_one_dns_ip="Entrez un nom de domaine ou une adresse IP ou une adresse de réseau par ligne<br>exemple (domaine) : .domaine.org - exemple (ip) : 61.54.52.56 - exemple (réseau) : 172.16.0.0/16";
$l_record="Enregistrer les modifications";
$l_wait="Une fois validées, 10 secondes sont nécessaires pour traiter vos modifications";
$l_safe_searching="Activer le contrôle scolaire/parental des moteurs de recherche google.";
$l_safe_youtube="Pour un contrôle parental sur Youtube, suivez les étapes ici : ";
$l_youtube_id="(<a href='https://support.google.com/youtube/answer/174084?hl=fr' target='cat_help' onclick=window.open('https://support.google.com/youtube/answer/174084?hl=fr','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>)";
$l_safe_searching="Activer le contrôle scolaire/parental des moteurs de recherche Google, Bing et Youtube.";
$l_error_open_file="Erreur d'ouverture du fichier";
$l_additional_file_title="Fichiers de 'listes blanches' additionnels";
$l_file_list="Liste des fichiers";
112,9 → 110,7
$l_one_dns_ip="Enter one domain name or one IP address or one network address per row <br>example (domain): .domain.org - example (ip): 61.54.56.52 - example (network) : 172.16.0.0/16";
$l_record="Save changes";
$l_wait="Once validated, 10 seconds are necessary to compute your modifications";
$l_safe_searching="Enabling school/parental control for the search engines google";
$l_safe_youtube="For a safe Youtube search, follow these steps : ";
$l_youtube_id="(<a href='https://support.google.com/youtube/answer/174084?hl=en' target='cat_help' onclick=window.open('https://support.google.com/youtube/answer/174084?hl=en','cat_help','width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes') title='Youtube for school'>link to create a Youtube Id</a>)";
$l_safe_searching="Enabling school/parental control for the search engines Google, Bind and Youtube";
$l_error_open_file="Error opening file";
$l_additional_file_title="Additional WhiteList files";
$l_file_list="Files list";
361,9 → 357,7
{
echo " checked";
}
echo "> $l_safe_searching";
echo "<br>$l_safe_youtube";
echo " $l_youtube_id<tr><td>";
echo "> $l_safe_searching<tr><td>";
echo "<input type='submit' onClick=\"this.disabled=true; this.value='$l_load';submit();\" value='$l_record'></td></tr>";
?>
</FORM>