當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AdminConfigBuilder::buttonBack方法代碼示例

本文整理匯總了PHP中Admin\Builder\AdminConfigBuilder::buttonBack方法的典型用法代碼示例。如果您正苦於以下問題:PHP AdminConfigBuilder::buttonBack方法的具體用法?PHP AdminConfigBuilder::buttonBack怎麽用?PHP AdminConfigBuilder::buttonBack使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Admin\Builder\AdminConfigBuilder的用法示例。


在下文中一共展示了AdminConfigBuilder::buttonBack方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: install

 public function install()
 {
     $aName = I('get.name', '', 'text');
     $aNav = I('add_nav', 0, 'intval');
     $module = $this->moduleModel->getModule($aName);
     if (IS_POST) {
         //執行guide中的內容
         $res = $this->moduleModel->install($module['id']);
         if ($res === true) {
             if ($aNav) {
                 $channel['title'] = $module['alias'];
                 $channel['url'] = $module['entry'];
                 $channel['sort'] = 100;
                 $channel['status'] = 1;
                 $channel['icon'] = $module['icon'];
                 M('Channel')->add($channel);
                 S('common_nav', null);
             }
             $this->success(L('_INSTALLATION_MODULE_SUCCESS_'), U('lists'));
         } else {
             $this->error(L('_SETUP_MODULE_FAILED_') . $this->moduleModel->getError());
         }
     } else {
         $builder = new AdminConfigBuilder();
         $builder->title($module['alias'] . L('_DASH_') . L('_GUIDE_MODULE_INSTALL_'));
         $builder->keyId()->keyReadOnly('name', L('_MODULE_NAME_'))->keyText('alias', L('_MODULE_CHINESE_NAME_'))->keyReadOnly('version', L('_VERSION_'))->keyText('icon', L('_ICON_'))->keyTextArea('summary', L('_MODULE_INTRODUCTION_'))->keyReadOnly('developer', L('_DEVELOPER_'))->keyText('entry', L('_FRONT_ENTRANCE_'))->keyText('admin_entry', L('_BACKGROUND_ENTRY_'));
         //, 'repair' => L('_FIX_MODE_')修複模式不會導入模塊專用數據表,隻導入菜單、權限、行為、行為限製
         $builder->keyRadio('mode', L('_INSTALLATION_MODE_'), '', array('install' => L('_COVER_INSTALLATION_MODE_')));
         if ($module['entry']) {
             $builder->keyBool('add_nav', L('_ADD_NAVIGATION_'), L('_INSTALL_AUTO_ADD_MENU_', array('link' => U('channel/index'))));
         }
         /*   $builder->keyRadio('add_nav',L('_ADD_NAVIGATION_MENU_'),L('_DEFAULT_WILL_NOT_ADD_NAVIGATION_'),array(1=>L('_DO_NOT_ADD_'),2=>L('_ADD_')));*/
         $builder->group(L('_INSTALL_OPTION_'), 'mode,add_nav');
         /* $builder->group(L('_MODULE_INFORMATION_'), 'id,name,alias,version,icon,summary,developer,entry,admin_entry');*/
         $module['mode'] = 'install';
         $module['add_nav'] = '1';
         $builder->data($module);
         $builder->buttonSubmit();
         $builder->buttonBack();
         $builder->display();
     }
     /*  */
 }
開發者ID:naliduo,項目名稱:Lightweight-social-platform,代碼行數:43,代碼來源:ModuleController.class.php

示例2: expandinfo_details


