• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_model_attribute函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_model_attribute函数的典型用法代码示例。如果您正苦于以下问题:PHP get_model_attribute函数的具体用法?PHP get_model_attribute怎么用?PHP get_model_attribute使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_model_attribute函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: add

 public function add()
 {
     $model = $this->model;
     $Model = D(parse_name(get_table_name($model['id']), 1));
     if (IS_POST) {
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && ($id = $Model->add())) {
             $this->_saveKeyword($model, $id, 'custom_reply_news');
             $this->success('添加' . $model['title'] . '成功!', U('lists?model=' . $model['name']));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         $extra = $this->getCateData();
         if (!empty($extra)) {
             foreach ($fields[1] as &$vo) {
                 if ($vo['name'] == 'cate_id') {
                     $vo['extra'] .= "\r\n" . $extra;
                 }
             }
         }
         $this->assign('fields', $fields);
         $this->meta_title = '新增' . $model['title'];
         $this->display();
     }
 }
开发者ID:pondyond,项目名称:WeiPHP,代码行数:28,代码来源:CustomReplyController.class.php


示例2: edit

 public function edit($id = 0)
 {
     $model = $this->getModel($this->model);
     $id || ($id = I('id'));
     if (IS_POST) {
         $_POST['module'] = _ADDONS;
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && $Model->save()) {
             $this->_saveKeyword($model, $id);
             $this->success('保存' . $model['title'] . '成功!', U('lists?model=' . $model['name']));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         // 获取数据
         $data = M(get_table_name($model['id']))->find($id);
         $data || $this->error('数据不存在!');
         $this->assign('fields', $fields);
         $this->assign('data', $data);
         $this->meta_title = '编辑' . $model['title'];
         $this->display();
     }
 }
开发者ID:noikiy,项目名称:weiphp,代码行数:26,代码来源:TemplateController.class.php


示例3: edit

 function edit()
 {
     $id = $this->shop_id;
     $model = $this->getModel();
     if (IS_POST) {
         // $_POST ['update_time'] = NOW_TIME;
         $Model = D(parse_name(get_table_name($model['id']), 1));
         if ($Model->create() && $Model->save()) {
             $this->_saveKeyword($model, $id);
         }
         // 清空缓存
         method_exists($Model, 'clear') && $Model->clear($id, 'edit');
         $this->success('保存' . $model['title'] . '成功!');
     } else {
         $fields = get_model_attribute($model['id']);
         // 获取数据
         $data = D('Shop')->getInfo($id, true);
         $data || $this->error('数据不存在!');
         $token = get_token();
         if (isset($data['token']) && $token != $data['token'] && defined('ADDON_PUBLIC_PATH')) {
             $this->error('非法访问!');
         }
         $this->assign('fields', $fields);
         $this->assign('data', $data);
         $this->display();
     }
 }
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:27,代码来源:ShopController.class.php


示例4: edit

 public function edit($id = 0)
 {
     $model = $this->getModel('credit_config');
     $id || ($id = I('id'));
     // 获取数据
     $data = M(get_table_name($model['id']))->find($id);
     $data || $this->error('数据不存在!');
     if (IS_POST) {
         $act = 'save';
         if ($data['token'] == 0) {
             $_POST['token'] = get_token();
             unset($_POST['id']);
             $act = 'add';
         }
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && $Model->{$act}()) {
             // dump($Model->getLastSql());
             $this->success('保存' . $model['title'] . '成功!', U('lists?model=' . $model['name']));
         } else {
             // dump($Model->getLastSql());
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         $this->assign('fields', $fields);
         $this->assign('data', $data);
         $this->meta_title = '编辑' . $model['title'];
         $this->display('Addons/edit');
     }
 }
开发者ID:chenpusn,项目名称:guoxian,代码行数:32,代码来源:CreditController.class.php


