function blkFrontThongBao() { $view = $this->view; $arrParam = $view->arrParam; $thongbaoModel = new Front_Model_ThongBao(); $list_thong_bao = $thongbaoModel->fetchData(array('tb_to' => $this->_identity->em_id, 'tb_status' => 0), 'tb_date_added DESC'); require_once BLOCK_PATH . '/BlkFrontThongBao/' . TEMPLATE_USED . '/default.php'; }
public function indexAction() { $translate = Zend_Registry::get('Zend_Translate'); $this->view->title = 'Quản lý thông báo - ' . $translate->_('TEXT_DEFAULT_TITLE'); $this->view->headTitle($this->view->title); $layoutPath = APPLICATION_PATH . '/templates/' . TEMPLATE_USED; $option = array('layout' => 'canhan/layout', 'layoutPath' => $layoutPath); Zend_Layout::startMvc($option); $auth = Zend_Auth::getInstance(); $identity = $auth->getIdentity(); $em_id = $identity->em_id; $thongbaoModel = new Front_Model_ThongBao(); $list_thong_bao = $thongbaoModel->fetchData(array('tb_to' => $em_id), 'tb_date_added DESC'); $paginator = Zend_Paginator::factory($list_thong_bao); $paginator->setItemCountPerPage(NUM_PER_PAGE); $paginator->setCurrentPageNumber($this->_page); $this->view->page = $this->_page; $this->view->paginator = $paginator; $this->view->list_thong_bao = $list_thong_bao; }