//.........這裏部分代碼省略.........
                 if (substr($key, 0, 4) == 'role') {
                     $data_role[] = $val;
                 }
             }
         }
         unset($key, $val);
         $this->_resetUserRole($uid, $data_role);
         $this->success(L('_SUCCESS_OPERATE_') . L('_EXCLAMATION_'));
         /*身份設置 end*/
     } else {
         $map['uid'] = $uid;
         $map['status'] = array('egt', 0);
         $member = M('Member')->where($map)->find();
         $member['id'] = $member['uid'];
         $member['username'] = query_user('username', $uid);
         //擴展信息查詢
         $map_profile['status'] = 1;
         $field_group = D('field_group')->where($map_profile)->select();
         $field_group_ids = array_column($field_group, 'id');
         $map_profile['profile_group_id'] = array('in', $field_group_ids);
         $fields_list = D('field_setting')->where($map_profile)->getField('id,field_name,form_type');
         $fields_list = array_combine(array_column($fields_list, 'field_name'), $fields_list);
         $map_field['uid'] = $member['uid'];
         foreach ($fields_list as $key => $val) {
             $map_field['field_id'] = $val['id'];
             $field_data = D('field')->where($map_field)->getField('field_data');
             if ($field_data == null || $field_data == '') {
                 $member[$key] = '';
             } else {
                 $member[$key] = $field_data;
             }
             $member[$key] = $field_data;
         }
         $builder = new AdminConfigBuilder();
         $builder->title(L('_USER_EXPAND_INFO_DETAIL_'));
         $builder->meta_title = L('_USER_EXPAND_INFO_DETAIL_');
         $builder->keyId()->keyReadOnly('username', L('_USER_NAME_'))->keyReadOnly('nickname', L('_NICKNAME_'));
         $field_key = array('id', 'username', 'nickname');
         foreach ($fields_list as $vt) {
             $field_key[] = $vt['field_name'];
             $builder->keyReadOnly($vt['field_name'], $vt['field_name']);
         }
         /* 積分設置 xjw129xjt(肖駿濤)*/
         $field = D('Ucenter/Score')->getTypeList(array('status' => 1));
         $score_key = array();
         foreach ($field as $vf) {
             $score_key[] = 'score' . $vf['id'];
             $builder->keyText('score' . $vf['id'], $vf['title']);
         }
         $score_data = D('Member')->where(array('uid' => $uid))->field(implode(',', $score_key))->find();
         $member = array_merge($member, $score_data);
         /*積分設置end*/
         $builder->data($member);
         /*身份設置 zzl(鄭鍾良)*/
         $already_role = D('UserRole')->where(array('uid' => $uid, 'status' => 1))->field('role_id')->select();
         if (count($already_role)) {
             $already_role = array_column($already_role, 'role_id');
         }
         $roleModel = D('Role');
         $role_key = array();
         $no_group_role = $roleModel->where(array('group_id' => 0, 'status' => 1))->select();
         if (count($no_group_role)) {
             $role_key[] = 'role';
             $no_group_role_options = $already_no_group_role = array();
             foreach ($no_group_role as $val) {
                 if (in_array($val['id'], $already_role)) {
                     $already_no_group_role[] = $val['id'];
                 }
                 $no_group_role_options[$val['id']] = $val['title'];
             }
             $builder->keyCheckBox('role', L('_ROLE_GROUP_NONE_'), L('_MULTI_OPTIONS_'), $no_group_role_options)->keyDefault('role', implode(',', $already_no_group_role));
         }
         $role_group = D('RoleGroup')->select();
         foreach ($role_group as $group) {
             $group_role = $roleModel->where(array('group_id' => $group['id'], 'status' => 1))->select();
             if (count($group_role)) {
                 $role_key[] = 'role' . $group['id'];
                 $group_role_options = $already_group_role = array();
                 foreach ($group_role as $val) {
                     if (in_array($val['id'], $already_role)) {
                         $already_group_role = $val['id'];
                     }
                     $group_role_options[$val['id']] = $val['title'];
                 }
                 $myJs = "\$('.group_list').last().children().last().append('<a class=\"btn btn-default\" id=\"checkFalse\">" . L('_SELECTION_CANCEL_') . "</a>');";
                 $myJs = $myJs . "\$('#checkFalse').click(";
                 $myJs = $myJs . "function(){ \$('input[type=\"radio\"]').attr(\"checked\",false)}";
                 $myJs = $myJs . ");";
                 $builder->keyRadio('role' . $group['id'], L('_ROLE_GROUP_', array('title' => $group['title'])), L('_ROLE_GROUP_VICE_'), $group_role_options)->keyDefault('role' . $group['id'], $already_group_role)->addCustomJs($myJs);
             }
         }
         /*身份設置 end*/
         $builder->group(L('_BASIC_SETTINGS_'), implode(',', $field_key));
         $builder->group(L('_SETTINGS_SCORE_'), implode(',', $score_key));
         $builder->group(L('_SETTINGS_ROLE_'), implode(',', $role_key));
         $builder->buttonSubmit('', L('_SAVE_'));
         $builder->buttonBack();
         $builder->display();
     }
 }
