Ejemplo n.º 1
0
 public function management()
 {
     $this->theme->setBreadcrumb("文章管理");
     $this->theme->setTitle("文章管理");
     $this->__lib('Post');
     $post = new Post();
     $post->setPager(req()->get('page'));
     $this->__view("User/header.php");
     $this->__view("Posts/management.php", ['data' => $post->getList(login_user()->getId()), 'count' => $post->getCount()]);
     $this->__view("User/footer.php");
 }
Ejemplo n.º 2
0
 public function post_list($page = 0)
 {
     $this->__lib('Post');
     $post = new Post();
     $post->setPager($page, 2);
     $list = $post->getPublicList();
     $count = $post->getCount();
     if (empty($list) || $count['page'] > $count['max']) {
         $this->__load_404();
         return;
     }
     $this->theme->setTitle("文章列表");
     $this->__view("Home/header.php");
     $this->__view("Show/post_list.php", ['list' => $list, 'count' => $count]);
     $this->__view("Home/footer.php");
 }