Subversion Repositories ALCASAR

Compare Revisions

Regard whitespace Rev 2005 → Rev 2006

/web/acc/admin/protocols_filter.php
16,10 → 16,7
if($Language == 'fr'){
$l_remove="Retirer de la liste";
$l_title_proto = "Filtrage de protocoles réseau";
$l_protocolsfilter_on="Le filtrage de protocoles réseau est actuellement activé";
$l_protocolsfilter_off="Le filtrage de protocoles réseau est actuellement désactiv&eacute";
$l_switch_on="Activer le filtrage";
$l_switch_off="Désactiver le filtrage";
$l_protocolsfilter="Vous pouvez personnaliser le profile de filtrage protocole 'personnalisable' ici. Vous pouvez ensuite l'attribuer à des utilisateurs via l'éditeur ou la création d'utilisateur.";
$l_comment_on="&Agrave; l'exclusion du WEB (port 80), les protocoles r&eacute;seaux sont interdits.<BR>Choisissez ci-dessous les protocoles que vous autorisez";
$l_comment_off="(tous les protocoles réseau sont autoris&eacute;s)";
$l_protocols="Protocoles autoris&eacute;s";
33,10 → 30,7
else {
$l_remove="Remove from list";
$l_title_proto = "Network protocols filter";
$l_protocolsfilter_on="Actually, the network protocols filter is enable";
$l_protocolsfilter_off="Actually, the network protocols filter is disable";
$l_switch_on="Switch the Filter on";
$l_switch_off="Switch the Filter off";
$l_protocolsfilter="You can change your \"custom\" protocol filtering here. You can set it to a user from ACC (create user / edit user)";
$l_comment_on="(choose the authorized network protocols)";
$l_comment_on="Except for the WEB (port 80), all protocols are blocked.<BR>Choose in the list below, the protocols you want authorize";
$l_comment_off="(all the network protocols are allowed for authenticated users)";
79,12 → 73,6
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
switch ($choix)
{
case 'NF_On' :
exec ("sudo /usr/local/bin/alcasar-nf.sh -on");
break;
case 'NF_Off' :
exec ("sudo /usr/local/bin/alcasar-nf.sh -off");
break;
case 'new_port' :
if ((trim($_POST['add_port']) != "80") and ($_POST['add_port'] != "") and ($_POST['add_proto'] != "") and (is_numeric($_POST['add_port'])))
{
152,19 → 140,6
exec ("sudo /usr/local/bin/alcasar-iptables.sh -on");
break;
}
# default values
if (is_file (CONF_FILE))
{
$tab=file(CONF_FILE);
if ($tab)
{
foreach ($tab as $line)
{
$field=explode("=", $line);
if ($field[0] == "PROTOCOLS_FILTERING") {$PROTOCOLS_FILTERING=trim($field[1]);}
}
}
}
?>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><th><?echo "$l_title_proto";?></th></tr>
172,25 → 147,12
</table>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
<tr>
 
<?
if ($PROTOCOLS_FILTERING == "on")
{
 
echo "<td colspan=\"2\" valign=\"middle\" align=\"left\">";
echo "<CENTER><H3>$l_protocolsfilter_on</H3>$l_comment_on</CENTER>";
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
echo "<input type=hidden name='choix' value=\"NF_Off\">";
echo "<input type=submit value=\"$l_switch_off\">";
echo "</FORM></td></tr>";
require ('protocols_filter2.php');
}
else
{
echo "<td valign=\"middle\" align=\"left\">";
echo "<CENTER><H3>$l_protocolsfilter_off</H3>$l_comment_off</CENTER>";
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
echo "<input type=hidden name='choix' value=\"NF_On\">";
echo "<input type=submit value=\"$l_switch_on\">";
echo "</FORM></td></tr>";
echo "</table></body></html>";
}
 
?>