/** * 内容页 */ public function actionIndex() { $data = WaveCommon::getFilter($_GET); $this->page = isset($_GET['page']) ? (int) $_GET['page'] : 1; $pagesize = 15; $start = ($this->page - 1) * $pagesize; $Substance = new Substance(); $this->list = $Substance->limit($start, $pagesize)->order('sid', 'desc')->getAll(); $count = $Substance->getCount('*'); $url = 'http://' . Wave::app()->request->hostInfo . $_SERVER['REQUEST_URI']; if (empty($data['page'])) { $url .= '?page=1'; } $this->pagebar = WaveCommon::getPageBar($url, $count, $pagesize, $this->page); }