Example #1
0
 /**
  * Display a list of hosts
  *
  * @return     void
  */
 public function displayTask()
 {
     // Get filters
     $this->view->filters = array('username' => urldecode(Request::getState($this->_option . '.' . $this->_controller . '.username', 'username', '')), 'appname' => urldecode(Request::getState($this->_option . '.' . $this->_controller . '.appname', 'appname', '')), 'exechost' => urldecode(Request::getState($this->_option . '.' . $this->_controller . '.exechost', 'exechost', '')), 'sort' => Request::getState($this->_option . '.' . $this->_controller . '.sort', 'filter_order', 'start'), 'sort_Dir' => Request::getState($this->_option . '.' . $this->_controller . '.sortdir', 'filter_order_Dir', 'DESC'), 'limit' => Request::getState($this->_option . '.' . $this->_controller . '.limit', 'limit', Config::get('list_limit'), 'int'), 'start' => Request::getState($this->_option . '.' . $this->_controller . '.limitstart', 'limitstart', 0, 'int'));
     // In case limit has been changed, adjust limitstart accordingly
     $this->view->filters['start'] = $this->view->filters['limit'] != 0 ? floor($this->view->filters['start'] / $this->view->filters['limit']) * $this->view->filters['limit'] : 0;
     // Get the middleware database
     $mwdb = Utils::getMWDBO();
     $model = new Tables\Session($mwdb);
     $this->view->total = $model->getAllCount($this->view->filters);
     $this->view->rows = $model->getAllRecords($this->view->filters);
     // Display results
     $this->view->display();
 }