開發者ID:naliduo,項目名稱:Lightweight-social-platform,代碼行數:101,代碼來源:UserController.class.php

示例3: expandinfo_details


//.........這裏部分代碼省略.........
         foreach ($data as $key => $val) {
             if ($key == 'role') {
                 $data_role = explode(',', $val);
             } else {
                 if (substr($key, 0, 4) == 'role') {
                     $data_role[] = $val;
                 }
             }
         }
         unset($key, $val);
         $this->_resetUserRole($uid, $data_role);
         $this->success('操作成功!');
         /*身份設置 end*/
     } else {
         $map['uid'] = $uid;
         $map['status'] = array('egt', 0);
         $member = M('Member')->where($map)->find();
         $member['id'] = $member['uid'];
         $member['username'] = query_user('username', $uid);
         //擴展信息查詢
         $map_profile['status'] = 1;
         $field_group = D('field_group')->where($map_profile)->select();
         $field_group_ids = array_column($field_group, 'id');
         $map_profile['profile_group_id'] = array('in', $field_group_ids);
         $fields_list = D('field_setting')->where($map_profile)->getField('id,field_name,form_type');
         $fields_list = array_combine(array_column($fields_list, 'field_name'), $fields_list);
         $map_field['uid'] = $member['uid'];
         foreach ($fields_list as $key => $val) {
             $map_field['field_id'] = $val['id'];
             $field_data = D('field')->where($map_field)->getField('field_data');
             if ($field_data == null || $field_data == '') {
                 $member[$key] = '';
             } else {
                 $member[$key] = $field_data;
             }
             $member[$key] = $field_data;
         }
         $builder = new AdminConfigBuilder();
         $builder->title("用戶擴展資料詳情");
         $builder->meta_title = '用戶擴展資料詳情';
         $builder->keyId()->keyReadOnly('username', "用戶名稱")->keyReadOnly('nickname', '昵稱');
         $field_key = array('id', 'username', 'nickname');
         foreach ($fields_list as $vt) {
             $field_key[] = $vt['field_name'];
             $builder->keyReadOnly($vt['field_name'], $vt['field_name']);
         }
         /* 積分設置 xjw129xjt(肖駿濤)*/
         $field = D('Ucenter/Score')->getTypeList(array('status' => 1));
         $score_key = array();
         foreach ($field as $vf) {
             $score_key[] = 'score' . $vf['id'];
             $builder->keyText('score' . $vf['id'], $vf['title']);
         }
         $score_data = D('Member')->where(array('uid' => $uid))->field(implode(',', $score_key))->find();
         $member = array_merge($member, $score_data);
         /*積分設置end*/
         $builder->data($member);
         /*身份設置 zzl(鄭鍾良)*/
         $already_role = D('UserRole')->where(array('uid' => $uid, 'status' => 1))->field('role_id')->select();
         if (count($already_role)) {
             $already_role = array_column($already_role, 'role_id');
         }
         $roleModel = D('Role');
         $role_key = array();
         $no_group_role = $roleModel->where(array('group_id' => 0, 'status' => 1))->select();
         if (count($no_group_role)) {
             $role_key[] = 'role';
             $no_group_role_options = $already_no_group_role = array();
             foreach ($no_group_role as $val) {
                 if (in_array($val['id'], $already_role)) {
                     $already_no_group_role[] = $val['id'];
                 }
                 $no_group_role_options[$val['id']] = $val['title'];
             }
             $builder->keyCheckBox('role', '無分組身份', '可以多選', $no_group_role_options)->keyDefault('role', implode(',', $already_no_group_role));
         }
         $role_group = D('RoleGroup')->select();
         foreach ($role_group as $group) {
             $group_role = $roleModel->where(array('group_id' => $group['id'], 'status' => 1))->select();
             if (count($group_role)) {
                 $role_key[] = 'role' . $group['id'];
                 $group_role_options = $already_group_role = array();
                 foreach ($group_role as $val) {
                     if (in_array($val['id'], $already_role)) {
                         $already_group_role = $val['id'];
                     }
                     $group_role_options[$val['id']] = $val['title'];
                 }
                 $builder->keyRadio('role' . $group['id'], '分組[' . $group['title'] . ']身份', '同一分組下用戶最多隻能擁有其中一個身份', $group_role_options)->keyDefault('role' . $group['id'], $already_group_role);
             }
         }
         /*身份設置 end*/
         $builder->group('基本設置', implode(',', $field_key));
         $builder->group('積分設置', implode(',', $score_key));
         $builder->group('身份設置', implode(',', $role_key));
         $builder->buttonSubmit('', '保存');
         $builder->buttonBack();
         $builder->display();
     }
 }
