Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

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