示例5: edit

 function edit()
 {
     $model = $this->getModel('business_card');
     $map['uid'] = $uid = $this->mid;
     $act = 'edit';
     // 	    $map['uid']=11857;
     $data = M('business_card')->where($map)->find();
     // 	    $id = I ( 'id' );
     // 获取数据
     // 	    $data = M ( get_table_name ( $model ['id'] ) )->find ( $id );
     $data || ($act = 'add');
     // $token = get_token ();
     // if (isset ( $data ['token'] ) && $token != $data ['token'] && defined ( 'ADDON_PUBLIC_PATH' )) {
     // $this->error ( '非法访问!' );
     // }
     if (IS_POST) {
         $_POST['uid'] = $this->mid;
         $_POST['token'] = get_token();
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($act == 'edit') {
             if ($Model->create() && $Model->save()) {
                 // 清空缓存
                 method_exists($Model, 'clear');
                 //     			$url=  '<script language=javascript>history.go(-1);</script>';
                 $this->success('保存' . $model['title'] . '成功!');
             } else {
                 $this->error($Model->getError());
             }
         } else {
             if ($Model->create() && ($id = $Model->add())) {
                 // 清空缓存
                 method_exists($Model, 'clear') && $Model->clear($id, 'add');
                 $this->success('添加' . $model['title'] . '成功!');
             } else {
                 $this->error($Model->getError());
             }
         }
     } else {
         $fields = get_model_attribute($model['id']);
         $this->assign('fields', $fields);
         $this->assign('data', $data);
         $this->display();
     }
 }
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:46,代码来源:BusinessCardController.class.php


