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


PHP AdminConfigBuilder::keyText方法代碼示例

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


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

示例1: config

 /**
  * 單頁配置
  * @author 鄭鍾良<zzl@ourstu.com>\
  */
 public function config()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $builder->title('文章基礎設置')->data($data);
     $builder->keyText('PAPER_CATEGORY_TITLE', '文章頂部標題')->keyDefault('PAPER_CATEGORY_TITLE', '介紹')->buttonSubmit()->buttonBack()->display();
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:11,代碼來源:PaperController.class.php

示例2: config

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

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

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

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

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

示例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()
 {
     $field = D('Ucenter/Score')->getTypeList(array('status' => 1));
     $configBuilder = new AdminConfigBuilder();
     $data = $configBuilder->callback('configCallback')->handleConfig();
     $param = array();
     $param['opt'] = $field;
     $de_data = $data['RE_FIELD'];
     $param['jsonData'] = $de_data;
     $param['data'] = json_decode($de_data, true);
     $param_w = array();
     $param_w['opt'] = $field;
     $w_data = $data['WITHDRAW_FIELD'];
     $param_w['jsonData'] = $w_data;
     $param_w['data'] = json_decode($w_data, true);
     $configBuilder->title('充值設置')->data($data)->keyBool('OPEN_RECHARGE', '開啟充值')->keyTextArea('RECHARGE_AMOUNT', '充值麵額', '一行一個')->keyBool('CAN_INPUT', '允許自由充值')->keyText('MIN_AMOUNT', '最小充值麵額,0為不限製,隻對自由充值開啟有效')->keyCheckBox('METHOD', '支付方式', '選擇支付種類', array('alipay' => '支付寶'))->keyUserDefined('RE_FIELD', '支持充值的積分類型', '選擇支持充值的積分類型和積分的兌率,如填寫100則表示1RMB=100積分', T('Recharge@Recharge/config'), $param)->keyDefault('METHOD', 'alipay')->keyDefault('MIN_AMOUNT', 0)->keyBool('OPEN_WITHDRAW', '開啟提現')->keyTextArea('WITHDRAW_AMOUNT', '提現麵額', '一行一個')->keyBool('WITHDRAW_CAN_INPUT', '允許自由提現')->keyText('WITHDRAW_MIN_AMOUNT', '最小提現麵額,0為不限製,隻對自由提現開啟有效')->keyCheckBox('WITHDRAW_METHOD', '支付方式', '選擇支付種類', array('alipay' => '支付寶'))->keyUserDefined('WITHDRAW_FIELD', '支持提現的積分類型', '選擇支持提現的積分類型和積分的兌率,如填寫100則表示100積分=1RMB', T('Recharge@Recharge/config'), $param_w)->keyDefault('WITHDRAW_METHOD', 'alipay')->keyDefault('WITHDRAW_MIN_AMOUNT', 0)->group('充值設置', 'OPEN_RECHARGE,RECHARGE_AMOUNT,CAN_INPUT,MIN_AMOUNT,METHOD,RE_FIELD')->group('提現設置', 'OPEN_WITHDRAW,WITHDRAW_AMOUNT,WITHDRAW_CAN_INPUT,WITHDRAW_MIN_AMOUNT,WITHDRAW_METHOD,WITHDRAW_FIELD');
     if (check_is_in_config('alipay', $data['METHOD'])) {
         $configBuilder->keyText('ALIPAY_PARTNER', '合作身份者id', '以2088開頭的16位純數字')->keyText('ALIPAY_SELLER_EMAIL', '收款支付寶賬號')->keyText('ALIPAY_KEY', '安全檢驗碼', '以數字和字母組成的32位字符')->group('支付寶配置', 'ALIPAY_PARTNER,ALIPAY_SELLER_EMAIL,ALIPAY_KEY');
     }
     $configBuilder->buttonSubmit()->buttonBack();
     $configBuilder->display();
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:22,代碼來源:RechargeController.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(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

示例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('首頁設置');
     $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

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

示例12: editAdv

 public function editAdv()
 {
     $advModel = D('Common/Adv');
     $aId = I('id', 0, 'intval');
     if ($aId != 0) {
         $adv = $advModel->find($aId);
         $aPosId = $adv['pos_id'];
     } else {
         $aPosId = I('get.pos_id', 0, 'intval');
     }
     $advPosModel = D('Common/AdvPos');
     $pos = $advPosModel->find($aPosId);
     if (IS_POST) {
         $adv['title'] = I('title', '', 'text');
         $adv['pos_id'] = $aPosId;
         $adv['url'] = I('url', '', 'text');
         $adv['sort'] = I('sort', 1, 'intval');
         $adv['status'] = I('status', 1, 'intval');
         $adv['create_time'] = I('create_time', '', 'intval');
         $adv['start_time'] = I('start_time', '', 'intval');
         $adv['end_time'] = I('end_time', '', 'intval');
         $adv['target'] = I('target', '', 'text');
         S('adv_list_' . $pos['name'] . $pos['path'], null);
         if ($pos['type'] == 2) {
             //todo 多圖
             $aTitles = I('title', '', 'text');
             $aUrl = I('url', '', 'text');
             $aSort = I('sort', '', 'intval');
             $aStartTime = I('start_time', '', 'intval');
             $aEndTime = I('end_time', '', 'intval');
             $aTarget = I('target', '', 'text');
             $added = 0;
             $advModel->where(array('pos_id' => $aPosId))->delete();
             foreach (I('pic', 0, 'intval') as $key => $v) {
                 $data['pic'] = $v;
                 $data['target'] = $aTarget[$key];
                 $adv_temp['title'] = $aTitles[$key];
                 $adv_temp['pos_id'] = $adv['pos_id'];
                 $adv_temp['url'] = $aUrl[$key];
                 $adv_temp['sort'] = $aSort[$key];
                 $adv_temp['status'] = 1;
                 $adv_temp['create_time'] = time();
                 $adv_temp['start_time'] = $aStartTime[$key];
                 $adv_temp['end_time'] = $aEndTime[$key];
                 $adv_temp['target'] = $aTarget[$key];
                 $adv_temp['data'] = json_encode($data);
                 $result = $advModel->add($adv_temp);
                 if ($result !== false) {
                     $added++;
                 }
                 //todo添加
             }
             $this->success('成功改動' . $added . '個廣告。');
         } else {
             switch ($pos['type']) {
                 case 1:
                     //todo 單圖
                     $data['pic'] = I('pic', 0, 'intval');
                     $data['target'] = I('target', 0, 'text');
                     break;
                 case 3:
                     $data['text'] = I('text', '', 'text');
                     $data['text_color'] = I('text_color', '', 'text');
                     $data['text_font_size'] = I('text_font_size', '', 'text');
                     $data['target'] = I('target', 0, 'text');
                     //todo 文字
                     break;
                 case 4:
                     //todo 代碼
                     $data['code'] = I('code', '', '');
                     break;
             }
             $adv['data'] = json_encode($data);
             if ($aId == 0) {
                 $result = $advModel->add($adv);
             } else {
                 $adv['id'] = $aId;
                 $result = $advModel->save($adv);
             }
             if ($result === false) {
                 $this->error('保存失敗。');
             } else {
                 $this->success('保存成功。');
             }
         }
     } else {
         //快速添加廣告位邏輯
         //todo 快速添加
         $builder = new AdminConfigBuilder();
         $adv['pos'] = $pos['title'] . '——' . $pos['name'] . '——' . $pos['path'];
         $adv['pos_id'] = $aPosId;
         $builder->keyReadOnly('pos', '所屬廣告位');
         $builder->keyReadOnly('pos_id', '廣告位ID');
         $builder->keyId()->keyTitle('title', '廣告說明');
         $builder->title($pos['title'] . '設置——' . $advPosModel->switchType($pos['type']));
         $builder->keyTime('start_time', '開始生效時間', '不設置則立即生效')->keyTime('end_time', '失效時間', '不設置則一直有效')->keyText('sort', '排序')->keyCreateTime()->keyStatus();
         $builder->buttonSubmit();
         $data = json_decode($adv['data'], true);
         if (!empty($data)) {
             $adv = array_merge($adv, $data);
//.........這裏部分代碼省略.........
開發者ID:naliduo,項目名稱:Lightweight-social-platform,代碼行數:101,代碼來源:AdvController.class.php

示例13: expandinfo_details

 public function expandinfo_details($uid = 0)
 {
     if (IS_POST) {
         /* 修改積分 xjw129xjt(肖駿濤)*/
         $data = I('post.');
         foreach ($data as $key => $val) {
             if (substr($key, 0, 5) == 'score') {
                 $data_score[$key] = $val;
             }
         }
         unset($key, $val);
         $res = D('Member')->where(array('uid' => $data['id']))->save($data_score);
         foreach ($data_score as $key => $val) {
             $value = query_user(array($key), $data['id']);
             if ($val == $value[$key]) {
                 continue;
             }
             D('Ucenter/Score')->addScoreLog($data['id'], cut_str('score', $key, 'l'), 'to', $val, '', 0, get_nickname(is_login()) . L('_BACKGROUND_ADJUSTMENT_'));
             D('Ucenter/Score')->cleanUserCache($data['id'], cut_str('score', $key, 'l'));
         }
         unset($key, $val);
         /* 修改積分 end*/
         /*身份設置 zzl(鄭鍾良)*/
         $data_role = array();
         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(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));
         }
//.........這裏部分代碼省略.........
開發者ID:naliduo,項目名稱:Lightweight-social-platform,代碼行數:101,代碼來源:UserController.class.php

示例14: create


//.........這裏部分代碼省略.........
	}

	/**
	 * ' . $module['alias'] . '設置
	 * @return void
	 * @author ' . $module['developer'] . '
	 */
	public function config() {
		$builder = new AdminConfigBuilder();
		$data = $builder->handleConfig();

		$builder->title(\'' . $module['alias'] . '基本設置\')
			->keyBool(\'NEED_VERIFY\', \'投稿是否需要審核\', \'默認無需審核\')
			->buttonSubmit(\'\', \'保存\')->data($data);
		$builder->display();
	}

	/**
	 * 添加' . $module['alias'] . '
	 * @return void
	 * @author ' . $module['developer'] . '
	 */
	public function add($id = 0) {
		$id = intval($id);
		if (IS_POST) {
			if (false) {
				$this->error(\'添加失敗\');
			}
			$this->success(\'添加成功\');
		} else {
			$builder = new AdminConfigBuilder();
			$opt = array();
			$data = array();
			$builder->title(\'新增' . $module['alias'] . '\')->keyId()->keyText(\'title\', \'標題\')
				->keySelect(\'pid\', \'父分類\', \'選擇父級分類\', array(\'0\' => \'頂級分類\') + $opt)
				->keyStatus()->keyCreateTime()->keyUpdateTime()
				->data($data)
				->buttonSubmit(U(\'' . $name . '/add\'))->buttonBack()->display();
		}
	}


	/**
	 * 刪除' . $module['alias'] . '
	 * @return void
	 * @author ' . $module['developer'] . '
	 */
	public function del($id = 0) {
		$id = intval($id);
		if (false) {
			$this->error(\'刪除失敗\');
		}
		$this->success(\'刪除成功\');
	}
}
');
            file_put_contents($modulePath . 'Model/' . $name . 'Model.class.php', '<?php
/**
 * ' . $module['alias'] . '模型
 * @author ' . $module['developer'] . '
 * generated by ' . date('Y-m-d H:i:s') . '
 */
namespace ' . $name . '\\Model;
use Common\\Model\\Base;

class ' . $name . 'Model extends Base {
開發者ID:admpub,項目名稱:OpenCenter,代碼行數:67,代碼來源:ModuleController.class.php

示例15: expandinfo_details

 public function expandinfo_details($uid = 0)
 {
     if (IS_POST) {
         /* 修改積分 xjw129xjt(肖駿濤)*/
         $data = I('post.');
         foreach ($data as $key => $val) {
             if (substr($key, 0, 5) == 'score') {
                 $data_score[$key] = $val;
             }
         }
         unset($key, $val);
         $res = D('Member')->where(array('uid' => $data['id']))->save($data_score);
         foreach ($data_score as $key => $val) {
             $value = query_user(array($key), $data['id']);
             if ($val == $value[$key]) {
                 continue;
             }
             D('Ucenter/Score')->addScoreLog($data['id'], cut_str('score', $key, 'l'), 'to', $val, '', 0, get_nickname(is_login()) . '後台調整');
             D('Ucenter/Score')->cleanUserCache($data['id'], cut_str('score', $key, 'l'));
         }
         unset($key, $val);
         /* 修改積分 end*/
         /*身份設置 zzl(鄭鍾良)*/
         $data_role = array();
         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));
         }
//.........這裏部分代碼省略.........
開發者ID:ccccy,項目名稱:wuanlife,代碼行數:101,代碼來源:UserController.class.php


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