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


PHP AdminConfigBuilder::keyRadio方法代碼示例

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


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

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

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

示例3: config

 public function config()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->callback('configCallback')->handleConfig();
     $data['SHOW_TITLE'] = $data['SHOW_TITLE'] == null ? 1 : $data['SHOW_TITLE'];
     $data['HIGH_LIGHT_AT'] = $data['HIGH_LIGHT_AT'] == null ? 1 : $data['HIGH_LIGHT_AT'];
     $data['HIGH_LIGHT_TOPIC'] = $data['HIGH_LIGHT_TOPIC'] == null ? 1 : $data['HIGH_LIGHT_TOPIC'];
     $data['CAN_IMAGE'] = $data['CAN_IMAGE'] == null ? 1 : $data['CAN_IMAGE'];
     $data['CAN_TOPIC'] = $data['CAN_TOPIC'] == null ? 1 : $data['CAN_TOPIC'];
     $data['WEIBO_INFO'] = $data['WEIBO_INFO'] ? $data['WEIBO_INFO'] : L('_TIP_WEIBO_INFO_') . L('_QUESTION_');
     $data['WEIBO_NUM'] = $data['WEIBO_NUM'] ? $data['WEIBO_NUM'] : 140;
     $data['SHOW_COMMENT'] = $data['SHOW_COMMENT'] == null ? 1 : $data['SHOW_COMMENT'];
     $data['ACTIVE_USER'] = $data['ACTIVE_USER'] == null ? 1 : $data['ACTIVE_USER'];
     $data['ACTIVE_USER_COUNT'] = $data['ACTIVE_USER_COUNT'] ? $data['ACTIVE_USER_COUNT'] : 6;
     $data['NEWEST_USER'] = $data['NEWEST_USER'] == null ? 1 : $data['NEWEST_USER'];
     $data['NEWEST_USER_COUNT'] = $data['NEWEST_USER_COUNT'] ? $data['NEWEST_USER_COUNT'] : 6;
     $tab = array(array('data-id' => 'all', 'title' => L('_ALL_WEBSITE_FOLLOW_')), array('data-id' => 'concerned', 'title' => L('_MY_FOLLOW_')), array('data-id' => 'hot', 'title' => L('_HOT_WEIBO_')));
     $default = array(array('data-id' => 'enable', 'title' => L('_ENABLE_'), 'items' => $tab), array('data-id' => 'disable', 'title' => L('_DISABLE_'), 'items' => array()));
     $data['WEIBO_DEFAULT_TAB'] = $builder->parseKanbanArray($data['WEIBO_DEFAULT_TAB'], $tab, $default);
     $scoreTypes = D('Ucenter/Score')->getTypeList(array('status' => 1));
     foreach ($scoreTypes as $val) {
         $types[$val['id']] = $val['title'];
     }
     $data['WEIBO_SHOW_TITLE1'] = $data['WEIBO_SHOW_TITLE1'] ? $data['WEIBO_SHOW_TITLE1'] : L('_NEWEST_WEIBO_');
     $data['WEIBO_SHOW_COUNT1'] = $data['WEIBO_SHOW_COUNT1'] ? $data['WEIBO_SHOW_COUNT1'] : 5;
     $data['WEIBO_SHOW_ORDER_FIELD1'] = $data['WEIBO_SHOW_ORDER_FIELD1'] ? $data['WEIBO_SHOW_ORDER_FIELD1'] : 'create_time';
     $data['WEIBO_SHOW_ORDER_TYPE1'] = $data['WEIBO_SHOW_ORDER_TYPE1'] ? $data['WEIBO_SHOW_ORDER_TYPE1'] : 'desc';
     $data['WEIBO_SHOW_CACHE_TIME1'] = $data['WEIBO_SHOW_CACHE_TIME1'] ? $data['WEIBO_SHOW_CACHE_TIME1'] : '600';
     $data['WEIBO_SHOW_TITLE2'] = $data['WEIBO_SHOW_TITLE2'] ? $data['WEIBO_SHOW_TITLE2'] : L('_HOT_WEIBO_');
     $data['WEIBO_SHOW_COUNT2'] = $data['WEIBO_SHOW_COUNT2'] ? $data['WEIBO_SHOW_COUNT2'] : 5;
     $data['WEIBO_SHOW_ORDER_FIELD2'] = $data['WEIBO_SHOW_ORDER_FIELD2'] ? $data['WEIBO_SHOW_ORDER_FIELD2'] : 'comment_count';
     $data['WEIBO_SHOW_ORDER_TYPE2'] = $data['WEIBO_SHOW_ORDER_TYPE2'] ? $data['WEIBO_SHOW_ORDER_TYPE2'] : 'desc';
     $data['WEIBO_SHOW_CACHE_TIME2'] = $data['WEIBO_SHOW_CACHE_TIME2'] ? $data['WEIBO_SHOW_CACHE_TIME2'] : '600';
     $order = array('create_time' => L('_DELIVER_TIME_'), 'comment_count' => L('_COMMENT_COUNT_'));
     $builder->keyText('WEIBO_SHOW_TITLE1', L('_TITLE_NAME_'), L('_HOME_BLOCK_TITLE_'));
     $builder->keyText('WEIBO_SHOW_COUNT1', L('_WEIBO_COUNT_SHOW_'), '');
     $builder->keyRadio('WEIBO_SHOW_ORDER_FIELD1', L('_SORT_VALUE_'), L('_TIP_SORT_TYPE_'), $order);
     $builder->keyRadio('WEIBO_SHOW_ORDER_TYPE1', L('_SORT_TYPE_'), L('_TIP_SORT_TYPE_'), array('desc' => L('_COUNTER_'), 'asc' => L('_DIRECT_')));
     $builder->keyText('WEIBO_SHOW_CACHE_TIME1', L('_CACHE_TIME_'), L('_TIP_CACHE_TIME_'));
     $builder->keyText('WEIBO_SHOW_TITLE2', L('_TITLE_NAME_'), L('_HOME_BLOCK_TITLE_'));
     $builder->keyText('WEIBO_SHOW_COUNT2', L('_WEIBO_COUNT_SHOW_'), '');
     $builder->keyRadio('WEIBO_SHOW_ORDER_FIELD2', L('_SORT_VALUE_'), L('_TIP_SORT_TYPE_'), $order);
     $builder->keyRadio('WEIBO_SHOW_ORDER_TYPE2', L('_SORT_TYPE_'), L('_TIP_SORT_TYPE_'), array('desc' => L('_COUNTER_'), 'asc' => L('_DIRECT_')));
     $builder->keyText('WEIBO_SHOW_CACHE_TIME2', L('_CACHE_TIME_'), L('_TIP_CACHE_TIME_'));
     $builder->title(L('_WEIBO_BASIC_SETTINGS_'))->data($data)->keySwitch('SHOW_TITLE', L('_RANK_SHOW_IN_LEFT_'))->keyBool('WEIBO_BR', L('_CONTENT_TYPE_OPEN_'), L('_SUPPORT_ENTER_SPACE_'))->keySwitch('HIGH_LIGHT_AT', L('_HIGHLIGHT_AT_SOMEBODY_'))->keySwitch('HIGH_LIGHT_TOPIC', L('_HIGHLIGHT_WEIBO_TOPIC_'))->keyText('WEIBO_INFO', L('_WEIBO_POST_BOX_UP_LEFT_CONTENT_'))->keyText('WEIBO_NUM', L('_WEIBO_WORDS_LIMIT_'))->keyText('HOT_LEFT', L('_HOT_WEIBO_RULE_'))->keyDefault('HOT_LEFT', 3)->keySwitch('CAN_IMAGE', L('_INSERT_PICTURE_TYPE_OPEN_CLOSE_'))->keySwitch('CAN_TOPIC', L('_INSERT_TOPIC_TYPE_OPEN_CLOSE_'))->keyRadio('COMMENT_ORDER', L('_WEIBO_COMMENTS_LIST_ORDER_'), '', array(0 => L('_TIME_COUNTER_'), 1 => L('_TIME_DIRECT_')))->keyRadio('SHOW_COMMENT', L('_WEIBO_COMMENTS_LIST_DEFAULT_SHOW_HIDE_'), '', array(0 => L('_HIDE_'), 1 => L('_SHOW_')))->keyKanban('WEIBO_DEFAULT_TAB', L('_WEIBO_SIGN_DEFAULT_'))->keySwitch('ACTIVE_USER', L('_ACTIVE_USER_SWITCH_'))->keySelect('ACTIVE_USER_ORDER', L('_ACTIVE_USER_SORT_'), '', $types)->keyText('ACTIVE_USER_COUNT', L('_ACTIVE_USER_SHOW_NUMBER_'), '')->keyText('USE_TOPIC', L('_TOPIC_USUAL_'), L('_SHOW_IN_BUTTON_LEFT_'))->keySwitch('NEWEST_USER', L('_USER_SWITCH_NEWEST_'))->keyText('NEWEST_USER_COUNT', L('_USER_SHOW_NUMBER_NEWEST_'), '')->keyDefault('WEIBO_BR', 0)->group(L('_BASIC_SETTINGS_'), 'SHOW_TITLE,WEIBO_NUM,WEIBO_BR,WEIBO_DEFAULT_TAB,HIGH_LIGHT_AT,HIGH_LIGHT_TOPIC,WEIBO_INFO,HOT_LEFT')->group(L('_SETTINGS_TYPE_'), 'CAN_IMAGE,CAN_TOPIC')->group(L('_SETTINGS_COMMENTS_'), 'COMMENT_ORDER,SHOW_COMMENT')->group(L('_SETTINGS_RIGHT_SIDE_'), 'ACTIVE_USER,ACTIVE_USER_ORDER,ACTIVE_USER_COUNT,NEWEST_USER,NEWEST_USER_COUNT')->group(L('_SETTINGS_TOPIC_'), 'USE_TOPIC')->group(L('_HOME_BLOCK_LEFT_'), 'WEIBO_SHOW_TITLE1,WEIBO_SHOW_COUNT1,WEIBO_SHOW_ORDER_FIELD1,WEIBO_SHOW_ORDER_TYPE1,WEIBO_SHOW_CACHE_TIME1')->group(L('_HOME_BLOCK_RIGHT_'), 'WEIBO_SHOW_TITLE2,WEIBO_SHOW_COUNT2,WEIBO_SHOW_ORDER_FIELD2,WEIBO_SHOW_ORDER_TYPE2,WEIBO_SHOW_CACHE_TIME2')->buttonSubmit('', L('_SAVE_'));
     $builder->display();
 }
