15,15 → 15,16 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']); |
$Language = strtolower(substr(chop($Langue[0]),0,2)); } |
if($Language == 'fr'){ |
$l_title = "Filtrage de protocoles réacute;seau"; |
$l_title_antivir = "Antivirus de flux WEB"; |
$l_title_proto = "Filtrage de protocoles réseau"; |
$l_antivir_on="L'antivirus de flux WEB est actuellement activé"; |
$l_antivir_off="L'antivirus de flux WEB est actuellement désactivé"; |
$l_switch_antivir_on="Activer l'antivirus"; |
$l_switch_antivir_off="Désactiver l'antivirus"; |
$l_netfilter_on="Le filtrage réseau est actuellement activé"; |
$l_netfilter_off="Le filtrage réseau est actuellement désactivé"; |
$l_switch_on="Activer le filtrage réseau"; |
$l_switch_off="Désactiver le filtrage réseau"; |
$l_netfilter_on="Le filtrage de protocoles réseau est actuellement activé"; |
$l_netfilter_off="Le filtrage de protocoles réseau est actuellement désactivé"; |
$l_switch_on="Activer le filtrage"; |
$l_switch_off="Désactiver le filtrage"; |
$l_comment_on="À l'exclusion du WEB (port 80), les protocoles réseau sont interdits.<BR>Choisissez ci-dessous les protocoles que vous autorisez"; |
$l_comment_off="(tous les protocoles réseau sont autorisés)"; |
$l_protocols="Protocoles autorisés"; |
33,17 → 34,19 |
$l_delete="Supprimer de la liste"; |
$l_add_to_list="Ajouter à la liste"; |
$l_save_modif="Enregistrer les modifications"; |
$l_exception_txt="Entrez ici les adresses IP des stations du réseau de consultation ne subissant ce filtrage de protocoles<BR>Entrez une adresse IP par ligne"; |
} |
else { |
$l_title = "Network protocols filtering"; |
$l_antivir_on="Actually, the antivirus is on"; |
$l_antivir_off="Actually, the antivirus is off"; |
$l_title_antivir = "WEB antivirus"; |
$l_title_proto = "Network protocols filter"; |
$l_antivir_on="Actually, the WEB antivirus is on"; |
$l_antivir_off="Actually, the WEB antivirus is off"; |
$l_switch_antivir_on="Switch the antivirus on"; |
$l_switch_antivir_off="Switch the antivirus off"; |
$l_netfilter_on="Actually, the network filter is enable"; |
$l_netfilter_off="Actually, the network filter is disable"; |
$l_switch_on="Switch the Network Filter on"; |
$l_switch_off="Switch the Network Filter off"; |
$l_netfilter_on="Actually, the network protocols filter is enable"; |
$l_netfilter_off="Actually, the network protocols filter is disable"; |
$l_switch_on="Switch the Filter on"; |
$l_switch_off="Switch the Filter off"; |
$l_comment_on="(choose the authorized network protocols)"; |
$l_comment_off="(all the network protocols are allowed for authenticated users)"; |
$l_protocols="Authorize protocols"; |
53,9 → 56,10 |
$l_delete="Delete from list"; |
$l_add_to_list="Add to the list"; |
$l_save_modif="Save modifications"; |
$l_exception_txt="Put here the stations IP address that won't be protocols filtered<BR>Put one IP adress per row"; |
} |
echo " |
<tr><th>$l_title</th></tr> |
<tr><th>$l_title_antivir</th></tr> |
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=1 height=2></td></tr> |
</TABLE>"; |
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";} |
144,6 → 148,18 |
else {echo "$l_error_open_file $services_list";} |
exec ("sudo /usr/local/sbin/alcasar-nf.sh -on"); |
break; |
case 'IP_exceptions' : |
// réencodage iso + format unix + rc fin de ligne (ouf...) |
$ip_list = str_replace("\r\n", "\n", utf8_decode($_POST['exception_list'])); |
if (strlen($ip_list) != 0){ |
if ($ip_list[strlen($ip_list)-1] != "\n") { $ip_list[strlen($ip_list)]="\n";} ;} ; |
unset($_POST['exception_list']); |
// écriture exception pour filtrage réseau |
$fichier=fopen("/usr/local/etc/alcasar-filter-exceptions", "w+"); |
fputs($fichier, $ip_list); |
fclose($fichier); |
exec ("sudo /usr/local/sbin/alcasar-nf.sh -on"); |
break; |
} |
?> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0> |
150,7 → 166,7 |
<tr><td valign="middle" align="left"> |
<?php |
$pointeur = fopen("/etc/dansguardian/dansguardian.conf", "r"); |
$result_antivir = false; $result_filter = false; $out=0; |
$antivir_filter = false; $DG_filter = false; $out=0; |
if ($pointeur) |
{ |
while (!feof($pointeur)) |
158,12 → 174,12 |
$ligne = fgets($pointeur); |
if (preg_match("/^proxyport = 8090/", $ligne, $r)) |
{ |
$result_antivir = true; |
$antivir_filter = true; |
$out++; |
} |
if (preg_match("/^reportinglevel = 3/", $ligne, $r)) |
if (preg_match("/^reportinglevel = 3/", $ligne, $r)) // non utilisé mais on garde pour l'exemple |
{ |
$result_filter = true; |
$DG_filter = true; |
$out++; |
} |
if ($out == 2) break; |
170,7 → 186,7 |
} |
} |
fclose($pointeur); |
if ($result_antivir) |
if ($antivir_filter) |
{ |
echo "<CENTER><H3>$l_antivir_on</H3></CENTER>"; |
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>"; |
187,6 → 203,12 |
?> |
</FORM> |
</td></tr> |
</table> |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0> |
<tr><th><?echo "$l_title_proto";?></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=0> |
<tr><td valign="middle" align="left"> |
<? |
$pointeur = fopen("/usr/local/bin/alcasar-iptables.sh", "r"); |