/** * 显示首页、新闻信息 */ function actionIndex() { $page = isset($_GET['page']) ? (int) $_GET['page'] : 0; FLEA::loadClass('FLEA_Helper_Pager'); $table =& $this->_modelPosts->getTable(); $pager =& new FLEA_Helper_Pager($table, $page, 20, null, 'post_id DESC'); $pk = $table->primaryKey; $rowset = $pager->findAll(); $this->_setBack(); include APP_DIR . '/ZobHome.php'; }
/** * 添加帖子 */ function actionAdd() { $table =& $this->_modelPosts->getTable(); $post = $this->_prepareData($table->meta); $this->_editComment($post); }