/**
  * [慢生活页面]
  */
 public function newlist()
 {
     // 接收类型ID
     $typeid = isset($_GET['tid']) ? intval($_GET['tid']) : 0;
     // 头部样式
     $this->header();
     // 内容样式
     // include_once(VIEW_DIR.'/temp/newlist.html');
     $this->view->display('temp/newlist2_1.html');
     // 获取页码
     $page = isset($_GET['page']) ? $_GET['page'] : 1;
     //从用户点击操作携带过来的参数中获取
     // 获取每页显示记录
     $pagecount = $GLOBALS['config']['admin_goods_pagecount'];
     // // 获取文章记录
     // $article = new ArticeModel();
     $article = new ArticeModel();
     // 获取总记录数
     $counts = $article->getCounts();
     //求出总页数
     $pages = ceil($counts / $pagecount);
     // $articles = $article->getAllArticle($pagecount,$page,$typeid);
     $articles = $article->getTypeName($pagecount, $page, $typeid);
     foreach ($articles as $key => $value) {
         $this->view->assgin('title', $value['a_title']);
         $this->view->assgin('content', $this->sysSubStr(htmlspecialchars_decode($value['a_content']), 250));
         $this->view->assgin('time', date('Y-m-d', $value['a_time']));
         $this->view->assgin('name', $value['a_username']);
         $this->view->assgin('type', $value['s_name']);
         $this->view->assgin('scan', $value['a_scan']);
         $this->view->assgin('Reply_Num', $value['replysum']);
         $this->view->assgin('aid', $value['a_id']);
         $this->view->assgin('tid', $value['s_id']);
         $this->view->assgin('thumbimg', $value['a_thumb_img']);
         $this->view->display('temp/newlist2_2.html');
     }
     //添加分页按钮
     $pagestr = Page::setAHtmlPage('index.php', 'newlist', 'newlist', $counts, $pagecount, $page);
     $this->view->assgin('pagestr', $pagestr);
     $this->view->display('temp/newlist2_3.html');
     // 获取所有文章分类 慢生活分类ID为1
     $type = new SortArticleModel();
     $types = $type->getTypeById(1);
     // 获取栏目推荐
     $hots = $article->getTypeHot($typeid);
     // 获取点击排行
     $articles = $article->getTypeScan();
     // 获取最新评论
     $talk = new ReplayModel();
     $talks = $talk->getReplay();
     // 备案
     $filings = new InitModel();
     $filing = $filings->getOne();
     // 右边样式
     include_once VIEW_DIR . '/temp/newlist2.html';
 }
 /**
  * [模版分享页面]
  */
 public function share()
 {
     // 接收类型ID
     $typeid = isset($_GET['tid']) ? intval($_GET['tid']) : 0;
     // 头部样式
     $this->header();
     if ($typeid <= 0) {
         // 实例化文章
         $article = new ArticeModel();
         // 获取所有文章分类 模版分类ID为
         $type = new SortArticleModel();
         $types = $type->getTypeById(2);
         // 遍历个人博客模版
         foreach ($types as $k => $v) {
             // 个人博客板块
             if ($temp = $article->getTypeNameImg($v['s_id'])) {
                 $conten[] = $temp;
             }
             // 保存类型名称
             $typename[] = $v['s_name'];
         }
         // 内容样式 share
         include_once VIEW_DIR . '/temp/share.html';
     } else {
         // 获取所有文章分类 模版分类ID为
         $type = new SortArticleModel();
         $types = $type->getTypeById(2);
         $article = new ArticeModel();
         // 获取页码
         $page = isset($_GET['page']) ? $_GET['page'] : 1;
         // 获取每页显示记录数
         $pagecount = $GLOBALS['config']['admin_goods_pagecount'];
         // 获取所有记录资源
         $conten = $article->getTypeNameAll($pagecount, $page, $typeid);
         // 获取总记录数
         $counts = count($types);
         // 计算总页数
         $pages = ceil($counts / $pagecount);
         //添加分页按钮
         $pagestr = Page::setAHtmlPage('index.php', 'share', 'share', $counts, $pagecount, $page, $typeid);
         include_once VIEW_DIR . '/temp/share1.html';
     }
     // 获取栏目推荐
     $hots = $article->getTypeHot($typeid);
     // 获取点击排行
     $articles = $article->getTypeScan();
     // 获取最新评论
     $talk = new ReplayModel();
     $talks = $talk->getReplay();
     // 备案
     $filings = new InitModel();
     $filing = $filings->getOne();
     // 右边样式
     include_once VIEW_DIR . '/temp/share2.html';
 }
 /**
  * 管理评论
  */
 public function listarticlereply()
 {
     $articlereply = new ArticleReplyModel();
     // 当前页码
     $page = isset($_GET['page']) ? intval($_GET['page']) : 1;
     // 每页显示数量
     $counts = $GLOBALS['config']['admin_goods_pagecount'];
     //计算分页次数
     $pagecount = $articlereply->getAddNum();
     // 总记录数
     $pages = ceil($pagecount / $counts);
     // 字符过滤
     if (!is_integer($page) || $page < 1 || $page > $pages) {
         $page = 1;
     }
     // 分页显示数据
     $tables = $articlereply->getAllLogs($page, $counts);
     // 分页字符串
     $pagestr = Page::setAHtmlPage('index.php', 'index', 'listartice', $pagecount, $counts, $page);
     include_once VIEW_DIR . '/message_list2.html';
 }