/** * 编辑资讯 */ public function cEdit() { $this->_modelNews = $this->getGlobal('model/News', 'Model_News'); if ($this->isPost()) { $info = $this->_modelNews->edit($_POST); if ($info['status'] == 1) { $this->success($info['info'], url('index/news/index')); } else { $this->error($info['info'], 2); } } else { $dataList = $this->_modelNews->findById($this->getR('id')); $this->assign('dataList', $dataList); $this->display(VIEW_PAGE); } }