Subversion Repositories ALCASAR

Rev

Blame | Last modification | View Log

<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><th><?echo "$l_protocols";?></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=1>
<tr><td valign="middle" align="center">
<form action='net_filter.php' method='POST'>
<table cellspacing=2 cellpadding=3 border=1>
<?
echo "<tr><th>$l_proto / port<th>$l_enabled<th>$l_delete</tr>";
// On lit et on interprète le fichier de filtrage de protocoles
if (file_exists($services_list))
        {
        $pointeur=fopen($services_list,"r");
        while (!feof ($pointeur))
                {
                $ligne=fgets($pointeur, 4096);
                if ($ligne)
                        {
                        $proto=explode(" ", $ligne);
                        $name_svc=trim($proto[0],"#");
                        echo "<tr><td>$name_svc / $proto[1]";
                        echo "<td><input type='checkbox' name='chk-$name_svc'";
                        // si la ligne est commentée -> protocole non autorisé
                        if (preg_match('/^#/',$ligne, $r)) {
                                echo ">";}
                        else {
                                echo "checked>";}
                        if ($name_svc != "icmp") {echo "<td><input type='checkbox' name='del-$name_svc'>";}
                        echo "</tr>";
                        }
                }
        fclose($pointeur);
        }
else    {
        echo "$l_error_open_file $services_list";
        }
?>
</table>
<input type='hidden' name='choix' value='change'>
<input type='submit' value='<?echo"$l_save_modif";?>'>
</form>
</td>
<td valign='middle' align='center'>
<form action='net_filter.php' method='POST'>
<table cellspacing=2 cellpadding=3 border=1>
<tr><th><?echo"$l_proto";?><th>port</tr>
<tr><td><input type='text' name='add_proto' size='10'></td>
<td><input type='text' name='add_port' size='5'></td>
<input type='hidden' name='choix' value='new_proto'>
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
</tr></table>
</form>
</td></tr>
</table>