開發者ID:sunjie20081001,項目名稱:sns,代碼行數:47,代碼來源:WeiboController.class.php

示例4: config

 public function config()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->callback('configCallback')->handleConfig();
     $data['SHOW_TITLE'] = $data['SHOW_TITLE'] == null ? 1 : $data['SHOW_TITLE'];
     $data['HIGH_LIGHT_AT'] = $data['HIGH_LIGHT_AT'] == null ? 1 : $data['HIGH_LIGHT_AT'];
     $data['HIGH_LIGHT_TOPIC'] = $data['HIGH_LIGHT_TOPIC'] == null ? 1 : $data['HIGH_LIGHT_TOPIC'];
     $data['CAN_IMAGE'] = $data['CAN_IMAGE'] == null ? 1 : $data['CAN_IMAGE'];
     $data['CAN_TOPIC'] = $data['CAN_TOPIC'] == null ? 1 : $data['CAN_TOPIC'];
     $data['WEIBO_INFO'] = $data['WEIBO_INFO'] ? $data['WEIBO_INFO'] : '有什麽新鮮事想告訴大家?';
     $data['WEIBO_NUM'] = $data['WEIBO_NUM'] ? $data['WEIBO_NUM'] : 140;
     $data['SHOW_COMMENT'] = $data['SHOW_COMMENT'] == null ? 1 : $data['SHOW_COMMENT'];
     $data['ACTIVE_USER'] = $data['ACTIVE_USER'] == null ? 1 : $data['ACTIVE_USER'];
     $data['ACTIVE_USER_COUNT'] = $data['ACTIVE_USER_COUNT'] ? $data['ACTIVE_USER_COUNT'] : 6;
     $data['NEWEST_USER'] = $data['NEWEST_USER'] == null ? 1 : $data['NEWEST_USER'];
     $data['NEWEST_USER_COUNT'] = $data['NEWEST_USER_COUNT'] ? $data['NEWEST_USER_COUNT'] : 6;
     $tab = array(array('data-id' => 'all', 'title' => '全站動態'), array('data-id' => 'concerned', 'title' => '我的關注'), array('data-id' => 'hot', 'title' => '熱門微博'));
     $default = array(array('data-id' => 'enable', 'title' => '啟用', 'items' => $tab), array('data-id' => 'disable', 'title' => '禁用', 'items' => array()));
     $data['WEIBO_DEFAULT_TAB'] = $builder->parseKanbanArray($data['WEIBO_DEFAULT_TAB'], $tab, $default);
     $scoreTypes = D('Ucenter/Score')->getTypeList(array('status' => 1));
     foreach ($scoreTypes as $val) {
         $types[$val['id']] = $val['title'];
     }
     $data['WEIBO_SHOW_TITLE1'] = $data['WEIBO_SHOW_TITLE1'] ? $data['WEIBO_SHOW_TITLE1'] : '最新微博';
     $data['WEIBO_SHOW_COUNT1'] = $data['WEIBO_SHOW_COUNT1'] ? $data['WEIBO_SHOW_COUNT1'] : 5;
     $data['WEIBO_SHOW_ORDER_FIELD1'] = $data['WEIBO_SHOW_ORDER_FIELD1'] ? $data['WEIBO_SHOW_ORDER_FIELD1'] : 'create_time';
     $data['WEIBO_SHOW_ORDER_TYPE1'] = $data['WEIBO_SHOW_ORDER_TYPE1'] ? $data['WEIBO_SHOW_ORDER_TYPE1'] : 'desc';
     $data['WEIBO_SHOW_CACHE_TIME1'] = $data['WEIBO_SHOW_CACHE_TIME1'] ? $data['WEIBO_SHOW_CACHE_TIME1'] : '600';
     $data['WEIBO_SHOW_TITLE2'] = $data['WEIBO_SHOW_TITLE2'] ? $data['WEIBO_SHOW_TITLE2'] : '熱門微博';
     $data['WEIBO_SHOW_COUNT2'] = $data['WEIBO_SHOW_COUNT2'] ? $data['WEIBO_SHOW_COUNT2'] : 5;
     $data['WEIBO_SHOW_ORDER_FIELD2'] = $data['WEIBO_SHOW_ORDER_FIELD2'] ? $data['WEIBO_SHOW_ORDER_FIELD2'] : 'comment_count';
     $data['WEIBO_SHOW_ORDER_TYPE2'] = $data['WEIBO_SHOW_ORDER_TYPE2'] ? $data['WEIBO_SHOW_ORDER_TYPE2'] : 'desc';
     $data['WEIBO_SHOW_CACHE_TIME2'] = $data['WEIBO_SHOW_CACHE_TIME2'] ? $data['WEIBO_SHOW_CACHE_TIME2'] : '600';
     $order = array('create_time' => '發布時間', 'comment_count' => '評論數');
     $builder->keyText('WEIBO_SHOW_TITLE1', '標題名稱', '在首頁展示塊的標題');
     $builder->keyText('WEIBO_SHOW_COUNT1', '顯示微博數', '');
     $builder->keyRadio('WEIBO_SHOW_ORDER_FIELD1', '排序值', '展示模塊的數據排序方式', $order);
     $builder->keyRadio('WEIBO_SHOW_ORDER_TYPE1', '排序方式', '展示模塊的數據排序方式', array('desc' => '倒序,從大到小', 'asc' => '正序,從小到大'));
     $builder->keyText('WEIBO_SHOW_CACHE_TIME1', '緩存時間', '默認600秒,以秒為單位');
     $builder->keyText('WEIBO_SHOW_TITLE2', '標題名稱', '在首頁展示塊的標題');
     $builder->keyText('WEIBO_SHOW_COUNT2', '顯示微博數', '');
     $builder->keyRadio('WEIBO_SHOW_ORDER_FIELD2', '排序值', '展示模塊的數據排序方式', $order);
     $builder->keyRadio('WEIBO_SHOW_ORDER_TYPE2', '排序方式', '展示模塊的數據排序方式', array('desc' => '倒序,從大到小', 'asc' => '正序,從小到大'));
     $builder->keyText('WEIBO_SHOW_CACHE_TIME2', '緩存時間', '默認600秒,以秒為單位');
     $builder->title('微博基本設置')->data($data)->keySwitch('SHOW_TITLE', '是否在微博左側顯示等級')->keySwitch('HIGH_LIGHT_AT', '高亮AT某人')->keySwitch('HIGH_LIGHT_TOPIC', '高亮微博話題')->keyText('WEIBO_INFO', '微博發布框左上內容')->keyText('WEIBO_NUM', '微博字數限製')->keyText('HOT_LEFT', '熱門微博取多少天以內的,以那天零點之後為準')->keyDefault('HOT_LEFT', 3)->keySwitch('CAN_IMAGE', '是否開啟插入圖片類型')->keySwitch('CAN_TOPIC', '是否開啟插入話題類型')->keyRadio('COMMENT_ORDER', '微博評論列表順序', '', array(0 => '時間倒序', 1 => '時間正序'))->keyRadio('SHOW_COMMENT', '微博評論列表默認顯示或隱藏', '', array(0 => '隱藏', 1 => '顯示'))->keyKanban('WEIBO_DEFAULT_TAB', '微博默認顯示標簽')->keySwitch('ACTIVE_USER', '活躍用戶開關')->keySelect('ACTIVE_USER_ORDER', '活躍用戶排序', '', $types)->keyText('ACTIVE_USER_COUNT', '活躍用戶顯示數量', '')->keyText('USE_TOPIC', '常用話題', '顯示在微博發布按鈕左邊,用‘,’分隔')->keySwitch('NEWEST_USER', '最新用戶開關')->keyText('NEWEST_USER_COUNT', '最新用戶顯示數量', '')->group('基本設置', 'SHOW_TITLE,WEIBO_NUM,WEIBO_DEFAULT_TAB,HIGH_LIGHT_AT,HIGH_LIGHT_TOPIC,WEIBO_INFO,HOT_LEFT')->group('微博類型設置', 'CAN_IMAGE,CAN_TOPIC')->group('微博評論設置', 'COMMENT_ORDER,SHOW_COMMENT')->group('微博右側設置', 'ACTIVE_USER,ACTIVE_USER_ORDER,ACTIVE_USER_COUNT,NEWEST_USER,NEWEST_USER_COUNT')->group('話題設置', 'USE_TOPIC')->group('首頁展示左側欄', 'WEIBO_SHOW_TITLE1,WEIBO_SHOW_COUNT1,WEIBO_SHOW_ORDER_FIELD1,WEIBO_SHOW_ORDER_TYPE1,WEIBO_SHOW_CACHE_TIME1')->group('首頁展示右側欄', 'WEIBO_SHOW_TITLE2,WEIBO_SHOW_COUNT2,WEIBO_SHOW_ORDER_FIELD2,WEIBO_SHOW_ORDER_TYPE2,WEIBO_SHOW_CACHE_TIME2')->buttonSubmit('', '保存');
     $builder->display();
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:47,代碼來源:WeiboController.class.php

