Subversion Repositories ALCASAR

Rev

Rev 372 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log

Rev 372 Rev 504
1
<table width="100%" border=1 cellspacing=0 cellpadding=1>
1
<table width="100%" border=1 cellspacing=0 cellpadding=1>
2
<tr><td valign="middle" align="center">
2
<tr><td valign="middle" align="center">
3
<form action='net_filter.php' method='POST'>
3
<form action='net_filter.php' method='POST'>
4
<table cellspacing=2 cellpadding=3 border=1>
4
<table cellspacing=2 cellpadding=3 border=1>
5
<?
5
<?
6
echo "<tr><th>$l_proto / port<th>$l_enabled<th>$l_delete</tr>";
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
7
// On lit et on interprète le fichier de filtrage de protocoles
8
if (file_exists($services_list))
8
if (file_exists($services_list))
9
	{
9
	{
10
	$pointeur=fopen($services_list,"r");
10
	$pointeur=fopen($services_list,"r");
11
	while (!feof ($pointeur))
11
	while (!feof ($pointeur))
12
		{
12
		{
13
		$ligne=fgets($pointeur, 4096);
13
		$ligne=fgets($pointeur, 4096);
14
		if ($ligne)
14
		if ($ligne)
15
			{
15
			{
16
			$proto=explode(" ", $ligne);
16
			$proto=explode(" ", $ligne);
17
			$name_svc=trim($proto[0],"#");
17
			$name_svc=trim($proto[0],"#");
18
			echo "<tr><td>$name_svc / $proto[1]";
18
			echo "<tr><td>$name_svc / $proto[1]";
19
			echo "<td><input type='checkbox' name='chk-$name_svc'";
19
			echo "<td><input type='checkbox' name='chk-$name_svc'";
20
			// si la ligne est commentée -> protocole non autorisé
20
			// si la ligne est commentée -> protocole non autorisé
21
			if (preg_match('/^#/',$ligne, $r)) {
21
			if (preg_match('/^#/',$ligne, $r)) {
22
				echo ">";}
22
				echo ">";}
23
			else {
23
			else {
24
				echo "checked>";}
24
				echo "checked>";}
25
			if ($name_svc != "icmp") {echo "<td><input type='checkbox' name='del-$name_svc'>";}
25
			if ($name_svc != "icmp") {echo "<td><input type='checkbox' name='del-$name_svc'>";}
26
			echo "</tr>";
26
			echo "</tr>";
27
			}
27
			}
28
		}
28
		}
29
	fclose($pointeur);
29
	fclose($pointeur);
30
	}
30
	}
31
else	{
31
else	{
32
	echo "$l_error_open_file $services_list";
32
	echo "$l_error_open_file $services_list";
33
	}
33
	}
34
?>
34
?>
35
</table>
35
</table>
36
<input type='hidden' name='choix' value='change'>
36
<input type='hidden' name='choix' value='change'>
37
<input type='submit' value='<?echo"$l_save_modif";?>'>
37
<input type='submit' value='<?echo"$l_save_modif";?>'>
38
</form>
38
</form>
39
</td>
39
</td>
40
<td valign='middle' align='center'>
40
<td valign='middle' align='center'>
41
<form action='net_filter.php' method='POST'>
41
<form action='net_filter.php' method='POST'>
42
<table cellspacing=2 cellpadding=3 border=1>
42
<table cellspacing=2 cellpadding=3 border=1>
43
<tr><th><?echo"$l_proto";?><th>port</tr>
43
<tr><th><?echo"$l_proto";?><th>port</tr>
44
<tr><td><input type='text' name='add_proto' size='10'></td>
44
<tr><td><input type='text' name='add_proto' size='10'></td>
45
<td><input type='text' name='add_port' size='5'></td>
45
<td><input type='text' name='add_port' size='5'></td>
46
<input type='hidden' name='choix' value='new_proto'>
46
<input type='hidden' name='choix' value='new_proto'>
47
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
47
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
48
</tr></table>
48
</tr></table>
49
</form>
49
</form>
50
</td></tr>
50
</td></tr>
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>
51
</TABLE>
79
</BODY>
52
</BODY>
80
</HTML>
53
</HTML>
81
 
54
 
82

Generated by GNU Enscript 1.6.6.
55

Generated by GNU Enscript 1.6.6.
83
 
56
 
84
 
57
 
85
 
58