public function msgAction() { if (!IS_AJAX) { $this->ajaxReturn(array('status' => 0)); } $count = M('wish')->count(); $page = new CPage($count, 10); $limit = $page->firstRow . ',' . $page->listRows; $wish = M('wish')->order('time')->limit($limit)->select(); $this->page = $page->show(); $this->assign('wish', $wish); $this->display(); }
public function msgAction() { /*if(!IS_AJAX){ $this->ajaxReturn(array('status' => 0)); }*/ $count = M('wish')->count(); $page = new CPage($count, 10); $limit = $page->firstRow . ',' . $page->listRows; $wish = M('wish')->order('time')->limit($limit)->select(); $this->page = $page->show(); $this->assign('wish', $wish); if (array_key_exists('HTTP_X_PJAX', $_SERVER) && $_SERVER['HTTP_X_PJAX']) { $this->display(); } else { layout(true); $this->display(); } }