当前位置: 首页>>代码示例>>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;未经允许,请勿转载。