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


PHP AdminConfigBuilder::data方法代碼示例

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


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

示例1: config

 public function config()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $builder->title('基本配置');
     $builder->keyText('WEBSITE_NAME', '網站名稱顯示')->keyEditor('COPY_RIGHT', '網站版權信息')->group('通用設置', 'WEBSITE_NAME,COPY_RIGHT');
     $builder->keyTextArea('SUMMARY', '登陸頁導語', '不要過長,一句話即可')->group('登陸頁設置', 'SUMMARY');
     $builder->buttonSubmit();
     $builder->data($data);
     $builder->display();
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:11,代碼來源:MobController.class.php

示例2: config

 public function config()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $builder->title(L('_BASIC_CONF_'));
     $data['MAX_SHOW_HEIGHT'] = $data['MAX_SHOW_HEIGHT'] ? $data['MAX_SHOW_HEIGHT'] : 160;
     $builder->keyInteger('MAX_SHOW_HEIGHT', L('_MAX_SHOW_HEIGHT_'))->keyDefault('MAX_SHOW_HEIGHT', 160);
     $role_list = M('Role')->where(array('status' => 1))->field('id,title')->select();
     foreach ($role_list as &$val) {
         $val = array('data-id' => $val['id'], 'title' => $val['title']);
     }
     unset($val);
     $default = array(array('data-id' => 'disable', 'title' => L('_DISABLE_'), 'items' => $role_list), array('data-id' => 'enable', 'title' => L('_ENABLED_'), 'items' => array()));
     $builder->keyKanban('SHOW_ROLE_TAB', L('_IDENTITY_TAB_'), L('_IDENTITY_TAB_AFFIX_'));
     $data['SHOW_ROLE_TAB'] = $builder->parseKanbanArray($data['SHOW_ROLE_TAB'], $role_list, $default);
     $builder->group(L('_BASIC_CONF_'), 'MAX_SHOW_HEIGHT,SHOW_ROLE_TAB');
     $data['USER_SHOW_TITLE1'] = $data['USER_SHOW_TITLE1'] ? $data['USER_SHOW_TITLE1'] : L('_ACTIVE_MEMBER_');
     $data['USER_SHOW_COUNT1'] = $data['USER_SHOW_COUNT1'] ? $data['USER_SHOW_COUNT1'] : 5;
     $data['USER_SHOW_ORDER_FIELD1'] = $data['USER_SHOW_ORDER_FIELD1'] ? $data['USER_SHOW_ORDER_FIELD1'] : 'score1';
     $data['USER_SHOW_ORDER_TYPE1'] = $data['USER_SHOW_ORDER_TYPE1'] ? $data['USER_SHOW_ORDER_TYPE1'] : 'desc';
     $data['USER_SHOW_CACHE_TIME1'] = $data['USER_SHOW_CACHE_TIME1'] ? $data['USER_SHOW_CACHE_TIME1'] : '600';
     $data['USER_SHOW_TITLE2'] = $data['USER_SHOW_TITLE2'] ? $data['USER_SHOW_TITLE2'] : L('_NEW_MEMBER_');
     $data['USER_SHOW_COUNT2'] = $data['USER_SHOW_COUNT2'] ? $data['USER_SHOW_COUNT2'] : 5;
     $data['USER_SHOW_ORDER_FIELD2'] = $data['USER_SHOW_ORDER_FIELD2'] ? $data['USER_SHOW_ORDER_FIELD2'] : 'reg_time';
     $data['USER_SHOW_ORDER_TYPE2'] = $data['USER_SHOW_ORDER_TYPE2'] ? $data['USER_SHOW_ORDER_TYPE2'] : 'desc';
     $data['USER_SHOW_CACHE_TIME2'] = $data['USER_SHOW_CACHE_TIME2'] ? $data['USER_SHOW_CACHE_TIME2'] : '600';
     $score = D("Ucenter/Score")->getTypeList(array('status' => 1));
     $order['reg_time'] = L('_REGISTER_TIME_');
     $order['last_login_time'] = L('_LAST_LOGIN_TIME_');
     foreach ($score as $s) {
         $order['score' . $s['id']] = '【' . $s['title'] . '】';
     }
     $builder->keyText('USER_SHOW_TITLE1', L('_TITLE_NAME_'), L('_BLOCK_TITLE_'));
     $builder->keyText('USER_SHOW_COUNT1', L('_SHOW_PEOPLE_'), L('_TIP_AFTER_ENABLED_'));
     $builder->keyRadio('USER_SHOW_ORDER_FIELD1', L('_SORT_NUMBER_'), L('_SHOW_SORT_STYLE_'), $order);
     $builder->keyRadio('USER_SHOW_ORDER_TYPE1', L('_SORT_STYLE_'), L('_SHOW_SORT_STYLE_'), array('desc' => L('_COUNTER_'), 'asc' => L('_DIRECT_')));
     $builder->keyText('USER_SHOW_CACHE_TIME1', L('_CACHE_TIME_'), L('_TIP_CACHE_TIME_'));
     $builder->keyText('USER_SHOW_TITLE2', L('_TITLE_NAME_'), L('_BLOCK_TITLE_'));
     $builder->keyText('USER_SHOW_COUNT2', L('_SHOW_PEOPLE_'), L('_TIP_AFTER_ENABLED_'));
     $builder->keyRadio('USER_SHOW_ORDER_FIELD2', L('_SORT_NUMBER_'), L('_SHOW_SORT_STYLE_'), $order);
     $builder->keyRadio('USER_SHOW_ORDER_TYPE2', L('_SORT_STYLE_'), L('_SHOW_SORT_STYLE_'), array('desc' => L('_COUNTER_'), 'asc' => L('_DIRECT_')));
     $builder->keyText('USER_SHOW_CACHE_TIME2', L('_CACHE_TIME_'), L('_TIP_CACHE_TIME_'));
     $builder->group(L('_HOME_SHOW_LEFT_'), 'USER_SHOW_TITLE1,USER_SHOW_COUNT1,USER_SHOW_ORDER_FIELD1,USER_SHOW_ORDER_TYPE1,USER_SHOW_CACHE_TIME1');
     $builder->group(L('_HOME_SHOW_RIGHT_'), 'USER_SHOW_TITLE2,USER_SHOW_COUNT2,USER_SHOW_ORDER_FIELD2,USER_SHOW_ORDER_TYPE2,USER_SHOW_CACHE_TIME2');
     $builder->data($data);
     $builder->buttonSubmit();
     $builder->display();
 }
