diff --git a/includes/tsmmonitor.php b/includes/tsmmonitor.php index 39ab45f..95ff598 100644 --- a/includes/tsmmonitor.php +++ b/includes/tsmmonitor.php @@ -241,7 +241,6 @@ class TSMMonitor { $pp = '<<'; if($this->page != 1) { - //$fp = ''.$fp.''; $fp = $navelement.'1">'.$fp.''; } @@ -282,10 +281,23 @@ class TSMMonitor { $numbers .= ' '.$navelement.$i.'">'.$i.' '; } } + + $lines = array ("20", "50", "100", "200", "500"); + $linesel = $_SESSION["lines"][$this->GETVars['qq']]; + if ($linesel == "") $linesel = "20"; + $linebox = "
"; + if ($end > 1) { - return $fp.' '.$pp.' '.$numbers.' '.$np.' '.$lp; + return '
'.$fp.' '.$pp.' '.$numbers.' '.$np.' '.$lp.'
'.$linebox.'
'; } else { - return ""; + return '
'.$linebox.'
'; } } @@ -842,10 +854,16 @@ class TSMMonitor { $_SESSION["lastsql"] = $sql; if ($sqlres) $this->message = $sql; + if ($_SESSION["lines"][$this->GETVars['qq']] != "") { + $lpp = $_SESSION["lines"][$this->GETVars['qq']]; + } else { + $lpp = 20; + } + if ($bContinue) { if ($type == "table") { $i = 0; - $rs = $this->fetchSplitArrayDB($sql,20); + $rs = $this->fetchSplitArrayDB($sql,$lpp); foreach ($rs as $row) { $color = ""; diff --git a/index.php b/index.php index f029390..fdfc6ab 100644 --- a/index.php +++ b/index.php @@ -160,12 +160,22 @@ include_once "includes/page_head.php"; } } } + $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 ""; $thead = $tsmmonitor->getTableheader(); echo $thead; echo $tsmmonitor->execute('table'); $nav = $tsmmonitor->showPageNavigation("40"); - if ($nav!="") { + if ($nav != "") { echo ""; } echo "
";