diff options
author | Warren Baker <warren@decoy.co.za> | 2010-12-02 19:21:59 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2010-12-02 19:21:59 +0200 |
commit | 41fafd53147b31aa71f0ca32b797f60848af926e (patch) | |
tree | 47df6fc9499411985b9bf1639dbe6c3de6e72c5e /usr/local/www | |
parent | d589cccf66d7e876e576f894e2599ac5bf9e0cd9 (diff) | |
download | pfsense-41fafd53147b31aa71f0ca32b797f60848af926e.zip pfsense-41fafd53147b31aa71f0ca32b797f60848af926e.tar.gz |
Make use of the new tab menu and use _GET instead of _POST for pkg name passed in URL.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/diag_pkglogs.php | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/usr/local/www/diag_pkglogs.php b/usr/local/www/diag_pkglogs.php index 9fb2b8f..17459c4 100755 --- a/usr/local/www/diag_pkglogs.php +++ b/usr/local/www/diag_pkglogs.php @@ -50,6 +50,7 @@ ##|-PRIV require("guiconfig.inc"); +require("pkg-utils.inc"); if(!($nentries = $config['syslog']['nentries'])) $nentries = 50; @@ -58,7 +59,7 @@ if(!($nentries = $config['syslog']['nentries'])) $nentries = 50; $i = 0; $pkgwithlogging = false; -$apkg = $_POST['pkg']; +$apkg = $_GET['pkg']; if(!$apkg) { // If we aren't looking for a specific package, locate the first package that handles logging. if($config['installedpackages']['package'] <> "") { foreach($config['installedpackages']['package'] as $package) { @@ -84,8 +85,8 @@ include("head.inc"); <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr><td> - <ul id="tabnav"> + <tr> + <td> <?php if($pkgwithlogging == false) { print_info_box(gettext("No packages with logging facilities are currently installed.")); @@ -93,23 +94,25 @@ include("head.inc"); include("fend.inc"); exit; } + $tab_array = array(); foreach($config['installedpackages']['package'] as $package) { if(is_array($package['logging'])) { if(!($logtab = $package['logging']['logtab'])) $logtab = $package['name']; if($apkg == $package['name']) { $curtab = $logtab; - echo '<li class="tabact">' . $logtab . '</li>'; + $tab_array[] = array(sprintf(gettext("%s"),$logtab), true, "diag_pkglogs.php?pkg=".$package['name']); } else { - Echo '<li class="tabinact"><a href="diag_pkglogs.php?pkg=' . htmlspecialchars($package['name']) . '">' . $logtab . '</a></li>'; + $tab_array[] = array(sprintf(gettext("%s"),$logtab), false, "diag_pkglogs.php?pkg=".$package['name']); } } } + display_top_tabs($tab_array); ?> - </ul> </td></tr> <tr> - <td class="tabcont"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <td> + <div id="mainarea"> + <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2" class="listtopic"> <?php printf(gettext('Last %1$s %2$s log entries'),$nentries,$curtab); ?></td> @@ -119,12 +122,12 @@ include("head.inc"); dump_clog($g['varlog_path'] . '/' . $package['logging']['logfilename'], $nentries); ?> </table> - <br> <!-- <form action="diag_pkglogs.php" method="post"> <input name="clear" type="submit" class="formbtn" value="Clear log"> </form> --> + </div> </td> </tr> </table> |