開發者ID:naliduo,項目名稱:Lightweight-social-platform,代碼行數:48,代碼來源:PeopleController.class.php

示例3: config

 public function config()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $builder->title('基本設置');
     $data['MAX_SHOW_HEIGHT'] = $data['MAX_SHOW_HEIGHT'] ? $data['MAX_SHOW_HEIGHT'] : 160;
     $builder->keyInteger('MAX_SHOW_HEIGHT', '標簽麵板初始最大展示高度')->keyDefault('MAX_SHOW_HEIGHT', 160);
     $role_list = M('Role')->where(array('status' => 1))->field('id,title')->select();
     foreach ($role_list as &$val) {
         $val = array('data-id' => $val['id'], 'title' => $val['title']);
     }
     unset($val);
     $default = array(array('data-id' => 'disable', 'title' => '禁用', 'items' => $role_list), array('data-id' => 'enable', 'title' => '啟用', 'items' => array()));
     $builder->keyKanban('SHOW_ROLE_TAB', '找人界麵展示身份tab', '拖拽到右側以展示這些身份tab,操作的項目對應係統身份');
     $data['SHOW_ROLE_TAB'] = $builder->parseKanbanArray($data['SHOW_ROLE_TAB'], $role_list, $default);
     $builder->group('基本設置', 'MAX_SHOW_HEIGHT,SHOW_ROLE_TAB');
     $data['USER_SHOW_TITLE1'] = $data['USER_SHOW_TITLE1'] ? $data['USER_SHOW_TITLE1'] : '活躍會員';
     $data['USER_SHOW_COUNT1'] = $data['USER_SHOW_COUNT1'] ? $data['USER_SHOW_COUNT1'] : 5;
     $data['USER_SHOW_ORDER_FIELD1'] = $data['USER_SHOW_ORDER_FIELD1'] ? $data['USER_SHOW_ORDER_FIELD1'] : 'score1';
     $data['USER_SHOW_ORDER_TYPE1'] = $data['USER_SHOW_ORDER_TYPE1'] ? $data['USER_SHOW_ORDER_TYPE1'] : 'desc';
     $data['USER_SHOW_CACHE_TIME1'] = $data['USER_SHOW_CACHE_TIME1'] ? $data['USER_SHOW_CACHE_TIME1'] : '600';
     $data['USER_SHOW_TITLE2'] = $data['USER_SHOW_TITLE2'] ? $data['USER_SHOW_TITLE2'] : '最新會員';
     $data['USER_SHOW_COUNT2'] = $data['USER_SHOW_COUNT2'] ? $data['USER_SHOW_COUNT2'] : 5;
     $data['USER_SHOW_ORDER_FIELD2'] = $data['USER_SHOW_ORDER_FIELD2'] ? $data['USER_SHOW_ORDER_FIELD2'] : 'reg_time';
     $data['USER_SHOW_ORDER_TYPE2'] = $data['USER_SHOW_ORDER_TYPE2'] ? $data['USER_SHOW_ORDER_TYPE2'] : 'desc';
     $data['USER_SHOW_CACHE_TIME2'] = $data['USER_SHOW_CACHE_TIME2'] ? $data['USER_SHOW_CACHE_TIME2'] : '600';
     $score = D("Ucenter/Score")->getTypeList(array('status' => 1));
     $order['reg_time'] = '注冊時間';
     $order['last_login_time'] = '最後登錄時間';
     foreach ($score as $s) {
         $order['score' . $s['id']] = '【' . $s['title'] . '】';
     }
     $builder->keyText('USER_SHOW_TITLE1', '標題名稱', '在首頁展示塊的標題');
     $builder->keyText('USER_SHOW_COUNT1', '顯示人數', '隻有在網站首頁模塊中啟用了專輯塊之後才會顯示');
     $builder->keyRadio('USER_SHOW_ORDER_FIELD1', '排序值', '展示模塊的數據排序方式', $order);
     $builder->keyRadio('USER_SHOW_ORDER_TYPE1', '排序方式', '展示模塊的數據排序方式', array('desc' => '倒序,從大到小', 'asc' => '正序,從小到大'));
     $builder->keyText('USER_SHOW_CACHE_TIME1', '緩存時間', '默認600秒,以秒為單位');
     $builder->keyText('USER_SHOW_TITLE2', '標題名稱', '在首頁展示塊的標題');
     $builder->keyText('USER_SHOW_COUNT2', '顯示人數', '隻有在網站首頁模塊中啟用了專輯塊之後才會顯示');
     $builder->keyRadio('USER_SHOW_ORDER_FIELD2', '排序值', '展示模塊的數據排序方式', $order);
     $builder->keyRadio('USER_SHOW_ORDER_TYPE2', '排序方式', '展示模塊的數據排序方式', array('desc' => '倒序,從大到小', 'asc' => '正序,從小到大'));
     $builder->keyText('USER_SHOW_CACHE_TIME2', '緩存時間', '默認600秒,以秒為單位');
     $builder->group('首頁展示左側欄', 'USER_SHOW_TITLE1,USER_SHOW_COUNT1,USER_SHOW_ORDER_FIELD1,USER_SHOW_ORDER_TYPE1,USER_SHOW_CACHE_TIME1');
     $builder->group('首頁展示右側欄', 'USER_SHOW_TITLE2,USER_SHOW_COUNT2,USER_SHOW_ORDER_FIELD2,USER_SHOW_ORDER_TYPE2,USER_SHOW_CACHE_TIME2');
     $builder->data($data);
     $builder->buttonSubmit();
     $builder->display();
 }
