Rev 318 | Blame | Last modification | View Log
<table width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="center">
<form action='net_filter.php' method='POST'>
<table cellspacing=2 cellpadding=3 border=1>
<?
echo "<tr><th>$l_proto / port<th>$l_enabled<th>$l_delete</tr>";
// On lit et on interprète le fichier de filtrage de protocoles
if (file_exists($services_list))
{
$pointeur=fopen($services_list,"r");
while (!feof ($pointeur))
{
$ligne=fgets($pointeur, 4096);
if ($ligne)
{
$proto=explode(" ", $ligne);
$name_svc=trim($proto[0],"#");
echo "<tr><td>$name_svc / $proto[1]";
echo "<td><input type='checkbox' name='chk-$name_svc'";
// si la ligne est commentée -> protocole non autorisé
if (preg_match('/^#/',$ligne, $r)) {
echo ">";}
else {
echo "checked>";}
if ($name_svc != "icmp") {echo "<td><input type='checkbox' name='del-$name_svc'>";}
echo "</tr>";
}
}
fclose($pointeur);
}
else {
echo "$l_error_open_file $services_list";
}
?>
</table>
<input type='hidden' name='choix' value='change'>
<input type='submit' value='<?echo"$l_save_modif";?>'>
</form>
</td>
<td valign='middle' align='center'>
<form action='net_filter.php' method='POST'>
<table cellspacing=2 cellpadding=3 border=1>
<tr><th><?echo"$l_proto";?><th>port</tr>
<tr><td><input type='text' name='add_proto' size='10'></td>
<td><input type='text' name='add_port' size='5'></td>
<input type='hidden' name='choix' value='new_proto'>
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
</tr></table>
</form>
</td></tr>
<tr><td colspan=2 valign="middle" align="center">
<B>Exceptions</B><br>
<form action='net_filter.php' method='POST'>
<?php
echo " $l_exception_txt";
echo "<BR><textarea name='exception_list' rows=5 cols=40>";
$filename="/usr/local/etc/alcasar-filter-exceptions";
if (file_exists($filename))
{
if (filesize($filename) != 0)
{
$pointeur=fopen($filename,"r");
$tampon = fread($pointeur, filesize($filename));
fclose($pointeur);
echo trim ($tampon);
}
}
else
{
echo "erreur d'ouverture du fichier $filename";
}
echo "</textarea><BR>";
?>
<input type='hidden' name='choix' value='IP_exceptions'>
<input type='submit' value='<?php echo "$l_save_modif"; ?>'>
</FORM>
</td></tr>
</TABLE>
</BODY>
</HTML>
Generated by GNU Enscript 1.6.6.