Пример #1
0
 public function indexAction()
 {
     $newsModel = new NewsModel();
     $news = $newsModel->news(1, 10);
     $this->_mainContent->assign("news", $news);
     $this->display();
 }
Пример #2
0
 public function index()
 {
     $news_model = new NewsModel();
     import("ORG.Util.TBPage");
     $listRows = C('ADMIN_ROW_LIST');
     $news_count = $news_model->news()->count();
     $Page = new TBPage($news_count, $listRows);
     $news_result = $news_model->order('create_time desc')->limit($Page->firstRow . ',' . $listRows)->select();
     $page_bar = $Page->show();
     $this->assign('q', $q);
     $this->assign('check', $check);
     $this->assign('type', $type);
     $this->assign('news_result', $news_result);
     $this->assign('page', $page_bar);
     $this->display();
 }
Пример #3
0
 public function rssAction()
 {
     $newsModel = new NewsModel();
     $news = $newsModel->news(1, 30);
     $this->_mainContent->assign("allnews", $news);
     $this->_layout = "empty";
     $this->display();
 }