318 |
richard |
1 |
<table width="100%" border=1 cellspacing=0 cellpadding=1>
|
|
|
2 |
<tr><td valign="middle" align="center">
|
|
|
3 |
<form action='net_filter.php' method='POST'>
|
|
|
4 |
<table cellspacing=2 cellpadding=3 border=1>
|
|
|
5 |
<?
|
|
|
6 |
echo "<tr><th>$l_proto / port<th>$l_enabled<th>$l_delete</tr>";
|
|
|
7 |
// On lit et on interprète le fichier de filtrage de protocoles
|
|
|
8 |
if (file_exists($services_list))
|
|
|
9 |
{
|
|
|
10 |
$pointeur=fopen($services_list,"r");
|
|
|
11 |
while (!feof ($pointeur))
|
|
|
12 |
{
|
|
|
13 |
$ligne=fgets($pointeur, 4096);
|
|
|
14 |
if ($ligne)
|
|
|
15 |
{
|
|
|
16 |
$proto=explode(" ", $ligne);
|
|
|
17 |
$name_svc=trim($proto[0],"#");
|
|
|
18 |
echo "<tr><td>$name_svc / $proto[1]";
|
|
|
19 |
echo "<td><input type='checkbox' name='chk-$name_svc'";
|
|
|
20 |
// si la ligne est commentée -> protocole non autorisé
|
|
|
21 |
if (preg_match('/^#/',$ligne, $r)) {
|
|
|
22 |
echo ">";}
|
|
|
23 |
else {
|
|
|
24 |
echo "checked>";}
|
|
|
25 |
if ($name_svc != "icmp") {echo "<td><input type='checkbox' name='del-$name_svc'>";}
|
|
|
26 |
echo "</tr>";
|
|
|
27 |
}
|
|
|
28 |
}
|
|
|
29 |
fclose($pointeur);
|
|
|
30 |
}
|
|
|
31 |
else {
|
|
|
32 |
echo "$l_error_open_file $services_list";
|
|
|
33 |
}
|
|
|
34 |
?>
|
|
|
35 |
</table>
|
|
|
36 |
<input type='hidden' name='choix' value='change'>
|
|
|
37 |
<input type='submit' value='<?echo"$l_save_modif";?>'>
|
|
|
38 |
</form>
|
|
|
39 |
</td>
|
|
|
40 |
<td valign='middle' align='center'>
|
|
|
41 |
<form action='net_filter.php' method='POST'>
|
|
|
42 |
<table cellspacing=2 cellpadding=3 border=1>
|
|
|
43 |
<tr><th><?echo"$l_proto";?><th>port</tr>
|
|
|
44 |
<tr><td><input type='text' name='add_proto' size='10'></td>
|
|
|
45 |
<td><input type='text' name='add_port' size='5'></td>
|
|
|
46 |
<input type='hidden' name='choix' value='new_proto'>
|
|
|
47 |
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
|
|
|
48 |
</tr></table>
|
|
|
49 |
</form>
|
|
|
50 |
</td></tr>
|
372 |
richard |
51 |
</TABLE>
|
|
|
52 |
</BODY>
|
|
|
53 |
</HTML>
|