Show all tables present in the tables ruleset on the diag overload tables.

This commit is contained in:
Ermal 2010-07-29 21:02:05 +00:00
parent ca7b7f7eb0
commit 34525fefe1

View File

@ -48,12 +48,9 @@ require_once("guiconfig.inc");
// Set default table
$tablename = "sshlockout";
if($_REQUEST['type'] == "sshlockout")
$tablename = "sshlockout";
if($_REQUEST['type'])
$tablename = $_REQUEST['type'];
if($_REQUEST['type'] == "virusprot")
$tablename = "virusprot";
if($_REQUEST['delete']) {
if(is_ipaddr($_REQUEST['delete'])) {
exec("/sbin/pfctl -t " . escapeshellarg($_REQUEST['type']) . " -T delete " . escapeshellarg($_REQUEST['delete']), $delete);
@ -73,6 +70,7 @@ if($_REQUEST['deleteall']) {
}
exec("/sbin/pfctl -t $tablename -T show", $entries);
exec("/sbin/pfctl -sT", $tables);
include("head.inc");
include("fbegin.inc");
@ -98,8 +96,13 @@ include("fbegin.inc");
<?=gettext("Table");?>:
<select id='type' onChange='method_change($F("type"));' name='type'>
<option name='sshlockout' value='sshlockout' <?php if ($tablename == "sshlockout") echo " selected ";?>>sshlockout</option>
<option name='virusprot' value='virusprot' <?php if ($tablename == "virusprot") echo " selected ";?>>virusprot</option>
<?php foreach ($tables as $table) {
echo "<option name='{$table}' value='{$table}'";
if ($tablename == $table)
echo " selected ";
echo ">{$table}</option>\n";
}
?>
</select>
<p/>