/** * 首页 * */ public function actionIndex() { parent::_acl('investType_index'); $model = new InvestType(); $criteria = new CDbCriteria(); $count = $model->count($criteria); $pages = new CPagination($count); $pages->pageSize = 10; $criteria->limit = $pages->pageSize; $criteria->offset = $pages->currentPage * $pages->pageSize; $result = $model->findAll($criteria); $this->render('index', array('datalist' => $result, 'pagebar' => $pages)); }