public function index() { $cateModel = new CategoryModel(); $category = $cateModel->getCategory(); $this->assign('cate', $category); $this->display('contact'); /*$this->redirect('index/index');*/ }
public function index($id) { $newsModel = new NewsModel(); $news = $newsModel->getNewsById($id); $this->assign('news', $news); $cateModel = new CategoryModel(); $category = $cateModel->getCategory(); $this->assign('cate', $category); $this->display('news'); /*$this->redirect('index/index');*/ }
public function index($id) { $pageModel = new NewsModel(); $page = $pageModel->getPageByID($id); $this->assign('page', $page); $cateModel = new CategoryModel(); $category = $cateModel->getCategory(); $this->assign('cate', $category); $page_id = $id; $this->assign('page_id', $page_id); $this->display('page'); }
public function index() { $IndexModel = new IndexModel(); $slider = $IndexModel->getSlider(); $this->assign('slider', $slider); $NewsModel = new NewsListModel(); $newItem = $NewsModel->getIndexNews(); $this->assign('newItems', $newItem); $cateModel = new CategoryModel(); $category = $cateModel->getCategory(); $this->assign('cate', $category); $this->show(); }
public function index($page = 1, $page_size = 10) { $newsModel = new NewsListModel(); $newItem = $newsModel->getNews($page, $page_size); /*dump($newItem);*/ $total_count = $newsModel->getTotal(); $pageMeta = array('page' => $page, 'page_size' => $page_size, 'page_count' => ceil($total_count / $page_size), 'total_count' => $total_count); $this->assign('item', $newItem); $this->assign('page', $pageMeta); $cateModel = new CategoryModel(); $category = $cateModel->getCategory(); $this->assign('cate', $category); $this->display('newsList'); /*$this->redirect('index/index');*/ }