private function getDetails()
 {
     if (isset($_GET['id'])) {
         parent::__construct($this->_tpl, new ContentModel());
         $this->_model->id = $_GET['id'];
         if (!$this->_model->getOneContent()) {
             Tool::alertBack('警告:不存在此文档!');
         }
         $_content = $this->_model->getOneContent();
         $_comment = new CommentModel();
         $_comment->cid = $this->_model->id;
         $_tarArr = explode(',', $_content->tag);
         if (is_array($_tarArr)) {
             foreach ($_tarArr as $_value) {
                 $_content->tag = str_replace($_value, '<a href="search.php?type=3&inputkeyword=' . $_value . '">' . $_value . '</a>', $_content->tag);
             }
         }
         $this->_tpl->assign('id', $_content->id);
         $this->_tpl->assign('titlec', $_content->title);
         $this->_tpl->assign('date', $_content->date);
         $this->_tpl->assign('source', $_content->source);
         $this->_tpl->assign('author', $_content->author);
         $this->_tpl->assign('info', $_content->info);
         $this->_tpl->assign('tag', $_content->tag);
         $this->_tpl->assign('content', Tool::unHtml($_content->content));
         $this->getNav($_content->nav);
         if (IS_CAHCE) {
             $this->_tpl->assign('count', '<script type="text/javascript">getContentCount();</script>');
         } else {
             $this->_tpl->assign('count', $_content->count);
         }
         $this->_tpl->assign('comment', $_comment->getCommentTotal());
         $_object = $_comment->getNewThreeComment();
         if ($_object) {
             foreach ($_object as $_value) {
                 switch ($_value->manner) {
                     case -1:
                         $_value->manner = '反对';
                         break;
                     case 0:
                         $_value->manner = '中立';
                         break;
                     case 1:
                         $_value->manner = '支持';
                         break;
                 }
                 if (empty($_value->face)) {
                     $_value->face = '00.gif';
                 }
                 if (!empty($_value->oppose)) {
                     $_value->oppose = '-' . $_value->oppose;
                 }
             }
         }
         $this->_tpl->assign('NewThreeComment', $_object);
         $this->_model->nav = $_content->nav;
         $_object = $this->_model->getMonthNavRec();
         $this->setObject($_object);
         $this->_tpl->assign('MonthNavRec', $_object);
         $_object = $this->_model->getMonthNavHot();
         $this->setObject($_object);
         $this->_tpl->assign('MonthNavHot', $_object);
         $_object = $this->_model->getMonthNavPic();
         $this->setObject($_object);
         $this->_tpl->assign('MonthNavPic', $_object);
     } else {
         Tool::alertBack('警告:非法操作!');
     }
 }
 private function getDetails()
 {
     if (isset($_GET['id'])) {
         parent::__construct($this->_tpl, new ContentModel());
         $this->_model->id = $_GET['id'];
         if (!$this->_model->setContentCount()) {
             Tool::alertBack('article not existing');
         }
         $_content = $this->_model->getOneContent();
         $_comment = new CommentModel();
         $_comment->cid = $this->_model->id;
         $this->_tpl->assign('id', $_content->id);
         $this->_tpl->assign('titlec', $_content->title);
         $this->_tpl->assign('date', $_content->date);
         $this->_tpl->assign('source', $_content->source);
         $this->_tpl->assign('author', $_content->author);
         $this->_tpl->assign('info', $_content->info);
         $this->_tpl->assign('tag', $_content->tag);
         $this->_tpl->assign('content', Tool::unHtml($_content->content));
         $this->getNav($_content->nav);
         if (IS_CACHE) {
             $this->_tpl->assign('count', '<script>getContentCount();</script>');
         } else {
             $this->_tpl->assign('count', $_content->count);
         }
         $this->_tpl->assign('comment', $_comment->getCommentTotal());
         $_object = $_comment->getNewThreeComment();
         if ($_object) {
             foreach ($_object as $_value) {
                 switch ($_value->manner) {
                     case -1:
                         $_value->manner = 'disagree';
                         break;
                     case 0:
                         $_value->manner = 'no opinion';
                         break;
                     case 1:
                         $_value->manner = 'agree';
                         break;
                 }
                 if (empty($_value->face)) {
                     $_value->face = '00.png';
                 }
                 if (!empty($_value->oppose)) {
                     $_value->oppose = '-' . $_value->oppose;
                 }
             }
         }
         $this->_tpl->assign('NewThreeComment', $_object);
         $this->_model->nav = $_content->nav;
         $_object = $this->_model->getMonthNavRec();
         $this->setObject($_object);
         $this->_tpl->assign('MonthNavRec', $_object);
         $_object = $this->_model->getMonthNavHot();
         $this->setObject($_object);
         $this->_tpl->assign('MonthNavHot', $_object);
         $_object = $this->_model->getMonthNavPic();
         $this->setObject($_object);
         $this->_tpl->assign('MonthNavPic', $_object);
     } else {
         Tool::alertBack('illegal act');
     }
 }