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


PHP AdminConfigBuilder::parseKanbanArray方法代碼示例

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


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

示例1: index

    public function index()
    {
        $admin_config = new AdminConfigBuilder();
        $data = $admin_config->handleConfig();
        $mStep = A('Ucenter/RegStep', 'Widget')->mStep;
        $step = array();
        foreach ($mStep as $key => $v) {
            $step[] = array('data-id' => $key, 'title' => $v);
        }
        $default = array(array('data-id' => 'disable', 'title' => '禁用', 'items' => $step), array('data-id' => 'enable', 'title' => '啟用', 'items' => array()));
        //$default=array('禁用'=>$step,'啟用並可跳過'=>array(),'啟用但不可跳過'=>array());
        $data['REG_STEP'] = $admin_config->parseKanbanArray($data['REG_STEP'], $step, $default);
        empty($data['LEVEL']) && ($data['LEVEL'] = <<<str
0:Lv1 實習
50:Lv2 試用
100:Lv3 轉正
200:Lv4 助理
400:Lv 5 經理
800:Lv6 董事
1600:Lv7 董事長
str
);
        empty($data['OPEN_QUICK_LOGIN']) && ($data['OPEN_QUICK_LOGIN'] = 0);
        $admin_config->title('用戶配置')->keyCheckBox('REG_SWITCH', '注冊開關', '允許使用的注冊選項,全不選即為關閉注冊', array('username' => '用戶名', 'email' => '郵箱', 'mobile' => '手機'))->keyRadio('EMAIL_VERIFY_TYPE', '郵箱驗證類型', '郵箱驗證的類型', array(0 => '不驗證', 1 => '注冊後發送激活郵件', 2 => '注冊前發送驗證郵件'))->keyRadio('MOBILE_VERIFY_TYPE', '手機驗證類型', '手機驗證的類型', array(0 => '不驗證', 1 => '注冊前發送驗證短信'))->keyKanban('REG_STEP', '注冊步驟', '注冊後需要進行的步驟')->keyCheckBox('REG_CAN_SKIP', '注冊步驟是否可跳過', '勾選為可跳過,默認不可跳過', $mStep)->keyEditor('REG_EMAIL_VERIFY', '郵箱驗證模版', '用於進行郵箱的驗證', 'all')->keyEditor('REG_EMAIL_ACTIVATE', '郵箱激活模版', '用於進行用戶的激活')->keyCheckBox('SMS_SP', '短信提供商', '可選的短信通道提供商,全不選即為關閉短信通道', array('ucpaas' => '雲之訊', 'UCToo' => 'UCToo'))->keyText('SMS_HTTP', '短信平台HTTP', '短信平台HTTP')->keyText('SMS_HTTPS', '短信平台HTTPS', '短信平台HTTPS')->keyText('SMS_UID', '短信平台帳號', '短信平台帳號')->keyText('SMS_PWD', '短信平台密碼', '短信平台密碼')->keyText('SMS_ACCOUNTSID', '短信平台開發者ID', '短信平台開發者ID')->keyText('SMS_TOKEN', '短信平台TOKEN', '短信平台TOKEN')->keyText('SMS_APPID', '短信平台應用ID', '短信平台應用ID')->keyText('SMS_TEMPLATEID', '短信平台模板ID', '短信平台模板ID')->keyTextArea('SMS_CONTENT', '短信內容', '短信內容')->keyTextArea('LEVEL', '等級配置', '每行一條,名稱和積分之間用冒號分隔')->keyRadio('OPEN_QUICK_LOGIN', '快捷登錄', '默認關閉,開啟後用戶登錄方式更換成快捷登錄!', array(0 => '關閉', 1 => '開啟'))->group('注冊配置', 'REG_SWITCH,EMAIL_VERIFY_TYPE,MOBILE_VERIFY_TYPE,REG_STEP,REG_CAN_SKIP')->group('登錄配置', 'OPEN_QUICK_LOGIN')->group('郵箱驗證模版', 'REG_EMAIL_VERIFY')->group('郵箱激活模版', 'REG_EMAIL_ACTIVATE')->group('短信配置', 'SMS_SP,SMS_HTTP,SMS_HTTPS,SMS_UID,SMS_PWD,SMS_ACCOUNTSID,SMS_TOKEN,SMS_APPID,SMS_TEMPLATEID,SMS_CONTENT')->group('基礎設置', 'LEVEL')->buttonSubmit('', '保存')->data($data);
        $admin_config->display();
    }
