public function indexAction() { $this->view->Title = "Tags Manager"; $this->view->headTitle($this->view->Title, true); $tags = new Manager_Model_tags(); if ($this->_request->getCookie('status') == NULL) { $status = -1; } else { $status = $this->_request->getCookie('status'); } if ($this->_request->getCookie('keyword') != Null) { $keyword = $this->_request->getCookie('keyword'); $this->view->keyword = $keyword; $listArticles = $tags->searchkq($keyword, $status); $currentPage = 1; $i = $this->_getParam('page', 1); if (!empty($i)) { $currentPage = $i; } $paginator = Zend_Paginator::factory($listArticles); $paginator->setItemCountPerPage(45)->setPageRange(5)->setCurrentPageNumber($currentPage); $this->view->paginator = $paginator; } else { $listArticles = $tags->listItemabout($status); $currentPage = 1; $i = $this->_getParam('page', 1); if (!empty($i)) { $currentPage = $i; } $paginator = Zend_Paginator::factory($listArticles); $paginator->setItemCountPerPage(45)->setPageRange(10)->setCurrentPageNumber($currentPage); $this->view->paginator = $paginator; } }
public function init() { $this->_arrParam = $this->_request->getParams(); $this->loadTemplate(TEMPLATE_PATH . '/admin/system'); $this->_mainAction = $this->_arrParam['module'] . '/' . $this->_arrParam['controller'] . '/index'; $this->view->arrParam = $this->_arrParam; $tbl_tags = new Manager_Model_tags(); $this->view->data = $tbl_tags->listItemabout($status = -1); }