Ejemplo n.º 1
0
 public function indexAction()
 {
     // action body
     $medelPage = new Kh_Model_Page();
     $where = array('cid' => 2);
     $aboutPages = $medelPage->getPages($where);
     $this->view->aboutPages = $aboutPages;
 }
Ejemplo n.º 2
0
 public function detailAction()
 {
     // action body
     $id = $this->_request->getParam('id');
     $modelPage = new Kh_Model_Page();
     $page = $modelPage->getPage($id);
     $this->view->page = $page;
     //其它新闻文章列表
     $where = " id != " . $id;
     $pages = $modelPage->getPages($where);
     $this->view->pages = $pages->toArray();
 }
Ejemplo n.º 3
0
 public function indexAction()
 {
     // action body
     $modelpage = new Kh_Model_Page();
     $where = array('star' => 4, 'top' => 1);
     $newsStar = $modelpage->fetchRow($where);
     $this->view->starNews = $newsStar;
     //        $where_list = array(
     //            'star' => 4,
     //            'top'  => 0
     //        );
     $where_list = '1 = 1';
     $order = 'createtime DESC';
     $limit = 5;
     $newsList = $modelpage->getPages($where_list, $order, $limit);
     $this->view->newsList = $newsList;
 }