開發者ID:fishling,項目名稱:chatPro,代碼行數:26,代碼來源:UserConfigController.class.php

示例2: index

    public function index()
    {
        $admin_config = new AdminConfigBuilder();
        $data = $admin_config->handleConfig();
        $mStep = A('Ucenter/RegStep', 'Widget')->mStep;
        $step = array();
        foreach ($mStep as $key => $v) {
            $step[] = array('data-id' => $key, 'title' => $v);
        }
        $default = array(array('data-id' => 'disable', 'title' => '禁用', 'items' => $step), array('data-id' => 'enable', 'title' => '啟用', 'items' => array()));
        //$default=array('禁用'=>$step,'啟用並可跳過'=>array(),'啟用但不可跳過'=>array());
        $data['REG_STEP'] = $admin_config->parseKanbanArray($data['REG_STEP'], $step, $default);
        empty($data['LEVEL']) && ($data['LEVEL'] = <<<str
0:Lv1 實習
50:Lv2 試用
100:Lv3 轉正
200:Lv4 助理
400:Lv 5 經理
800:Lv6 董事
1600:Lv7 董事長
str
);
        empty($data['OPEN_QUICK_LOGIN']) && ($data['OPEN_QUICK_LOGIN'] = 0);
        $admin_config->title('用戶配置')->keyCheckBox('REG_SWITCH', '注冊開關', '允許使用的注冊選項,全不選即為關閉注冊', array('username' => '用戶名', 'email' => '郵箱', 'mobile' => '手機'))->keyRadio('EMAIL_VERIFY_TYPE', '郵箱驗證類型', '郵箱驗證的類型', array(0 => '不驗證', 1 => '注冊後發送激活郵件', 2 => '注冊前發送驗證郵件'))->keyRadio('MOBILE_VERIFY_TYPE', '手機驗證類型', '手機驗證的類型', array(0 => '不驗證', 1 => '注冊前發送驗證短信'))->keyText('NEW_USER_FOLLOW', '新用戶關注', '輸入用戶id,多個用戶以‘,’分割')->keyText('NEW_USER_FANS', '新用戶粉絲', '輸入用戶id,多個用戶以‘,’分割')->keyText('NEW_USER_FRIENDS', '新用戶好友', '輸入用戶id,多個用戶以‘,’分割')->keyKanban('REG_STEP', '注冊步驟', '注冊後需要進行的步驟')->keyCheckBox('REG_CAN_SKIP', '注冊步驟是否可跳過', '勾選為可跳過,默認不可跳過', $mStep)->keyEditor('REG_EMAIL_VERIFY', '郵箱驗證模版', '用於進行郵箱的驗證', 'all')->keyEditor('REG_EMAIL_ACTIVATE', '郵箱激活模版', '用於進行用戶的激活')->keyText('SMS_HTTP', '短信平台HTTP', '短信平台HTTP,可用服務商:<a href="http://www.yunsms.cn/" target="_blank">雲短信</a>')->keyText('SMS_UID', '短信平台帳號', '短信平台帳號')->keyText('SMS_PWD', '短信平台密碼', '短信平台密碼')->keyTextArea('SMS_CONTENT', '短信內容', '短信內容')->keyTextArea('LEVEL', '等級配置', '每行一條,名稱和積分之間用冒號分隔')->keyRadio('OPEN_QUICK_LOGIN', '快捷登錄', '默認關閉,開啟後用戶登錄方式更換成快捷登錄!', array(0 => '關閉', 1 => '開啟'))->group('注冊配置', 'REG_SWITCH,EMAIL_VERIFY_TYPE,MOBILE_VERIFY_TYPE,REG_STEP,REG_CAN_SKIP,NEW_USER_FOLLOW,NEW_USER_FANS,NEW_USER_FRIENDS')->group('登錄配置', 'OPEN_QUICK_LOGIN')->group('郵箱驗證模版', 'REG_EMAIL_VERIFY')->group('郵箱激活模版', 'REG_EMAIL_ACTIVATE')->group('短信配置', 'SMS_HTTP,SMS_UID,SMS_PWD,SMS_CONTENT')->group('基礎設置', 'LEVEL')->buttonSubmit('', '保存')->data($data);
        $admin_config->display();
    }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:26,代碼來源:UserConfigController.class.php

