Subversion Repositories ALCASAR

Rev

Rev 859 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 859 Rev 861
1
<tr><td valign="middle" align="center">
1
<tr><td valign="middle" align="center">
2
<form action='net_filter.php' method='POST'>
2
<form action='net_filter.php' method='POST'>
3
<table cellspacing=2 cellpadding=3 border=1>
3
<table cellspacing=2 cellpadding=3 border=1>
4
<?
4
<?
5
echo "<tr><th>$l_port<th>$l_proto<th>$l_enabled<th>$l_remove</tr>";
5
echo "<tr><th>$l_port<th>$l_proto<th>$l_enabled<th>$l_remove</tr>";
6
// Read and compute the protocols list
6
// Read and compute the protocols list
7
$tab=file(SERVICES_LIST);
7
$tab=file(SERVICES_LIST);
8
if ($tab) # the file isn't empty
8
if ($tab) # the file isn't empty
9
	{
9
	{
10
	foreach ($tab as $line)
10
	foreach ($tab as $line)
11
		{
11
		{
12
		if (trim($line) != '') # the line isn't empty
12
		if (trim($line) != '') # the line isn't empty
13
			{
13
			{
14
			$proto=explode(" ", $line);
14
			$proto=explode(" ", $line);
15
			$name_svc=trim($proto[0],"#");
15
			$name_svc=trim($proto[0],"#");
16
			echo "<tr><td>$proto[1]<td>$name_svc";
16
			echo "<tr><td>$proto[1]<td>$name_svc";
17
			echo "<td><input type='checkbox' name='chk-$name_svc'";
17
			echo "<td><input type='checkbox' name='chk-$name_svc'";
18
			// if the line is commented -> protocol is not allowed
18
			// if the line is commented -> protocol is not allowed
19
			if (preg_match('/^#/',$line, $r)) {
19
			if (preg_match('/^#/',$line, $r)) {
20
				echo ">";}
20
				echo ">";}
21
			else {
21
			else {
22
				echo "checked>";}
22
				echo "checked>";}
-
 
23
			echo "<td>";
-
 
24
			if ($name_svc != "icmp") {
23
			if ($name_svc != "icmp") {echo "<td><input type='checkbox' name='del-$name_svc'>";}
25
				echo "<input type='checkbox' name='del-$name_svc'>";}
-
 
26
			else {
-
 
27
				echo "&nbsp;";}		
24
			echo "</tr>";
28
			echo "</tr>";
25
			}
29
			}
26
		}
30
		}
27
	}
31
	}
28
?>
32
?>
29
</table>
33
</table>
30
<input type='hidden' name='choix' value='change_port'>
34
<input type='hidden' name='choix' value='change_port'>
31
<input type='submit' value='<?echo"$l_save_modif";?>'>
35
<input type='submit' value='<?echo"$l_save";?>'>
32
</form></td><td valign='middle' align='center'>
36
</form></td><td valign='middle' align='center'>
33
<form action='net_filter.php' method='POST'>
37
<form action='net_filter.php' method='POST'>
34
<table cellspacing=2 cellpadding=3 border=1>
38
<table cellspacing=2 cellpadding=3 border=1>
35
<tr><th><?echo"$l_port<th>$l_proto"?></tr>
39
<tr><th><?echo"$l_port<th>$l_proto"?></tr>
36
<tr><td><input type='text' name='add_port' size='5'></td>
40
<tr><td><input type='text' name='add_port' size='5'></td>
37
<td><input type='text' name='add_proto' size='10'></td>
41
<td><input type='text' name='add_proto' size='10'></td>
38
<input type='hidden' name='choix' value='new_port'>
42
<input type='hidden' name='choix' value='new_port'>
39
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
43
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
40
</tr></table>
44
</tr></table>
41
</form>
45
</form>
42
</td></tr>
46
</td></tr>
43
</TABLE>
47
</TABLE>
44
</BODY>
48
</BODY>
45
</HTML>
49
</HTML>
46
 
50