示例5: config

 public function config()
 {
     $admin_config = new AdminConfigBuilder();
     $data = $admin_config->handleConfig();
     $data['NEED_VERIFY'] = $data['NEED_VERIFY'] ? $data['NEED_VERIFY'] : 0;
     $data['DISPLAY_TYPE'] = $data['DISPLAY_TYPE'] ? $data['DISPLAY_TYPE'] : 'list';
     $data['ISSUE_SHOW_TITLE'] = $data['ISSUE_SHOW_TITLE'] ? $data['ISSUE_SHOW_TITLE'] : '最熱專輯';
     $data['ISSUE_SHOW_COUNT'] = $data['ISSUE_SHOW_COUNT'] ? $data['ISSUE_SHOW_COUNT'] : 4;
     $data['ISSUE_SHOW_ORDER_FIELD'] = $data['ISSUE_SHOW_ORDER_FIELD'] ? $data['ISSUE_SHOW_ORDER_FIELD'] : 'view_count';
     $data['ISSUE_SHOW_ORDER_TYPE'] = $data['ISSUE_SHOW_ORDER_TYPE'] ? $data['ISSUE_SHOW_ORDER_TYPE'] : 'desc';
     $data['ISSUE_SHOW_CACHE_TIME'] = $data['ISSUE_SHOW_CACHE_TIME'] ? $data['ISSUE_SHOW_CACHE_TIME'] : '600';
     $admin_config->title('專輯基本設置')->keyBool('NEED_VERIFY', '投稿是否需要審核', '默認無需審核')->keyRadio('DISPLAY_TYPE', '默認展示形式', '前台列表默認以該形式展示', array('list' => '列表', 'masonry' => '瀑布流'))->buttonSubmit('', '保存')->data($data);
     $admin_config->keyText('ISSUE_SHOW_TITLE', '標題名稱', '在首頁展示塊的標題');
     $admin_config->keyText('ISSUE_SHOW_COUNT', '顯示專輯的個數', '隻有在網站首頁模塊中啟用了專輯塊之後才會顯示');
     $admin_config->keyRadio('ISSUE_SHOW_ORDER_FIELD', '排序值', '展示模塊的數據排序方式', array('view_count' => '閱讀數', 'reply_count' => '回複數', 'create_time' => '發表時間', 'update_time' => '更新時間'));
     $admin_config->keyRadio('ISSUE_SHOW_ORDER_TYPE', '排序方式', '展示模塊的數據排序方式', array('desc' => '倒序,從大到小', 'asc' => '正序,從小到大'));
     $admin_config->keyText('ISSUE_SHOW_CACHE_TIME', '緩存時間', '默認600秒,以秒為單位');
     $admin_config->group('基本配置', 'NEED_VERIFY,DISPLAY_TYPE')->group('首頁展示配置', 'ISSUE_SHOW_COUNT,ISSUE_SHOW_TITLE,ISSUE_SHOW_ORDER_TYPE,ISSUE_SHOW_ORDER_FIELD,ISSUE_SHOW_CACHE_TIME');
     $admin_config->groupLocalComment('本地評論配置', 'issueContent');
     $admin_config->display();
 }