示例3: index

 public function index()
 {
     $pkgList = $this->expressionModel->getPkgList(0);
     $admin_config = new AdminConfigBuilder();
     $data = $admin_config->handleConfig();
     $tab = array();
     foreach ($pkgList as $key => $v) {
         $tab[] = array('data-id' => $v['name'], 'title' => $v['title']);
     }
     $default = array(array('data-id' => 'disable', 'title' => L('_DISABLE_'), 'items' => array()), array('data-id' => 'enable', 'title' => L('_ENABLE_'), 'items' => $tab));
     $data['PKGLIST'] = $admin_config->parseKanbanArray($data['PKGLIST'], $tab, $default);
     $admin_config->title(L('_FACIAL_EXPRESSIONS_'))->keyKanban('PKGLIST', L('_EXPRESSION_PACKAGE_STATUS_AND_SORT_'))->buttonSubmit('', L('_SAVE_'))->data($data);
     $admin_config->display();
 }
開發者ID:terrydeng,項目名稱:beimeibang1205,代碼行數:14,代碼來源:ExpressionController.class.php

示例4: index

 public function index()
 {
     $pkgList = $this->expressionModel->getPkgList(0);
     $admin_config = new AdminConfigBuilder();
     $data = $admin_config->handleConfig();
     $tab = array();
     foreach ($pkgList as $key => $v) {
         $tab[] = array('data-id' => $v['name'], 'title' => $v['title']);
     }
     $default = array(array('data-id' => 'disable', 'title' => '禁用', 'items' => array()), array('data-id' => 'enable', 'title' => '啟用', 'items' => $tab));
     $data['PKGLIST'] = $admin_config->parseKanbanArray($data['PKGLIST'], $tab, $default);
     $admin_config->title('表情基本設置')->keyKanban('PKGLIST', '表情包狀態並排序')->buttonSubmit('', '保存')->data($data);
     $admin_config->display();
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:14,代碼來源:ExpressionController.class.php

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

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

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

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

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

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

示例11: index

    public function index()
    {
        $admin_config = new AdminConfigBuilder();
        $data = $admin_config->handleConfig();
        $mStep = A('Ucenter/RegStep', 'Widget')->mStep;
        $step = array();
        foreach ($mStep as $key => $v) {
            $step[] = array('data-id' => $key, 'title' => $v);
        }
        $default = array(array('data-id' => 'disable', 'title' => L('_DISABLE_'), 'items' => $step), array('data-id' => 'enable', 'title' => L('_ENABLE_'), 'items' => array()));
        //$default=array(L('_DISABLE_')=>$step,L('_ENABLE_AND_SKIP_')=>array(),L('_ENABLE_BUT_NOT_SKIP_')=>array());
        $data['REG_STEP'] = $admin_config->parseKanbanArray($data['REG_STEP'], $step, $default);
        empty($data['LEVEL']) && ($data['LEVEL'] = <<<str
0:Lv1 實習
50:Lv2 試用
100:Lv3 轉正
200:Lv4 助理
400:Lv 5 經理
800:Lv6 董事
1600:Lv7 董事長
str
);
        empty($data['OPEN_QUICK_LOGIN']) && ($data['OPEN_QUICK_LOGIN'] = 0);
        empty($data['LOGIN_SWITCH']) && ($data['LOGIN_SWITCH'] = 'username');
        $addons = \Think\Hook::get('sms');
        $opt = array('none' => L('_NONE_'));
        foreach ($addons as $name) {
            if (class_exists($name)) {
                $class = new $name();
                $config = $class->getConfig();
                if ($config['switch']) {
                    $opt[$class->info['name']] = $class->info['title'];
                }
            }
        }
        $admin_config->title(L('_USER_CONFIGURATION_'))->data($data)->keyCheckBox('REG_SWITCH', L('_REGISTRATION_SWITCH_'), L('_THE_REGISTRATION_OPTION_THAT_ALLOWS_THE_USE_OF_THE_REGISTRATION_IS_CLOSED_'), array('username' => L('_USER_NAME_'), 'email' => L('_MAILBOX_'), 'mobile' => L('_MOBILE_PHONE_')))->keyRadio('EMAIL_VERIFY_TYPE', L('_MAILBOX_VERIFICATION_TYPE_'), L('_TYPE_MAILBOX_VERIFICATION_'), array(0 => L('_NOT_VERIFIED_'), 1 => L('_POST_REGISTRATION_ACTIVATION_MAIL_'), 2 => L('_EMAIL_VERIFY_SEND_BEFORE_REG_')))->keyRadio('MOBILE_VERIFY_TYPE', L('_MOBILE_VERIFICATION_TYPE_'), L('_TYPE_OF_CELL_PHONE_VERIFICATION_'), array(0 => L('_NOT_VERIFIED_'), 1 => L('_REGISTER_BEFORE_SENDING_A_VALIDATION_MESSAGE_')))->keyText('NEW_USER_FOLLOW', L('_NEW_USER_ATTENTION_'), L('_ID_INPUT_SEPARATE_COMMA_'))->keyText('NEW_USER_FANS', L('_NEW_USER_FANS_'), L('_ID_INPUT_SEPARATE_COMMA_'))->keyText('NEW_USER_FRIENDS', L('_NEW_FRIENDS_'), L('_ID_INPUT_SEPARATE_COMMA_'))->keyKanban('REG_STEP', L('_REGISTRATION_STEP_'), L('_STEPS_TO_BE_MADE_AFTER_REGISTRATION_'))->keyCheckBox('REG_CAN_SKIP', L('_WHETHER_THE_REGISTRATION_STEP_CAN_BE_SKIPPED_'), L('_CHECK_TO_SKIP_AND_YOU_CANT_SKIP_THE_DEFAULT_'), $mStep)->keyEditor('REG_EMAIL_VERIFY', L('_MAILBOX_VERIFICATION_TEMPLATE_'), L('_PLEASE_EMAIL_VERIFY_'), 'all')->keyEditor('REG_EMAIL_ACTIVATE', L('_MAILBOX_ACTIVATION_TEMPLATE_'), L('_PLEASE_USER_ACTIVE_'))->keySelect('SMS_HOOK', L('_SMS_SENDING_SERVICE_PROVIDER_'), L('_SMS_SEND_SERVICE_PROVIDERS_NEED_TO_INSTALL_THE_PLUG-IN_'), $opt)->keyText('SMS_RESEND', L('_THE_MESSAGE_RETRANSMISSION_TIME_'), L('_THE_MESSAGE_RETRANSMISSION_TIME_'))->keyText('SMS_UID', L('_SMS_PLATFORM_ACCOUNT_NUMBER_'), L('_SMS_PLATFORM_ACCOUNT_NUMBER_'))->keyText('SMS_PWD', L('_SMS_PLATFORM_PASSWORD_'), L('_SMS_PLATFORM_PASSWORD_'))->keyTextArea('SMS_CONTENT', L('_MESSAGE_CONTENT_'), L('_MSG_VERICODE_ACCOUNT_'))->keyTextArea('LEVEL', L('_HIERARCHY_'), L('_ONE_PER_LINE_BETWEEN_THE_NAME_AND_THE_INTEGRAL_BY_A_COLON_'))->keyInteger('NICKNAME_MIN_LENGTH', L('_NICKNAME_LENGTH_MINIMUM_'))->keyDefault('NICKNAME_MIN_LENGTH', 2)->keyInteger('NICKNAME_MAX_LENGTH', L('_NICKNAME_LENGTH_MAXIMUM_'))->keyDefault('NICKNAME_MAX_LENGTH', 32)->keyInteger('USERNAME_MIN_LENGTH', L('_USERNAME_LENGTH_MINIMUM_'))->keyDefault('USERNAME_MIN_LENGTH', 2)->keyInteger('USERNAME_MAX_LENGTH', L('_USERNAME_LENGTH_MAXIMUM_'))->keyDefault('USERNAME_MAX_LENGTH', 32)->keyRadio('OPEN_QUICK_LOGIN', L('_QUICK_LOGIN_'), L('_BY_DEFAULT_AFTER_THE_USER_IS_LOGGED_IN_THE_USER_IS_LOGGED_IN_'), array(0 => L('_OFF_'), 1 => L('_OPEN_')))->keyCheckBox('LOGIN_SWITCH', L('_LOGIN_PROMPT_SWITCH_'), L('_JUST_THE_TIP_OF_THE_LOGIN_BOX_'), array('username' => L('_USER_NAME_'), 'email' => L('_MAILBOX_'), 'mobile' => L('_MOBILE_PHONE_')))->group(L('_REGISTER_CONFIGURATION_'), 'REG_SWITCH,EMAIL_VERIFY_TYPE,MOBILE_VERIFY_TYPE,REG_STEP,REG_CAN_SKIP,NEW_USER_FOLLOW,NEW_USER_FANS,NEW_USER_FRIENDS')->group(L('_LOGIN_CONFIGURATION_'), 'OPEN_QUICK_LOGIN,LOGIN_SWITCH')->group(L('_MAILBOX_VERIFICATION_TEMPLATE_'), 'REG_EMAIL_VERIFY')->group(L('_MAILBOX_ACTIVATION_TEMPLATE_'), 'REG_EMAIL_ACTIVATE')->group(L('_SMS_CONFIGURATION_'), 'SMS_HTTP,SMS_UID,SMS_PWD,SMS_CONTENT,SMS_HOOK,SMS_RESEND')->group(L('_BASIC_SETTINGS_'), 'LEVEL,NICKNAME_MIN_LENGTH,NICKNAME_MAX_LENGTH,USERNAME_MIN_LENGTH,USERNAME_MAX_LENGTH')->buttonSubmit('', L('_SAVE_'))->keyDefault('REG_EMAIL_VERIFY', L('_VERICODE_ACCOUNT_') . L('_PERIOD_'))->keyDefault('REG_EMAIL_ACTIVATE', L('_LINK_ACTIVE_IS_'))->keyDefault('SMS_CONTENT', L('_VERICODE_ACCOUNT_'))->keyDefault('SMS_RESEND', '60');
        $admin_config->display();
    }
開發者ID:terrydeng,項目名稱:beimeibang1205,代碼行數:38,代碼來源:UserConfigController.class.php

示例12: index

    public function index()
    {
        $admin_config = new AdminConfigBuilder();
        $data = $admin_config->handleConfig();
        $mStep = A('Ucenter/RegStep', 'Widget')->mStep;
        $step = array();
        foreach ($mStep as $key => $v) {
            $step[] = array('data-id' => $key, 'title' => $v);
        }
        $default = array(array('data-id' => 'disable', 'title' => '禁用', 'items' => $step), array('data-id' => 'enable', 'title' => '啟用', 'items' => array()));
        //$default=array('禁用'=>$step,'啟用並可跳過'=>array(),'啟用但不可跳過'=>array());
        $data['REG_STEP'] = $admin_config->parseKanbanArray($data['REG_STEP'], $step, $default);
        empty($data['LEVEL']) && ($data['LEVEL'] = <<<str
0:Lv1 實習
50:Lv2 試用
100:Lv3 轉正
200:Lv4 助理
400:Lv 5 經理
800:Lv6 董事
1600:Lv7 董事長
str
);
        empty($data['OPEN_QUICK_LOGIN']) && ($data['OPEN_QUICK_LOGIN'] = 0);
        empty($data['LOGIN_SWITCH']) && ($data['LOGIN_SWITCH'] = 'username');
        $addons = \Think\Hook::get('sms');
        $opt = array('none' => '無');
        foreach ($addons as $name) {
            if (class_exists($name)) {
                $class = new $name();
                $config = $class->getConfig();
                if ($config['switch']) {
                    $opt[$class->info['name']] = $class->info['title'];
                }
            }
        }
        $admin_config->title('用戶配置')->data($data)->keyCheckBox('REG_SWITCH', '注冊開關', '允許使用的注冊選項,全不選即為關閉注冊', array('username' => '用戶名', 'email' => '郵箱', 'mobile' => '手機'))->keyRadio('EMAIL_VERIFY_TYPE', '郵箱驗證類型', '郵箱驗證的類型', array(0 => '不驗證', 1 => '注冊後發送激活郵件', 2 => '注冊前發送驗證郵件'))->keyRadio('MOBILE_VERIFY_TYPE', '手機驗證類型', '手機驗證的類型', array(0 => '不驗證', 1 => '注冊前發送驗證短信'))->keyText('NEW_USER_FOLLOW', '新用戶關注', '輸入用戶id,多個用戶以‘,’分割')->keyText('NEW_USER_FANS', '新用戶粉絲', '輸入用戶id,多個用戶以‘,’分割')->keyText('NEW_USER_FRIENDS', '新用戶好友', '輸入用戶id,多個用戶以‘,’分割')->keyKanban('REG_STEP', '注冊步驟', '注冊後需要進行的步驟')->keyCheckBox('REG_CAN_SKIP', '注冊步驟是否可跳過', '勾選為可跳過,默認不可跳過', $mStep)->keyEditor('REG_EMAIL_VERIFY', '郵箱驗證模版', '用於進行郵箱的驗證,必填{$verify}驗證碼,{$account}賬號', 'all')->keyEditor('REG_EMAIL_ACTIVATE', '郵箱激活模版', '用於進行用戶的激活,必填{$url}激活鏈接,{$title}網站名稱')->keySelect('SMS_HOOK', '短信發送服務商', '短信發送服務商,需要安裝插件', $opt)->keyText('SMS_RESEND', '短信重發時間', '短信重發時間')->keyText('SMS_UID', '短信平台帳號', '短信平台帳號')->keyText('SMS_PWD', '短信平台密碼', '短信平台密碼')->keyTextArea('SMS_CONTENT', '短信內容', '短信內容,必填{$verify}驗證碼,{$account}賬號')->keyTextArea('LEVEL', '等級配置', '每行一條,名稱和積分之間用冒號分隔')->keyInteger('NICKNAME_MIN_LENGTH', '昵稱長度最小值')->keyDefault('NICKNAME_MIN_LENGTH', 2)->keyInteger('NICKNAME_MAX_LENGTH', '昵稱長度最大值')->keyDefault('NICKNAME_MAX_LENGTH', 32)->keyInteger('USERNAME_MIN_LENGTH', '用戶名長度最小值')->keyDefault('USERNAME_MIN_LENGTH', 2)->keyInteger('USERNAME_MAX_LENGTH', '用戶名長度最大值')->keyDefault('USERNAME_MAX_LENGTH', 32)->keyRadio('OPEN_QUICK_LOGIN', '快捷登錄', '默認關閉,開啟後用戶登錄方式更換成快捷登錄!', array(0 => '關閉', 1 => '開啟'))->keyCheckBox('LOGIN_SWITCH', '登錄提示開關', '僅用於登錄框的提示作用', array('username' => '用戶名', 'email' => '郵箱', 'mobile' => '手機'))->group('注冊配置', 'REG_SWITCH,EMAIL_VERIFY_TYPE,MOBILE_VERIFY_TYPE,REG_STEP,REG_CAN_SKIP,NEW_USER_FOLLOW,NEW_USER_FANS,NEW_USER_FRIENDS')->group('登錄配置', 'OPEN_QUICK_LOGIN,LOGIN_SWITCH')->group('郵箱驗證模版', 'REG_EMAIL_VERIFY')->group('郵箱激活模版', 'REG_EMAIL_ACTIVATE')->group('短信配置', 'SMS_HTTP,SMS_UID,SMS_PWD,SMS_CONTENT,SMS_HOOK,SMS_RESEND')->group('基礎設置', 'LEVEL,NICKNAME_MIN_LENGTH,NICKNAME_MAX_LENGTH,USERNAME_MIN_LENGTH,USERNAME_MAX_LENGTH')->buttonSubmit('', '保存')->keyDefault('REG_EMAIL_VERIFY', '您的驗證碼為{$verify}驗證碼,賬號為{$account}。')->keyDefault('REG_EMAIL_ACTIVATE', '您在{$title}的激活鏈接為<a href="{$url}" target="_blank">激活</a>,或者請複製鏈接:{$url}到瀏覽器打開。')->keyDefault('SMS_CONTENT', '您的校驗碼為{$verify},注冊賬號為{$account}')->keyDefault('SMS_RESEND', '60');
        $admin_config->display();
    }
開發者ID:ccccy,項目名稱:wuanlife,代碼行數:38,代碼來源:UserConfigController.class.php

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


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