開發者ID:ccccy,項目名稱:wuanlife,代碼行數:48,代碼來源:PeopleController.class.php

示例4: config

 public function config()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $data['OPEN_LOGIN_PANEL'] = $data['OPEN_LOGIN_PANEL'] ? $data['OPEN_LOGIN_PANEL'] : 1;
     $builder->title('首頁設置');
     $modules = D('Common/Module')->getAll();
     foreach ($modules as $m) {
         if ($m['is_setup'] == 1 && $m['entry'] != '') {
             if (file_exists(APP_PATH . $m['name'] . '/Widget/HomeBlockWidget.class.php')) {
                 $module[] = array('data-id' => $m['name'], 'title' => $m['alias']);
             }
         }
     }
     $module[] = array('data-id' => 'slider', 'title' => '輪播');
     $default = array(array('data-id' => 'disable', 'title' => '禁用', 'items' => $module), array('data-id' => 'enable', 'title' => '啟用', 'items' => array()));
     $builder->keyKanban('BLOCK', '展示模塊', '拖拽到右側以展示這些模塊,新的模塊安裝後會多出一些可操作的項目');
     $data['BLOCK'] = $builder->parseKanbanArray($data['BLOCK'], $module, $default);
     $builder->group('展示模塊', 'BLOCK');
     $builder->keySingleImage('PIC1', '圖片');
     $builder->keyText('URL1', '鏈接');
     $builder->keyText('TITLE1', '標題');
     $builder->keyRadio('TARGET1', '新窗口打開', '', array('_blank' => '新窗口', '_self' => '本窗口'));
     $builder->group('幻燈片1', 'PIC1,URL1,TITLE1,TARGET1');
     $builder->keySingleImage('PIC2', '圖片');
     $builder->keyText('URL2', '鏈接');
     $builder->keyText('TITLE2', '標題');
     $builder->keyRadio('TARGET2', '新窗口打開', '', array('_blank' => '新窗口', '_self' => '本窗口'));
     $builder->group('幻燈片2', 'PIC2,URL2,TITLE2,TARGET2');
     $builder->keySingleImage('PIC3', '圖片');
     $builder->keyText('URL3', '鏈接');
     $builder->keyText('TITLE3', '標題');
     $builder->keyRadio('TARGET3', '新窗口打開', '', array('_blank' => '新窗口', '_self' => '本窗口'));
     $builder->group('幻燈片3', 'PIC3,URL3,TITLE3,TARGET3');
     $show_blocks = get_kanban_config('BLOCK_SORT', 'enable', array(), 'Home');
     $builder->buttonSubmit();
     $builder->data($data);
     $builder->display();
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:39,代碼來源:HomeController.class.php