示例6: form

 function form()
 {
     if (!is_login()) {
         Cookie('__forward__', $_SERVER['REQUEST_URI']);
         $this->error('您还没有登录,请先登录!', U('User/login'));
     }
     $model = M('Model')->find(I('get.model'));
     $this->assign('model', $model);
     $id = I('id', 0);
     $this->right_data($model);
     if (IS_POST) {
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         $res = $Model->create();
         if ($id) {
             $res = $Model->save();
         } else {
             $res = $Model->add();
         }
         if ($res) {
             $url = U('index');
             if ($model['name'] == 'store') {
                 $url = U('store');
             }
             $this->success('保存成功!', $url);
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         $this->assign('fields', $fields);
         // 获取数据
         if ($id) {
             $data = M(get_table_name($model['id']))->find($id);
             $data || $this->error('数据不存在!');
             $this->assign('data', $data);
         }
         $this->meta_title = '编辑' . $model['title'];
         $this->display();
     }
 }
开发者ID:zqstudio2015,项目名称:myweiphp,代码行数:42,代码来源:ForumController.class.php


示例7: add

 function add()
 {
     $model = $this->getModel();
     if (IS_POST) {
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && ($id = $Model->add())) {
             $this->_saveKeyword($model, $id);
             $this->success('添加' . $model['title'] . '成功!', U('lists?model=' . $model['name']));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         $this->assign('fields', $fields);
         $this->meta_title = '新增' . $model['title'];
         $this->_deal_data();
         $this->display();
     }
 }
开发者ID:pondyond,项目名称:WeiPHP,代码行数:21,代码来源:ScratchController.class.php


示例8: add

 public function add()
 {
     if (IS_POST) {
         $Model = D(parse_name(get_table_name($this->model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $this->model['id']);
         if ($Model->create() && ($id = $Model->add())) {
             $param['test_id'] = $this->test_id;
             $param['model'] = $this->model['id'];
             $url = U('lists', $param);
             $this->success('添加' . $this->model['title'] . '成功!', $url);
         } else {
             $this->error($Model->getError());
         }
         exit;
     }
     $this->_tip();
     $fields = get_model_attribute($this->model['id']);
     $this->assign('fields', $fields);
     $this->meta_title = '新增' . $this->model['title'];
     $this->display();
 }
开发者ID:zqstudio2015,项目名称:myweiphp,代码行数:22,代码来源:QuestionController.class.php


示例9: add

 public function add()
 {
     $model = $this->getModel('Message');
     if (IS_POST) {
         if (!C('SEND_GROUP_MSG')) {
             $this->error('抱歉,您的公众号没有群发消息的权限');
         }
         $send_type = I('send_type', 0, 'intval');
         $group_id = I('group_id', 0, 'intval');
         $send_openids = I('send_openids');
         if ($send_type == 0) {
             $_POST['msg_id'] = $this->_send_by_group($group_id);
         } else {
             $_POST['msg_id'] = $this->_send_by_openid($send_openids);
         }
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && ($id = $Model->add())) {
             $this->_saveKeyword($model, $id);
             // 清空缓存
             method_exists($Model, 'clear') && $Model->clear($id, 'edit');
             $this->success('添加' . $model['title'] . '成功!', U('add'));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id'], $model['field_sort']);
         $this->assign('fields', $fields);
         $this->meta_title = '新增' . $model['title'];
         !C('SEND_GROUP_MSG') && $this->assign('normal_tips', '温馨提示:目前微信仅开放认证公众号的群发消息权限,未认证公众号无法使用此功能');
         $map['token'] = get_token();
         $map['manager_id'] = $this->mid;
         $map['is_del'] = 0;
         $group_list = M('auth_group')->where($map)->select();
         $this->assign('group_list', $group_list);
         $this->display();
     }
 }
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:39,代码来源:MessageController.class.php


示例10: add

 public function add()
 {
     is_array($model) || ($model = $this->getModel($model));
     if (IS_POST) {
         //	$_POST ['token'] = get_token ();
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && ($id = $Model->add())) {
             $this->_saveKeyword($model, $id);
             $this->success('添加' . $model['title'] . '成功!', U('lists?model=' . $model['name']));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         $this->assign('fields', $fields);
         $this->meta_title = '新增' . $model['title'];
         $templateFile || ($templateFile = $model['template_add'] ? $model['template_add'] : '');
         $this->display($templateFile);
     }
 }
开发者ID:zqstudio2015,项目名称:myweiphp,代码行数:22,代码来源:CustomController.class.php


示例11: edit

 public function edit()
 {
     $model = $this->model;
     $id = I('id');
     if (IS_POST) {
         $_POST['token'] = get_token();
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && $Model->save()) {
             D('Common/Keyword')->set($_POST['keyword'], _ADDONS, $id, $_POST['keyword_type'], 'custom_reply_news');
             $this->success('保存' . $model['title'] . '成功!', U('lists?model=' . $model['name']));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         $extra = $this->getCateData();
         if (!empty($extra)) {
             foreach ($fields[1] as &$vo) {
                 if ($vo['name'] == 'cate_id') {
                     $vo['extra'] .= "\r\n" . $extra;
                 }
             }
         }
         // 获取数据
         $data = M(get_table_name($model['id']))->find($id);
         $data || $this->error('数据不存在!');
         $token = get_token();
         if (isset($data['token']) && $token != $data['token'] && defined('ADDON_PUBLIC_PATH')) {
             $this->error('非法访问!');
         }
         $this->assign('fields', $fields);
         $this->assign('data', $data);
         $this->meta_title = '编辑' . $model['title'];
         $this->display();
     }
 }
开发者ID:noikiy,项目名称:weiphp,代码行数:38,代码来源:SalesorderController.class.php


示例12: edit

 public function edit()
 {
     $id = I('get.id', '');
     if (empty($id)) {
         $this->error('参数不能为空!');
     }
     $model_id = 6;
     // 获取详细数据
     $Model = D('Record');
     $data = $Model->detail($id);
     // 获取当前的模型信息
     $model = get_top_model($data['model_id']);
     $model = $model[$model_id];
     $this->assign('data', $data);
     $this->assign('model_id', $data['model_id']);
     $this->assign('model', $model);
     //获取表单字段排序
     $fields = get_model_attribute($model['id']);
     $this->assign('fields', $fields);
     //获取当前分类的文档类型
     $this->assign('type_list', get_type_bycate($data['category_id']));
     $this->meta_title = '编辑文档';
     $this->display();
 }
开发者ID:LuckyHJH,项目名称:charlie_brown,代码行数:24,代码来源:RecordController.class.php


示例13: checkAttr

 protected function checkAttr($Model, $model_id)
 {
     $fields = get_model_attribute($model_id, false);
     $validate = $auto = array();
     foreach ($fields as $key => $attr) {
         if ($attr['is_must']) {
             // 必填字段
             $validate[] = array($attr['name'], 'require', $attr['title'] . '必须!');
         }
         // 自动验证规则
         if (!empty($attr['validate_rule']) || $attr['validate_type'] == 'unique') {
             $validate[] = array($attr['name'], $attr['validate_rule'], $attr['error_info'] ? $attr['error_info'] : $attr['title'] . '验证错误', 0, $attr['validate_type'], $attr['validate_time']);
         }
         // 自动完成规则
         if (!empty($attr['auto_rule'])) {
             $auto[] = array($attr['name'], $attr['auto_rule'], $attr['auto_time'], $attr['auto_type']);
         } elseif ('checkbox' == $attr['type']) {
             // 多选型
             $auto[] = array($attr['name'], 'arr2str', 3, 'function');
         } elseif ('datetime' == $attr['type']) {
             // 日期型
             $auto[] = array($attr['name'], 'strtotime', 3, 'function');
         } elseif ('date' == $attr['type']) {
             // 日期型
             $auto[] = array($attr['name'], 'strtotime', 3, 'function');
         }
     }
     return $Model->validate($validate)->auto($auto);
 }
开发者ID:chenpusn,项目名称:haozhixian,代码行数:29,代码来源:Controller.class.php


示例14: add

 function add()
 {
     $model = $this->getModel();
     if (IS_POST) {
         $this->checkPostData();
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && ($id = $Model->add())) {
             $this->_saveKeyword($model, $id);
             // 清空缓存
             method_exists($Model, 'clear') && $Model->clear($id, 'edit');
             D('Scratch')->getScratchInfo($id, true);
             $this->success('添加' . $model['title'] . '成功!', U('lists?model=' . $model['name']));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         $this->assign('fields', $fields);
         $this->meta_title = '新增' . $model['title'];
         $this->_deal_data();
         $this->display();
     }
 }
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:25,代码来源:ScratchController.class.php


示例15: add

 public function add()
 {
     $Model = D(parse_name(get_table_name($this->model['id']), 1));
     if (IS_POST) {
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $this->model['id']);
         if ($Model->create() && ($id = $Model->add())) {
             $this->success('添加' . $this->model['title'] . '成功!', U('lists?model=' . $this->model['name']));
         } else {
             $this->error($Model->getError());
         }
     } else {
         // 获取一级菜单
         $map['pid'] = 0;
         $map['token'] = get_token();
         $list = $Model->where($map)->select();
         foreach ($list as $v) {
             $extra .= $v['id'] . ':' . $v['title'] . "\r\n";
         }
         $fields = get_model_attribute($this->model['id']);
         if (!empty($extra)) {
             foreach ($fields[1] as &$vo) {
                 if ($vo['name'] == 'pid') {
                     $vo['extra'] .= "\r\n" . $extra;
                 }
             }
         }
         $this->assign('fields', $fields);
         $this->meta_title = '新增' . $this->model['title'];
         $this->display();
     }
 }
开发者ID:Backflag,项目名称:weiphp2.0.1202,代码行数:32,代码来源:FooterController.class.php


示例16: text_edit

 function text_edit()
 {
     $model = $this->getModel('material_text');
     $id = I('id');
     // 获取数据
     $data = M(get_table_name($model['id']))->find($id);
     $data || $this->error('数据不存在!');
     $token = get_token();
     if (isset($data['token']) && $token != $data['token'] && defined('ADDON_PUBLIC_PATH')) {
         $this->error('非法访问!');
     }
     if (IS_POST) {
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && $Model->save()) {
             $this->success('保存' . $model['title'] . '成功!', U('text_lists?model=' . $model['name'], $this->get_param));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         $this->assign('fields', $fields);
         $this->assign('data', $data);
         $this->assign('post_url', U('text_edit'));
         $this->display('Addons:edit');
     }
 }
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:28,代码来源:MaterialController.class.php


示例17: option_edit

 function option_edit()
 {
     $model = $this->getModel('shop_vote_option');
     $param['mdm'] = $_GET['mdm'];
     $res['title'] = '投票活动';
     $res['url'] = addons_url('Vote://ShopVote/lists', $param);
     $res['class'] = _ACTION == 'lists' ? 'current' : '';
     $nav[] = $res;
     $param['vote_id'] = I('vote_id');
     $res['title'] = '投票选项';
     $res['url'] = addons_url('Vote://ShopVote/option_lists', $param);
     $res['class'] = _ACTION == 'option_lists' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '编辑选项';
     $res['url'] = addons_url('Vote://ShopVote/option_edit', $param);
     $res['class'] = _ACTION == 'option_edit' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
     // 获取模型信息
     $id = I('id', 0, 'intval');
     $postUrl = addons_url('Vote://ShopVote/option_edit', $param);
     $this->assign('post_url', $postUrl);
     if (IS_POST) {
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && $Model->save()) {
             D('Addons://Vote/ShopVoteOption')->getInfo($id, true);
             D('Addons://Vote/ShopVoteOption')->getOptions($_POST['vote_id'], true);
             $this->success('保存' . $model['title'] . '成功!', U('option_lists?model=' . $model['name'] . '&vote_id=' . $_POST['vote_id'] . '&mdm=' . $_GET['mdm']));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         // 获取数据
         $data = M(get_table_name($model['id']))->find($id);
         $data || $this->error('数据不存在!');
         $token = get_token();
         if (isset($data['token']) && $token != $data['token'] && defined('ADDON_PUBLIC_PATH')) {
             $this->error('非法访问!');
         }
         $this->assign('fields', $fields);
         $this->assign('data', $data);
         $this->display('edit');
     }
 }
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:47,代码来源:ShopVoteController.class.php


示例18: edit

 public function edit()
 {
     // 获取模型信息
     $id = I('id', 0, 'intval');
     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()) {
             $this->success('保存' . $this->model['title'] . '成功!', U('lists'));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($this->model['id']);
         // 获取数据
         $data = M(get_table_name($this->model['id']))->find($id);
         $data || $this->error('数据不存在!');
         $token = get_token();
         if (isset($data['token']) && $token != $data['token'] && defined('ADDON_PUBLIC_PATH')) {
             $this->error('非法访问!');
         }
         $this->assign('fields', $fields);
         $this->assign('data', $data);
         $this->meta_title = '编辑' . $this->model['title'];
         $this->display('edit');
     }
 }
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:28,代码来源:YouaskServiceController.class.php


示例19: add

 function add()
 {
     $model = $this->getModel();
     if (IS_POST) {
         $this->checkPostData();
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && ($id = $Model->add())) {
             $this->_saveKeyword($model, $id);
             $this->save_shop($id, $_POST['shop_id']);
             // 清空缓存
             method_exists($Model, 'clear') && $Model->clear($id, 'add');
             $this->success('添加' . $model['title'] . '成功!', U('lists?model=' . $model['name']));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         $levelData = $this->get_card_level();
         $this->assign('level', $levelData);
         $this->assign('fields', $fields);
         $this->_deal_data();
         $this->display();
     }
     // $this->display ();
 }
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:27,代码来源:CouponController.class.php


示例20: editPublicAdmin

 function editPublicAdmin()
 {
     $model = $this->getModel('member_public');
     $id = I('id', 0, 'intval');
     if (IS_POST) {
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && $Model->save()) {
             $this->success('保存' . $model['title'] . '成功!', U('PublicAdmin'));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         foreach ($fields[1] as &$vo) {
             if ($vo['name'] == 'group_id') {
                 $vo['is_show'] = 1;
                 $group_list = M('member_public_group')->field('id, title')->select();
                 $extra = "0:无\n";
                 foreach ($group_list as $g) {
                     $extra .= $g['id'] . ':' . $g['title'] . "\n";
                 }
                 $vo['extra'] = $extra;
             }
         }
         // 获取数据
         $data = M(get_table_name($model['id']))->find($id);
         $data || $this->error('数据不存在!');
         $this->assign('fields', $fields);
         $this->assign('data', $data);
         $this->meta_title = '编辑' . $model['title'];
         $this->assign('post_url', U('admin/PublicGroup/editPublicAdmin', 'id=' . $id));
         $this->display('Think:edit');
     }
 }
开发者ID:zqstudio2015,项目名称:myweiphp,代码行数:36,代码来源:PublicGroupController.class.php



注:本文中的get_model_attribute函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_moderators函数代码示例发布时间:2022-05-15
下一篇:
PHP get_mobile_skin_select函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap