diff options
author | Warren Baker <warren@decoy.co.za> | 2010-09-02 22:19:54 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2010-09-02 22:19:54 +0200 |
commit | 6c474eb8d35075d314ba56c5bb004ff1227ce127 (patch) | |
tree | 5ee003a162e485a53e9810df22898ff0cfbf7469 /usr/local/www/diag_tables.php | |
parent | 926677d428bd9d38a250230d486e7e83b4e79509 (diff) | |
download | pfsense-6c474eb8d35075d314ba56c5bb004ff1227ce127.zip pfsense-6c474eb8d35075d314ba56c5bb004ff1227ce127.tar.gz |
Remove redundant 'Show Bogons' link and added Bogons list to Diagnostics -> Tables while preserving the same download functionality.
Diffstat (limited to 'usr/local/www/diag_tables.php')
-rw-r--r-- | usr/local/www/diag_tables.php | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/usr/local/www/diag_tables.php b/usr/local/www/diag_tables.php index 9551e51..ea76577 100644 --- a/usr/local/www/diag_tables.php +++ b/usr/local/www/diag_tables.php @@ -69,6 +69,23 @@ if($_REQUEST['deleteall']) { } } +if(($tablename == "bogons") && ($_POST['Download'])) { + mwexec_bg("/etc/rc.update_bogons.sh now"); + $maxtimetowait = 0; + $loading = true; + while($loading == true) { + $isrunning = `/bin/ps awwwux | /usr/bin/grep -v grep | /usr/bin/grep bogons`; + if($isrunning == "") + $loading = false; + $maxtimetowait++; + if($maxtimetowait > 89) + $loading = false; + sleep(1); + } + if($maxtimetowait < 90) + $savemsg = gettext("The bogons database has been updated."); +} + exec("/sbin/pfctl -t $tablename -T show", $entries); exec("/sbin/pfctl -sT", $tables); @@ -118,8 +135,10 @@ include("fbegin.inc"); <?php echo $entry; ?> </td> <td> + <?php if ($tablename != "bogons") { ?> <a onClick='del_entry("<?=$entry?>");'> <img img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif"> + <?php } ?> </a> </td> </tr> @@ -133,8 +152,10 @@ include("fbegin.inc"); <?php if($count > 0) - echo "<p/>" . gettext("Delete") . " <a href='diag_tables.php?deleteall=true&type={$tablename}'>" . gettext("all") . "</a> " . gettext("entries in this table."); - + if($tablename == "bogons") + echo "<input name='Download' type='submit' class='formbtn' value='" . gettext("Download") . "'> " . gettext(" the latest bogon data."); + else + echo "<p/>" . gettext("Delete") . " <a href='diag_tables.php?deleteall=true&type={$tablename}'>" . gettext("all") . "</a> " . gettext("entries in this table."); ?> <?php include("fend.inc"); ?> |