Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

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