Subversion Repositories ALCASAR

Rev

Rev 504 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

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