示例5: config

 public function config()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $data['OPEN_LOGIN_PANEL'] = $data['OPEN_LOGIN_PANEL'] ? $data['OPEN_LOGIN_PANEL'] : 1;
     $builder->title(L('_HOME_SETTING_'));
     $modules = D('Common/Module')->getAll();
     foreach ($modules as $m) {
         if ($m['is_setup'] == 1 && $m['entry'] != '') {
             if (file_exists(APP_PATH . $m['name'] . '/Widget/HomeBlockWidget.class.php')) {
                 $module[] = array('data-id' => $m['name'], 'title' => $m['alias']);
             }
         }
     }
     $module[] = array('data-id' => 'slider', 'title' => L('_CAROUSEL_'));
     $default = array(array('data-id' => 'disable', 'title' => L('_DISABLED_'), 'items' => $module), array('data-id' => 'enable', 'title' => L('_ENABLED_'), 'items' => array()));
     $builder->keyKanban('BLOCK', L('_DISPLAY_BLOCK_'), L('_TIP_DISPLAY_BLOCK_'));
     $data['BLOCK'] = $builder->parseKanbanArray($data['BLOCK'], $module, $default);
     $builder->group(L('_DISPLAY_BLOCK_'), 'BLOCK');
     $builder->keySingleImage('PIC1', L('_PICTURE_'));
     $builder->keyText('URL1', L('_LINK_'));
     $builder->keyText('TITLE1', L('_TITLE_'));
     $builder->keyRadio('TARGET1', L('_NEW_WINDOW_OPEN_'), '', array('_blank' => L('_NEW_WINDOW_'), '_self' => L('_SELF_WINDOW_')));
     $builder->group(L('_SLIDE1_'), 'PIC1,URL1,TITLE1,TARGET1');
     $builder->keySingleImage('PIC2', L('_PICTURE_'));
     $builder->keyText('URL2', L('_LINK_'));
     $builder->keyText('TITLE2', L('_TITLE_'));
     $builder->keyRadio('TARGET2', L('_NEW_WINDOW_OPEN_'), '', array('_blank' => L('_NEW_WINDOW_'), '_self' => L('_SELF_WINDOW_')));
     $builder->group(L('_SLIDE2_'), 'PIC2,URL2,TITLE2,TARGET2');
     $builder->keySingleImage('PIC3', L('_PICTURE_'));
     $builder->keyText('URL3', L('_LINK_'));
     $builder->keyText('TITLE3', L('_TITLE_'));
     $builder->keyRadio('TARGET3', L('_NEW_WINDOW_OPEN_'), '', array('_blank' => L('_NEW_WINDOW_'), '_self' => L('_SELF_WINDOW_')));
     $builder->group(L('_SLIDE3_'), 'PIC3,URL3,TITLE3,TARGET3');
     $show_blocks = get_kanban_config('BLOCK_SORT', 'enable', array(), 'Home');
     $builder->buttonSubmit();
     $builder->data($data);
     $builder->display();
 }
開發者ID:sunjie20081001,項目名稱:sns,代碼行數:39,代碼來源:HomeController.class.php

