assign('set', $set); $this->assign('footprint', FootprintLogic::lists()); return $this->fetch(); } public function edit() { if ($this->request->isAjax()) { $post = $this->request->post(); $result = FootprintLogic::edit($post); if ($result) { $this->_success('编辑成功'); } $this->_error('编辑失败'); } $id = $this->request->get('id', 0, 'intval'); $this->assign('info', FootprintLogic::info($id)); return $this->fetch(); } public function set() { if ($this->request->isAjax()) { $post = $this->request->post(); $result = FootprintLogic::set($post); if ($result) { $this->_success('更新成功'); } $this->_error('更新失败'); } } }