Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 858 → Rev 859

/web/acc/admin/net_filter2.php
1,24 → 1,22
<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))
echo "<tr><th>$l_port<th>$l_proto<th>$l_enabled<th>$l_remove</tr>";
// Read and compute the protocols list
$tab=file(SERVICES_LIST);
if ($tab) # the file isn't empty
{
$pointeur=fopen($services_list,"r");
while (!feof ($pointeur))
foreach ($tab as $line)
{
$ligne=fgets($pointeur, 4096);
if ($ligne)
if (trim($line) != '') # the line isn't empty
{
$proto=explode(" ", $ligne);
$proto=explode(" ", $line);
$name_svc=trim($proto[0],"#");
echo "<tr><td>$name_svc / $proto[1]";
echo "<tr><td>$proto[1]<td>$name_svc";
echo "<td><input type='checkbox' name='chk-$name_svc'";
// si la ligne est commentée -> protocole non autorisé
if (preg_match('/^#/',$ligne, $r)) {
// if the line is commented -> protocol is not allowed
if (preg_match('/^#/',$line, $r)) {
echo ">";}
else {
echo "checked>";}
26,24 → 24,18
echo "</tr>";
}
}
fclose($pointeur);
}
else {
echo "$l_error_open_file $services_list";
}
?>
</table>
<input type='hidden' name='choix' value='change'>
<input type='hidden' name='choix' value='change_port'>
<input type='submit' value='<?echo"$l_save_modif";?>'>
</form>
</td>
<td valign='middle' align='center'>
</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'>
<tr><th><?echo"$l_port<th>$l_proto"?></tr>
<tr><td><input type='text' name='add_port' size='5'></td>
<td><input type='text' name='add_proto' size='10'></td>
<input type='hidden' name='choix' value='new_port'>
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
</tr></table>
</form>
50,4 → 42,4
</td></tr>
</TABLE>
</BODY>
</HTML>
</HTML>