示例6: config

 public function config()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $builder->title('基本設置');
     $data['USER_SHOW_TITLE1'] = $data['USER_SHOW_TITLE1'] ? $data['USER_SHOW_TITLE1'] : '活躍會員';
     $data['USER_SHOW_COUNT1'] = $data['USER_SHOW_COUNT1'] ? $data['USER_SHOW_COUNT1'] : 5;
     $data['USER_SHOW_ORDER_FIELD1'] = $data['USER_SHOW_ORDER_FIELD1'] ? $data['USER_SHOW_ORDER_FIELD1'] : 'score1';
     $data['USER_SHOW_ORDER_TYPE1'] = $data['USER_SHOW_ORDER_TYPE1'] ? $data['USER_SHOW_ORDER_TYPE1'] : 'desc';
     $data['USER_SHOW_CACHE_TIME1'] = $data['USER_SHOW_CACHE_TIME1'] ? $data['USER_SHOW_CACHE_TIME1'] : '600';
     $data['USER_SHOW_TITLE2'] = $data['USER_SHOW_TITLE2'] ? $data['USER_SHOW_TITLE2'] : '最新會員';
     $data['USER_SHOW_COUNT2'] = $data['USER_SHOW_COUNT2'] ? $data['USER_SHOW_COUNT2'] : 5;
     $data['USER_SHOW_ORDER_FIELD2'] = $data['USER_SHOW_ORDER_FIELD2'] ? $data['USER_SHOW_ORDER_FIELD2'] : 'reg_time';
     $data['USER_SHOW_ORDER_TYPE2'] = $data['USER_SHOW_ORDER_TYPE2'] ? $data['USER_SHOW_ORDER_TYPE2'] : 'desc';
     $data['USER_SHOW_CACHE_TIME2'] = $data['USER_SHOW_CACHE_TIME2'] ? $data['USER_SHOW_CACHE_TIME2'] : '600';
     $score = D("Ucenter/Score")->getTypeList(array('status' => 1));
     $order['reg_time'] = '注冊時間';
     $order['last_login_time'] = '最後登錄時間';
     foreach ($score as $s) {
         $order['score' . $s['id']] = '【' . $s['title'] . '】';
     }
     $builder->keyText('USER_SHOW_TITLE1', '標題名稱', '在首頁展示塊的標題');
     $builder->keyText('USER_SHOW_COUNT1', '顯示人數', '隻有在網站首頁模塊中啟用了專輯塊之後才會顯示');
     $builder->keyRadio('USER_SHOW_ORDER_FIELD1', '排序值', '展示模塊的數據排序方式', $order);
     $builder->keyRadio('USER_SHOW_ORDER_TYPE1', '排序方式', '展示模塊的數據排序方式', array('desc' => '倒序,從大到小', 'asc' => '正序,從小到大'));
     $builder->keyText('USER_SHOW_CACHE_TIME1', '緩存時間', '默認600秒,以秒為單位');
     $builder->keyText('USER_SHOW_TITLE2', '標題名稱', '在首頁展示塊的標題');
     $builder->keyText('USER_SHOW_COUNT2', '顯示人數', '隻有在網站首頁模塊中啟用了專輯塊之後才會顯示');
     $builder->keyRadio('USER_SHOW_ORDER_FIELD2', '排序值', '展示模塊的數據排序方式', $order);
     $builder->keyRadio('USER_SHOW_ORDER_TYPE2', '排序方式', '展示模塊的數據排序方式', array('desc' => '倒序,從大到小', 'asc' => '正序,從小到大'));
     $builder->keyText('USER_SHOW_CACHE_TIME2', '緩存時間', '默認600秒,以秒為單位');
     $builder->group('首頁展示左側欄', 'USER_SHOW_TITLE1,USER_SHOW_COUNT1,USER_SHOW_ORDER_FIELD1,USER_SHOW_ORDER_TYPE1,USER_SHOW_CACHE_TIME1');
     $builder->group('首頁展示右側欄', 'USER_SHOW_TITLE2,USER_SHOW_COUNT2,USER_SHOW_ORDER_FIELD2,USER_SHOW_ORDER_TYPE2,USER_SHOW_CACHE_TIME2');
     $builder->data($data);
     $builder->buttonSubmit();
     $builder->display();
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:37,代碼來源:PeopleController.class.php

示例7: config

 public function config()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $data['OPEN_LOGIN_PANEL'] = $data['OPEN_LOGIN_PANEL'] ? $data['OPEN_LOGIN_PANEL'] : 1;
     $builder->title(L('_HOME_SETTING_'));
     $modules = D('Common/Module')->getAll();
     foreach ($modules as $m) {
         if ($m['is_setup'] == 1 && $m['entry'] != '') {
             if (file_exists(APP_PATH . $m['name'] . '/Widget/HomeBlockWidget.class.php')) {
                 $module[] = array('data-id' => $m['name'], 'title' => $m['alias']);
             }
         }
     }
     $module[] = array('data-id' => 'slider', 'title' => L('_CAROUSEL_'));
     $default = array(array('data-id' => 'disable', 'title' => L('_DISABLED_'), 'items' => $module), array('data-id' => 'enable', 'title' => L('_ENABLED_'), 'items' => array()));
     $builder->keyKanban('BLOCK', L('_DISPLAY_BLOCK_'), L('_TIP_DISPLAY_BLOCK_'));
     $data['BLOCK'] = $builder->parseKanbanArray($data['BLOCK'], $module, $default);
     $builder->group(L('_DISPLAY_BLOCK_'), 'BLOCK');
     $show_blocks = get_kanban_config('BLOCK_SORT', 'enable', array(), 'Home');
     $builder->buttonSubmit();
     $builder->data($data);
     $builder->display();
 }
開發者ID:weihuagu,項目名稱:commonmodel,代碼行數:24,代碼來源:HomeController.class.php

