mirror of
https://codeberg.org/mclemens/tsmmonitor2.git
synced 2024-12-22 07:36:38 -05:00
- Added drop-down selection for number of lines/rows to display per page
for all calls to fetchSplitArrayDB. - Fixed formatting issue with drop down box.
This commit is contained in:
parent
73befaaa6e
commit
e310e91542
@ -295,10 +295,9 @@ class TSMMonitor {
|
||||
$linebox .= "</select></form>";
|
||||
|
||||
if ($end > 1) {
|
||||
return '<div>'.$fp.' '.$pp.' '.$numbers.' '.$np.' '.$lp.'</div><div id="tnbox2">'.$linebox.'</div>';
|
||||
} else {
|
||||
return '<div id="tnbox2">'.$linebox.'</div>';
|
||||
$navline = $fp.' '.$pp.' '.$numbers.' '.$np.' '.$lp;
|
||||
}
|
||||
return '<table width="100%" align="center" cellpadding="1" cellspacing="0" border=0><tr><td width="10%" align="left"></td><td width="80%" align="center">'.$navline.'</td><td width="10%" align="right">'.$linebox.'</td></tr></table>';
|
||||
|
||||
}
|
||||
|
||||
@ -1078,7 +1077,13 @@ class TSMMonitor {
|
||||
|
||||
$sql = "SELECT * from log_polldlog where timestamp > '".(time()-86400)."' order by timestamp desc";
|
||||
$_SESSION["lastsql"] = $sql;
|
||||
$rs = $this->fetchSplitArrayDB($sql,20);
|
||||
if ($_SESSION["lines"][$this->GETVars['qq']] != "") {
|
||||
$lpp = $_SESSION["lines"][$this->GETVars['qq']];
|
||||
} else {
|
||||
$lpp = 20;
|
||||
}
|
||||
|
||||
$rs = $this->fetchSplitArrayDB($sql,$lpp);
|
||||
foreach ($rs as $row) {
|
||||
$modrow = array();
|
||||
while(list($keycell, $valcell) = each($row)) {
|
||||
|
10
index.php
10
index.php
@ -95,6 +95,16 @@ include_once "includes/page_head.php";
|
||||
|
||||
// show polld status
|
||||
} else if ($tsmmonitor->GETVars['qq'] == "polldstat") {
|
||||
$lines = $_POST["lpp"];
|
||||
if ($lines != "") {
|
||||
if (!isset($_SESSION["lines"])){
|
||||
$temp = array();
|
||||
$temp[$tsmmonitor->GETVars['qq']] = $lines;
|
||||
$_SESSION["lines"] = $temp;
|
||||
} else {
|
||||
$_SESSION["lines"][$tsmmonitor->GETVars['qq']] = $lines;
|
||||
}
|
||||
}
|
||||
echo $tsmmonitor->getPollDStat();
|
||||
|
||||
// show serverlist
|
||||
|
Loading…
Reference in New Issue
Block a user