開發者ID:ccccy,項目名稱:wuanlife,代碼行數:101,代碼來源:UserController.class.php

示例4: expandinfo_details

 public function expandinfo_details($uid = 0)
 {
     $map['uid'] = $uid;
     $map['status'] = array('egt', 0);
     $member = M('Member')->where($map)->find();
     $member['id'] = $member['uid'];
     //擴展信息查詢
     $map_profile['status'] = 1;
     $field_group = D('field_group')->where($map_profile)->select();
     $field_group_ids = array_column($field_group, 'id');
     $map_profile['profile_group_id'] = array('in', $field_group_ids);
     $fields_list = D('field_setting')->where($map_profile)->getField('id,field_name,form_type');
     $fields_list = array_combine(array_column($fields_list, 'field_name'), $fields_list);
     $map_field['uid'] = $member['uid'];
     foreach ($fields_list as $key => $val) {
         $map_field['field_id'] = $val['id'];
         $field_data = D('field')->where($map_field)->getField('field_data');
         if ($field_data == null || $field_data == '') {
             $member[$key] = '';
         } else {
             $member[$key] = $field_data;
         }
         $member[$key] = $field_data;
     }
     $builder = new AdminConfigBuilder();
     $builder->title("用戶擴展資料詳情");
     $builder->meta_title = '用戶擴展資料詳情';
     $builder->keyId()->keyReadOnly('nickname', "用戶名稱");
     foreach ($fields_list as $vt) {
         $builder->keyReadOnly($vt['field_name'], $vt['field_name']);
     }
     $builder->data($member);
     $builder->buttonBack();
     $builder->display();
 }
開發者ID:yaomoo,項目名稱:bbs,代碼行數:35,代碼來源:UserController.class.php

示例5: install

 public function install()
 {
     $aName = I('get.name', '', 'text');
     $aNav = I('add_nav', 0, 'intval');
     $module = $this->moduleModel->getModule($aName);
     if (IS_POST) {
         //執行guide中的內容
         $res = $this->moduleModel->install($module['id']);
         if ($res === true) {
             if ($aNav) {
                 $channel['title'] = $module['alias'];
                 $channel['url'] = $module['entry'];
                 $channel['sort'] = 100;
                 $channel['status'] = 1;
                 $channel['icon'] = $module['icon'];
                 M('Channel')->add($channel);
                 S('common_nav', null);
             }
             $this->success('安裝模塊成功。', U('lists'));
         } else {
             $this->error('安裝模塊失敗。' . $this->moduleModel->getError());
         }
     } else {
         $builder = new AdminConfigBuilder();
         $builder->title($module['alias'] . '——模塊安裝向導');
         $builder->keyId()->keyReadOnly('name', '模塊名')->keyText('alias', '模塊中文名')->keyReadOnly('version', '版本')->keyText('icon', '圖標')->keyTextArea('summary', '模塊介紹')->keyReadOnly('developer', '開發者')->keyText('entry', '前台入口')->keyText('admin_entry', '後台入口');
         //, 'repair' => '修複模式'修複模式不會導入模塊專用數據表,隻導入菜單、權限、行為、行為限製
         $builder->keyRadio('mode', '安裝模式', '', array('install' => '覆蓋安裝模式'));
         if ($module['entry']) {
             $builder->keyBool('add_nav', '添加導航', '安裝後自動在導航欄中加入菜單,或者<a target="_blank" href="' . U('channel/index') . '">手動設置</a>');
         }
         /*   $builder->keyRadio('add_nav','添加導航菜單','默認不會添加導航',array(1=>'不添加',2=>'添加'));*/
         $builder->group('安裝選項', 'mode,add_nav');
         /* $builder->group('模塊信息', 'id,name,alias,version,icon,summary,developer,entry,admin_entry');*/
         $module['mode'] = 'install';
         $module['add_nav'] = '1';
         $builder->data($module);
         $builder->buttonSubmit();
         $builder->buttonBack();
         $builder->display();
     }
     /*  */
 }
