Subversion Repositories ALCASAR

Rev

Details | 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>";}
861 richard 23
			echo "<td>";
24
			if ($name_svc != "icmp") {
25
				echo "<input type='checkbox' name='del-$name_svc'>";}
26
			else {
27
				echo "&nbsp;";}		
318 richard 28
			echo "</tr>";
29
			}
30
		}
31
	}
32
?>
33
</table>
859 richard 34
<input type='hidden' name='choix' value='change_port'>
861 richard 35
<input type='submit' value='<?echo"$l_save";?>'>
859 richard 36
</form></td><td valign='middle' align='center'>
318 richard 37
<form action='net_filter.php' method='POST'>
38
<table cellspacing=2 cellpadding=3 border=1>
859 richard 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'>
318 richard 43
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
44
</tr></table>
45
</form>
46
</td></tr>
372 richard 47
</TABLE>
48
</BODY>
859 richard 49
</HTML>