示例8: addType

 public function addType()
 {
     if (IS_POST) {
         $aId = I('post.id', 0, 'intval');
         $aTitle = I('title', '', 'text');
         $aEntity = I('entity', 1, 'intval');
         $aSort = I('sort', 0, 'intval');
         $aTitle = $aTitle == '' ? $this->error('分類名稱必填') : $aTitle;
         $data['title'] = $aTitle;
         $data['sort'] = $aSort;
         $data['entity'] = $aEntity;
         $data['status'] = 1;
         if ($aId != 0) {
             //存儲
             $data['id'] = $aId;
             $rs = M('AppstoreType')->save($data);
         } else {
             $rs = M('AppstoreType')->add($data);
         }
         if ($rs === false) {
             $this->error('保存失敗。');
         } else {
             $this->success('保存成功。');
         }
     } else {
         $id = I('id', 0, 'intval');
         if ($id != 0) {
             $data = M('AppstoreType')->find($id);
         } else {
             $entity = I('entity', 1, 'intval');
             if ($entity == 0) {
                 $entity = 1;
             }
             $data['entity'] = $entity;
             $data['status'] = 1;
             $data['sort'] = 0;
         }
         $builder = new AdminConfigBuilder();
         $builder->title('新增分類');
         $builder->keyId();
         $builder->keyTitle();
         $builder->keyRadio('entity', '分類所屬', '', array('1' => '插件', 2 => '模塊', '3' => '主題', 4 => '服務'))->keyInteger('sort', '排序')->keyStatus();
         $builder->data($data)->buttonSubmit();
         $builder->display();
     }
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:46,代碼來源:AppstoreController.class.php

示例9: website

 public function website()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $builder->title('網站信息')->suggest('此處配置網站的一般信息。');
     $builder->keyText('WEB_SITE_NAME', '網站名', '用於郵件,短信,站內信顯示');
     $builder->keyText('ICP', '網站備案號', '設置在網站底部顯示的備案號,如“滬ICP備12007941號-2');
     $builder->keySingleImage('LOGO', '網站Logo', '網站的logo設置,建議尺寸156*50');
     $builder->keySingleImage('QRCODE', '微信二維碼', '懸浮微信二維碼');
     $builder->keySingleImage('JUMP_BACKGROUND', '跳轉頁背景圖片', '跳轉頁背景圖片');
     $builder->keyText('SUCCESS_WAIT_TIME', '成功等待時間', '設置成功時頁麵等待頁麵');
     $builder->keyText('ERROR_WAIT_TIME', '失敗等待時間', '設置失敗時頁麵等待頁麵');
     $builder->keyEditor('ABOUT_US', '關於我們內容', '頁腳關於我們介紹');
     $builder->keyEditor('SUBSCRIB_US', '關注我們', '頁腳關注我們內容');
     $builder->keyEditor('COPY_RIGHT', '版權信息', '頁腳版權信息');
     $builder->group('基本信息', array('WEB_SITE_NAME', 'ICP', 'LOGO', 'QRCODE'));
     $builder->group('頁腳信息', array('ABOUT_US', 'SUBSCRIB_US', 'COPY_RIGHT'));
     $builder->group('跳轉頁麵', array('JUMP_BACKGROUND', 'SUCCESS_WAIT_TIME', 'ERROR_WAIT_TIME'));
     $builder->data($data);
     $builder->keyDefault('SUCCESS_WAIT_TIME', 2);
     $builder->keyDefault('ERROR_WAIT_TIME', 5);
     $builder->buttonSubmit();
     $builder->display();
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:24,代碼來源:ConfigController.class.php

示例10: addpack

 /**
  * 新增補丁
  * @author 奕瀟 <yixiao2020@qq.com>
  */
 public function addpack($title_old = '', $title = '', $sql = '', $des = '', $author = '')
 {
     if (IS_POST) {
         $aId = I('post.id', 0, 'intval');
         if ($aId != 0) {
             //編輯邏輯,取到原有數據
             $info = $this->getJsonFile($aId);
         }
         //dump($this->mPackPath . '/' . $aId . '.json');exit;
         $aTitle = I('post.title');
         $aDes = I('post.des');
         $aAuthor = I('post.author');
         $aSql = I('post.sql');
         if ($aSql == '') {
             $this->error('必須填寫Sql語句。');
         }
         $info['title'] = $aTitle;
         $info['des'] = $aDes;
         $info['author'] = $aAuthor;
         if ($aId == 0) {
             //新增邏輯
             $time = time();
             if ($title == '') {
                 $title = $time;
             }
             $info['title'] = $title;
             $fh = $this->writeSql($sql, $time);
             $info['ctime'] = time();
             $info['mtime'] = '0';
             $fh = $this->writeJsonFile($time, $info);
             $this->success("新增補丁成功。");
         } else {
             $info['mtime'] = time();
             //打開文件
             $this->writeJsonFile($aId, $info);
             fclose($fh);
             $this->writeSql($aSql, $aId);
             $this->success("編輯補丁成功。");
             exit;
         }
     } else {
         $aId = I('get.id', 0, 'intval');
         if ($aId != 0) {
             $info = $this->getJsonFile($aId);
             $info['sql'] = $this->read_file($this->pack_sql_dir . '/' . $aId . '.sql');
         }
         $formBuilder = new AdminConfigBuilder();
         $formBuilder->title('新增補丁')->keyText('title', '補丁名稱')->keyTextArea('des', '用途介紹')->keyTextArea('sql', 'sql語句')->keyText('author', '作者')->buttonSubmit();
         if ($aId != 0) {
             $info['id'] = $aId;
             $formBuilder->keyHidden('id');
         }
         $formBuilder->data($info);
         $formBuilder->display();
     }
 }
開發者ID:fishling,項目名稱:chatPro,代碼行數:60,代碼來源:UpdateController.class.php

示例11: addType

 public function addType()
 {
     $aId = I('id', 0, 'intval');
     if (IS_POST) {
         $aPid = I('pid', 0, 'intval');
         $aSort = I('sort', 0, 'intval');
         $aStatus = I('status', -2, 'intval');
         $aTitle = I('title', '', 'op_t');
         if ($aId != 0) {
             $type['id'] = $aId;
         }
         $type['sort'] = $aSort;
         $type['pid'] = $aPid;
         if ($aStatus != -2) {
             $type['status'] = $aStatus;
         }
         $type['title'] = $aTitle;
         if ($aId != 0) {
             $result = M('ForumType')->save($type);
         } else {
             $result = M('ForumType')->add($type);
         }
         if ($result) {
             $this->success('操作成功!');
         } else {
             $this->error('操作失敗!');
         }
     }
     $type = M('ForumType')->find($aId);
     if (!$type) {
         $type['status'] = 1;
         $type['sort'] = 1;
     }
     $configBuilder = new AdminConfigBuilder();
     $configBuilder->title('編輯分類');
     $configBuilder->keyId()->keyText('title', '分類名')->keyInteger('sort', '排序')->keyStatus()->buttonSubmit()->buttonBack();
     $configBuilder->data($type);
     $configBuilder->display();
 }
開發者ID:tmac1997,項目名稱:DormitoryWebsite,代碼行數:39,代碼來源:ForumController.class.php

示例12: editProfile

 public function editProfile($id = 0, $profile_name = '', $visiable = 1)
 {
     if (IS_POST) {
         $data['profile_name'] = $profile_name;
         $data['visiable'] = $visiable;
         if ($data['profile_name'] == '') {
             $this->error(L('_GROUP_NAME_CANNOT_BE_EMPTY_'));
         }
         if ($id != '') {
             $res = D('field_group')->where('id=' . $id)->save($data);
         } else {
             $map['profile_name'] = $profile_name;
             $map['status'] = array('egt', 0);
             if (D('field_group')->where($map)->count() > 0) {
                 $this->error(L('_ALREADY_HAS_THE_SAME_NAME_GROUP_PLEASE_USE_THE_OTHER_GROUP_NAME_'));
             }
             $data['status'] = 1;
             $data['createTime'] = time();
             $res = D('field_group')->add($data);
         }
         if ($res) {
             $this->success($id == '' ? L('_ADD_GROUP_SUCCESS_') : L('_EDIT_GROUP_SUCCESS_'), U('profile'));
         } else {
             $this->error($id == '' ? L('_ADD_GROUP_FAILURE_') : L('_EDIT_GROUP_FAILED_'));
         }
     } else {
         $builder = new AdminConfigBuilder();
         if ($id != 0) {
             $profile = D('field_group')->where('id=' . $id)->find();
             $builder->title(L('_MODIFIED_GROUP_INFORMATION_'));
             $builder->meta_title = L('_MODIFIED_GROUP_INFORMATION_');
         } else {
             $builder->title(L('_ADD_EXTENDED_INFORMATION_PACKET_'));
             $builder->meta_title = L('_NEW_GROUP_');
         }
         $builder->keyReadOnly("id", L('_LOGO_'))->keyText('profile_name', L('_GROUP_NAME_'))->keyBool('visiable', L('_OPEN_YE_OR_NO_'));
         $builder->data($profile);
         $builder->buttonSubmit(U('editProfile'), $id == 0 ? L('_ADD_') : L('_MODIFY_'))->buttonBack();
         $builder->display();
     }
 }
開發者ID:naliduo,項目名稱:Lightweight-social-platform,代碼行數:41,代碼來源:UserController.class.php

示例13: 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

示例14: addpack

 /**
  * 新增補丁
  * @author 奕瀟 <yixiao2020@qq.com>
  */
 public function addpack($title_old = '', $title = '', $sql = '', $des = '', $author = '')
 {
     if (IS_POST) {
         $aId = I('post.id', 0, 'intval');
         if ($aId != 0) {
             //編輯邏輯,取到原有數據
             $info = $this->getJsonFile($aId);
         }
         //dump($this->mPackPath . '/' . $aId . '.json');exit;
         $aTitle = I('post.title');
         $aDes = I('post.des');
         $aAuthor = I('post.author');
         $aSql = I('post.sql');
         if ($aSql == '') {
             $this->error(L('_SQL_STATEMENTS_MUST_BE_FILLED_OUT_'));
         }
         $info['title'] = $aTitle;
         $info['des'] = $aDes;
         $info['author'] = $aAuthor;
         if ($aId == 0) {
             //新增邏輯
             $time = time();
             if ($title == '') {
                 $title = $time;
             }
             $info['title'] = $title;
             $fh = $this->writeSql($sql, $time);
             $info['ctime'] = time();
             $info['mtime'] = '0';
             $fh = $this->writeJsonFile($time, $info);
             $this->success(L('_NEW_PATCH_SUCCESS_'));
         } else {
             $info['mtime'] = time();
             //打開文件
             $this->writeJsonFile($aId, $info);
             fclose($fh);
             $this->writeSql($aSql, $aId);
             $this->success(L('_EDIT_PATCH_SUCCESS_'));
             exit;
         }
     } else {
         $aId = I('get.id', 0, 'intval');
         if ($aId != 0) {
             $info = $this->getJsonFile($aId);
             $info['sql'] = $this->read_file($this->pack_sql_dir . '/' . $aId . '.sql');
         }
         $formBuilder = new AdminConfigBuilder();
         $formBuilder->title(L('_NEW_PATCH_'))->keyText('title', L('_PATCH_NAME_'))->keyTextArea('des', L('_INTRODUCTION_'))->keyTextArea('sql', L('_SQL_STATEMENT_'))->keyText('author', L('_AUTHOR_'))->buttonSubmit();
         if ($aId != 0) {
             $info['id'] = $aId;
             $formBuilder->keyHidden('id');
         }
         $formBuilder->data($info);
         $formBuilder->display();
     }
 }
開發者ID:naliduo,項目名稱:Lightweight-social-platform,代碼行數:60,代碼來源:UpdateController.class.php

示例15: editSection

 public function editSection()
 {
     $aSectionId = I('id', 0, 'intval');
     $oldSection = $this->bookSectionModel->getData($aSectionId);
     $title = $oldSection['type'] ? '編輯文章: ' . $oldSection['title'] : '編輯章節: ' . $oldSection['title'];
     if (!$oldSection) {
         $this->error(L('_THIS_CHAPTER_DOES_NOT_EXIST_AND_CANNOT_BE_EDITED_WITH_EXCLAMATION_'));
     }
     if (IS_POST) {
         $data['id'] = $aSectionId;
         $data['uid'] = I('post.uid', get_uid(), 'intval');
         $data['title'] = I('post.title', '', 'text');
         $data['pid'] = I('post.pid', 0, 'intval');
         $data['keywords'] = I('post.keywords', '', 'text');
         $data['summary'] = I('post.summary', '', 'text');
         $data['is_show'] = I('post.is_show', 1, 'intval');
         $data['sort'] = I('post.sort', 0, 'intval');
         $data['create_time'] = I('post.create_time', time(), 'intval');
         $data['status'] = I('post.status', 1, 'intval');
         $data['book_id'] = $oldSection['book_id'];
         $data['color'] = I('post.color', '', 'text');
         if (!$oldSection['type']) {
             $data['open_child'] = I('post.open_child', 1, 'intval');
         }
         if (mb_strlen($data['title'], 'utf-8') <= 0) {
             $this->error(L('_TITLE_CAN_NOT_BE_EMPTY_WITH_EXCLAMATION_'));
         }
         $res_section = $this->bookSectionModel->editData($data);
         if ($oldSection['type']) {
             $detail['section_id'] = $aSectionId;
             $detailModel = D('BookDetail');
             $exist = $detailModel->where($detail)->find();
             $detail['content'] = $_POST['content'];
             if ($exist) {
                 $detail['id'] = $exist['id'];
                 $res_detail = $detailModel->save($detail);
             } else {
                 $res_detail = $detailModel->add($detail);
             }
         }
         if ($res_section || $res_detail) {
             $this->success(L('_OPERATION_SUCCESS_WITH_EXCLAMATION_'));
         } else {
             if ($oldSection['type']) {
                 $this->error('編輯失敗!操作章節表時報 ' . $this->bookSectionModel->getError() . L('_WRONG;_THE_OPERATION_OF_THE_ARTICLE_FOR_DETAILS_OF_THE_TIMES_') . $detailModel->getError() . L('_WRONG_WITH_PERIOD_'));
             } else {
                 $this->error(L('_EDIT_FAILED_WITH_EXCLAMATION_') . $this->bookSectionModel->getError());
             }
         }
     } else {
         $options = $this->bookSectionModel->getSectionOptions($oldSection['book_id'], $aSectionId);
         $builder = new AdminConfigBuilder();
         $builder->title($title);
         $builder->data($oldSection)->keyId()->keyUid('uid', L('_AUTHOR_UID_'))->keyTitle('title', L('_TITLE_'))->keySelect('pid', L('_FATHER_CLASS_'), '', $options)->keyText('keywords', L('_KEY_WORDS_'))->keyTextArea('summary', L('_INTRODUCTION_'));
         if ($oldSection['type']) {
             $builder->keyEditor('content', L('_CONTENT_'), '', 'all', array('width' => '850px', 'height' => '400px'));
         } else {
             $builder->keyBool('open_child', L('_START_SUB_CHAPTER_'));
         }
         $builder->keyRadio('is_show', L('_RELEASE_STATUS_'), '', array('0' => L('_DRAFT_'), '1' => L('_NORMAL_')))->keyInteger('sort', L('_SORT_'))->keyColor('color', L('_TEXT_COLOR_'))->keyCreateTime()->keyStatus()->buttonSubmit()->buttonBack()->display();
     }
 }
開發者ID:sunjie20081001,項目名稱:sns,代碼行數:62,代碼來源:BookController.class.php


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