public function edit() { $id = I('id'); if (IS_POST) { $Model = D(parse_name(get_table_name($this->model['id']), 1)); // 获取模型的字段信息 $Model = $this->checkAttr($Model, $this->model['id']); if ($Model->create() && $Model->save()) { $param['hid'] = $this->hid; $param['model'] = $this->model['id']; $url = U('lists', $param); $this->success('保存' . $this->model['title'] . '成功!', $url); } else { $this->error($Model->getError()); } } parent::common_edit($this->model, $id); }
public function edit() { $model = $this->getModel($this->table); $this->assign('post_url', U('edit')); parent::common_edit($model, 0, 'add'); }
public function edit() { $id = I('id'); $model = $this->getModel($this->table); parent::common_edit($model, $id); }
public function edit() { $_POST['token'] = get_token(); parent::common_edit($this->model); }
public function edit() { parent::common_edit($this->model); }