開發者ID:ccccy,項目名稱:wuanlife,代碼行數:43,代碼來源:ModuleController.class.php

示例6: expandinfo_details

 /**
  * 用戶擴展資料詳情
  * @param string $uid
  * @author 鄭鍾良<zzl@ourstu.com>
  */
 public function expandinfo_details($uid = 0)
 {
     if (IS_POST) {
         /* 修改積分 xjw129xjt(肖駿濤)*/
         $data = I('post.');
         foreach ($data as $key => $val) {
             if (substr($key, 0, 5) == 'score') {
                 $data_score[$key] = $val;
             }
         }
         $res = D('Member')->where(array('uid' => $data['id']))->save($data_score);
         if ($res) {
             $this->success('設置成功');
         } else {
             $this->error('設置失敗');
         }
         /* 修改積分 end*/
     } else {
         $map['uid'] = $uid;
         $map['status'] = array('egt', 0);
         $member = M('Member')->where($map)->find();
         $member['id'] = $member['uid'];
         $member['username'] = query_user('username', $uid);
         //擴展信息查詢
         $map_profile['status'] = 1;
         $field_group = D('field_group')->where($map_profile)->select();
         $field_group_ids = array_column($field_group, 'id');
         $map_profile['profile_group_id'] = array('in', $field_group_ids);
         $fields_list = D('field_setting')->where($map_profile)->getField('id,field_name,form_type');
         $fields_list = array_combine(array_column($fields_list, 'field_name'), $fields_list);
         $map_field['uid'] = $member['uid'];
         foreach ($fields_list as $key => $val) {
             $map_field['field_id'] = $val['id'];
             $field_data = D('field')->where($map_field)->getField('field_data');
             if ($field_data == null || $field_data == '') {
                 $member[$key] = '';
             } else {
                 $member[$key] = $field_data;
             }
             $member[$key] = $field_data;
         }
         $builder = new AdminConfigBuilder();
         $builder->title('用戶擴展資料詳情');
         $builder->meta_title = '用戶擴展資料詳情';
         $builder->keyId()->keyReadOnly('username', '用戶名稱')->keyReadOnly('nickname', '昵稱');
         $field_key = array('id', 'username', 'nickname');
         foreach ($fields_list as $vt) {
             $field_key[] = $vt['field_name'];
             $builder->keyReadOnly($vt['field_name'], $vt['field_name']);
         }
         /* 積分設置 xjw129xjt(肖駿濤)*/
         $field = D('Ucenter/Score')->getTypeList(array('status' => 1));
         $score_key = array();
         foreach ($field as $vf) {
             $score_key[] = 'score' . $vf['id'];
             $builder->keyText('score' . $vf['id'], $vf['title']);
         }
         $score_data = D('Member')->where(array('uid' => $uid))->field(implode(',', $score_key))->find();
         $member = array_merge($member, $score_data);
         /*積分設置end*/
         $builder->group('基本設置', implode(',', $field_key));
         $builder->group('積分設置', implode(',', $score_key));
         $builder->data($member);
         $builder->buttonSubmit('', '保存');
         $builder->buttonBack();
         $builder->display();
     }
 }
開發者ID:admpub,項目名稱:OpenCenter,代碼行數:73,代碼來源:UserController.class.php

