function list_action() { front::check_type(front::get('aid')); $this->view->article=archive::getInstance()->getrow(front::get('aid')); $this->view->page=front::get('page')?front::get('page'):1; $this->pagesize=config::get('list_pagesize'); $limit=(($this->view->page-1)*$this->pagesize).','.$this->pagesize; $comment=new comment(); $this->view->comments=$comment->getrows('state=1 and aid='.front::get('aid'),$limit); $this->view->record_count=$comment->rec_count('state=1 and aid='.front::get('aid')); front::$record_count=$this->view->record_count; $this->view->aid=front::get('aid'); }
function countcomment($aid) { $com=new comment(); return $com->rec_count('aid='.front::get('aid')); }