開發者ID:terrydeng,項目名稱:beimeibang1205,代碼行數:21,代碼來源:IssueController.class.php

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

示例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');
     $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

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

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

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

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

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

示例13: editPos

 public function editPos()
 {
     $aId = I('id', 0, 'intval');
     $aCopy = I('copy', 0, 'intval');
     $advPosModel = D('Common/AdvPos');
     if (IS_POST) {
         //是提交
         $pos['name'] = I('name', '', 'text');
         $pos['title'] = I('title', '', 'text');
         $pos['path'] = I('path', '', 'text');
         $pos['type'] = I('type', 1, 'intval');
         $pos['status'] = I('status', 1, 'intval');
         $pos['width'] = I('width', '', 'text');
         $pos['height'] = I('height', '', 'text');
         $pos['margin'] = I('margin', '', 'text');
         $pos['padding'] = I('padding', '', 'text');
         $pos['theme'] = I('theme', 'all', 'text');
         switch ($pos['type']) {
             case 2:
                 //todo 多圖
                 $pos['data'] = json_encode(array('style' => I('style', 1, 'intval')));
         }
         if ($aId == 0) {
             $result = $advPosModel->add($pos);
         } else {
             $pos['id'] = $aId;
             $result = $advPosModel->save($pos);
         }
         if ($result === false) {
             $this->error('保存失敗。');
         } else {
             S('adv_pos_by_pos_' . $pos['path'] . $pos['name'], null);
             $this->success('保存成功。');
         }
     } else {
         $builder = new AdminConfigBuilder();
         if ($aCopy != 0) {
             $pos = $advPosModel->find($aCopy);
             unset($pos['id']);
             $pos['name'] .= '   請重新設置!';
             $pos['title'] .= '   請重新設置!';
         } else {
             $pos = $advPosModel->find($aId);
         }
         if ($aId == 0) {
             if ($aCopy != 0) {
                 $builder->title('複製廣告位——' . $pos['title']);
             } else {
                 $builder->title('新增廣告位');
             }
         } else {
             $builder->title($pos['title'] . '【' . $pos['name'] . '】' . ' 設置——' . $advPosModel->switchType($pos['type']));
         }
         $themes = D('Common/Theme')->getThemeList();
         $themes_array['all'] = '<span class="text-success">全部主題</span>';
         foreach ($themes as $v) {
             $themes_array[$v['name']] = $v['title'];
         }
         $builder->keyId()->keyTitle()->keyText('name', '廣告位英文名', '標識,同一個頁麵上不要出現兩個同名的')->keyText('path', '路徑', '模塊名/控製器名/方法名,例如:Weibo/Index/detail')->keyRadio('type', '廣告類型', '', array(1 => '單圖廣告', 2 => '多圖輪播', 3 => '文字鏈接', 4 => '代碼'))->keyStatus()->keyText('width', '寬度', '支持各類長度單位,如px,em,%')->keyText('height', '高度', '支持各類長度單位,如px,em,%')->keyText('margin', '邊緣留白', '支持各類長度單位,如px,em,%;依次為:上  右  下  左,如 5px 2px 0 3px')->keyText('padding', '內部留白', '支持各類長度單位,如px,em,%;依次為:上  右  下  左,如 5px 2px 0 3px')->keyCheckBox('theme', '適用主題', '', $themes_array);
         $data = json_decode($pos['data'], true);
         if (!empty($data)) {
             $pos = array_merge($pos, $data);
         }
         if ($pos['type'] == 2) {
             $builder->keyRadio('style', '輪播_風格', '', array(1 => 'TouchSlider 風格', 2 => 'KinmaxShow 風格'))->keyDefault('style', 1);
         }
         $builder->keyDefault('type', 1)->keyDefault('status', 1);
         $builder->data($pos);
         $builder->buttonSubmit()->buttonBack();
         $builder->display();
     }
 }
開發者ID:naliduo,項目名稱:Lightweight-social-platform,代碼行數:72,代碼來源:AdvController.class.php

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

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