Example #1
0
 public function infoComments($id)
 {
     $id = I('id');
     $commentCount = M('InfoComment')->where(array('project_id' => $id, 'status' => 0))->count();
     $commentpage = new \Think\Page($commentCount, 10, array('id' => $id));
     $data = M('InfoComment')->order('create_time desc')->where(array('project_id' => $id, 'status' => 0))->limit($commentpage->firstRow . ',' . $commentCount)->select();
     $lists = get_format_comment($data, 10);
     $commentpage = $commentpage->show();
     $this->assign('lists', $lists);
     $this->assign('Pages', $commentpage);
     $html = $this->fetch('comments');
     $this->ajaxReturn(array('html' => $html, 'count' => $commentCount));
 }
Example #2
0
 function morecomment()
 {
     $pid = I('pid');
     //$comments = M('CommentReply')->order('create_time desc')->where(array('project_id'=>I('pid')))->select();
     $cmt = M('InfoComment')->order('create_time desc')->where(array('project_id' => $pid))->select();
     $comments = get_format_comment($cmt, count($cmt));
     //$model->getComments($id,5);
     //返回跳转
     $this->assign("backurl", U('Info/infomation?id=' . $pid));
     $this->assign('pageTitle', '更多回复');
     $this->assign('comments', $comments);
     $this->display();
 }
 function morecomment()
 {
     //$comments = M('CommentReply')->order('create_time desc')->where(array('project_id'=>I('pid')))->select();
     $cmt = M('ProductComment')->order('create_time desc')->where(array('project_id' => I('pid')))->select();
     $comments = get_format_comment($cmt, count($cmt));
     //$model->getComments($id,5);
     $this->assign('pageTitle', '更多回复');
     $this->assign('comments', $comments);
     $this->display();
 }