示例7: goodsEdit

 /**
  * @param int $id
  * @param $goods_name
  * @param $goods_ico
  * @param $goods_introduct
  * @param $goods_detail
  * @param $money_need
  * @param $goods_num
  * @param $status
  * @param $category_id
  * @param $is_new
  * @param $sell_num
  * @author 鄭鍾良<zzl@ourstu.com>
  */
 public function goodsEdit($id = 0, $goods_name = '', $goods_ico = '', $goods_introduct = '', $goods_detail = '', $money_need = '', $goods_num = '', $status = '', $category_id = 0, $is_new = 0, $sell_num = 0)
 {
     $isEdit = $id ? 1 : 0;
     if (IS_POST) {
         if ($goods_name == '' || $goods_name == null) {
             $this->error('請輸入商品名稱');
         }
         if (!is_numeric($goods_ico)) {
             $this->error('請上傳商品圖標');
         }
         if ($goods_introduct == '' || $goods_introduct == null) {
             if ($goods_detail == '' || $goods_detail == null) {
                 $this->error('請輸入商品廣告語');
             } else {
                 $goods_introduct = substr($goods_detail, 0, 25);
             }
         }
         if (!(is_numeric($money_need) && $money_need >= 0)) {
             $this->error('請正確輸入商品價格');
         }
         if (!(is_numeric($goods_num) && $goods_num >= 0)) {
             $this->error('請正確輸入商品剩餘量');
         }
         if (!(is_numeric($sell_num) && $sell_num >= 0)) {
             $this->error('請正確輸入商品已售量');
         }
         $goods['goods_name'] = $goods_name;
         $goods['goods_ico'] = $goods_ico;
         $goods['goods_introduct'] = $goods_introduct;
         $goods['goods_detail'] = $goods_detail;
         $goods['money_need'] = $money_need;
         $goods['goods_num'] = $goods_num;
         $goods['status'] = $status;
         $goods['category_id'] = $category_id;
         $goods['is_new'] = $is_new;
         $goods['sell_num'] = $sell_num;
         $goods['changetime'] = time();
         if ($isEdit) {
             $rs = $this->shopModel->where('id=' . $id)->save($goods);
         } else {
             //商品名存在驗證
             $map['status'] = array('egt', 0);
             $map['goods_name'] = $goods_name;
             if ($this->shopModel->where($map)->count()) {
                 $this->error('已存在同名商品');
             }
             $goods['createtime'] = time();
             $rs = $this->shopModel->add($goods);
         }
         if ($rs) {
             $this->success($isEdit ? '編輯成功' : '添加成功', U('Shop/goodsList'));
         } else {
             $this->error($isEdit ? '編輯失敗' : '添加失敗');
         }
     } else {
         $builder = new AdminConfigBuilder();
         $builder->title($isEdit ? '編輯商品' : '添加商品');
         $builder->meta_title = $isEdit ? '編輯商品' : '添加商品';
         //獲取分類列表
         $category_map['status'] = array('egt', 0);
         $goods_category_list = $this->shop_categoryModel->where($category_id)->order('pid desc')->select();
         $options = array_combine(array_column($goods_category_list, 'id'), array_column($goods_category_list, 'title'));
         $builder->keyId()->keyText('goods_name', '商品名稱')->keySingleImage('goods_ico', '商品圖標')->keySelect('category_id', '商品分類', '', $options)->keyText('goods_introduct', '商品廣告語')->keyEditor('goods_detail', '商品詳情')->keyInteger('money_need', '商品價格')->keyInteger('goods_num', '商品餘量')->keyInteger('sell_num', '已售出量')->keyBool('is_new', '是否為新品')->keyStatus('status', '出售狀態');
         if ($isEdit) {
             $goods = $this->shopModel->where('id=' . $id)->find();
             $builder->data($goods);
             $builder->buttonSubmit(U('Shop/goodsEdit'));
             $builder->buttonBack();
             $builder->display();
         } else {
             $goods['status'] = 1;
             $builder->buttonSubmit(U('Shop/goodsEdit'));
             $builder->buttonBack();
             $builder->data($goods);
             $builder->display();
         }
     }
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:92,代碼來源:ShopController.class.php


注:本文中的Admin\Builder\AdminConfigBuilder::buttonBack方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。