Subversion Repositories ALCASAR

Rev

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

Rev Author Line No. Line
318 richard 1
<table width="100%" border=1 cellspacing=0 cellpadding=1>
2
<tr><td valign="middle" align="center">
3
<form action='net_filter.php' method='POST'>
4
<table cellspacing=2 cellpadding=3 border=1>
5
<?
6
echo "<tr><th>$l_proto / port<th>$l_enabled<th>$l_delete</tr>";
7
// On lit et on interprète le fichier de filtrage de protocoles
8
if (file_exists($services_list))
9
	{
10
	$pointeur=fopen($services_list,"r");
11
	while (!feof ($pointeur))
12
		{
13
		$ligne=fgets($pointeur, 4096);
14
		if ($ligne)
15
			{
16
			$proto=explode(" ", $ligne);
17
			$name_svc=trim($proto[0],"#");
18
			echo "<tr><td>$name_svc / $proto[1]";
19
			echo "<td><input type='checkbox' name='chk-$name_svc'";
20
			// si la ligne est commentée -> protocole non autorisé
21
			if (preg_match('/^#/',$ligne, $r)) {
22
				echo ">";}
23
			else {
24
				echo "checked>";}
25
			if ($name_svc != "icmp") {echo "<td><input type='checkbox' name='del-$name_svc'>";}
26
			echo "</tr>";
27
			}
28
		}
29
	fclose($pointeur);
30
	}
31
else	{
32
	echo "$l_error_open_file $services_list";
33
	}
34
?>
35
</table>
36
<input type='hidden' name='choix' value='change'>
37
<input type='submit' value='<?echo"$l_save_modif";?>'>
38
</form>
39
</td>
40
<td valign='middle' align='center'>
41
<form action='net_filter.php' method='POST'>
42
<table cellspacing=2 cellpadding=3 border=1>
43
<tr><th><?echo"$l_proto";?><th>port</tr>
44
<tr><td><input type='text' name='add_proto' size='10'></td>
45
<td><input type='text' name='add_port' size='5'></td>
46
<input type='hidden' name='choix' value='new_proto'>
47
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
48
</tr></table>
49
</form>
50
</td></tr>
372 richard 51
<tr><td colspan=2 valign="middle" align="center">
52
<B>Exceptions</B><br>
53
<form action='net_filter.php' method='POST'>
54
<?php
55
echo " $l_exception_txt";
56
echo "<BR><textarea name='exception_list' rows=5 cols=40>";
57
$filename="/usr/local/etc/alcasar-filter-exceptions";
58
if (file_exists($filename))
59
	{
60
	if (filesize($filename) != 0)
61
		{
62
		$pointeur=fopen($filename,"r");
63
		$tampon = fread($pointeur, filesize($filename));
64
		fclose($pointeur);
65
		echo trim ($tampon);
66
		}
67
	}
68
	else
69
	{
70
	echo "erreur d'ouverture du fichier $filename";
71
	}
72
echo "</textarea><BR>";
73
?>
74
<input type='hidden' name='choix' value='IP_exceptions'>
75
<input type='submit' value='<?php echo "$l_save_modif"; ?>'>
76
</FORM>
77
</td></tr>
78
</TABLE>
79
</BODY>
80
</HTML>