本文整理汇总了PHP中Admin\Builder\AdminConfigBuilder::group方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminConfigBuilder::group方法的具体用法?PHP AdminConfigBuilder::group怎么用?PHP AdminConfigBuilder::group使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin\Builder\AdminConfigBuilder
的用法示例。
在下文中一共展示了AdminConfigBuilder::group方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
}
示例2: config
public function config()
{
$builder = new AdminConfigBuilder();
$data = $builder->handleConfig();
$builder->title(L('_BASIC_CONF_'));
$data['MAX_SHOW_HEIGHT'] = $data['MAX_SHOW_HEIGHT'] ? $data['MAX_SHOW_HEIGHT'] : 160;
$builder->keyInteger('MAX_SHOW_HEIGHT', L('_MAX_SHOW_HEIGHT_'))->keyDefault('MAX_SHOW_HEIGHT', 160);
$role_list = M('Role')->where(array('status' => 1))->field('id,title')->select();
foreach ($role_list as &$val) {
$val = array('data-id' => $val['id'], 'title' => $val['title']);
}
unset($val);
$default = array(array('data-id' => 'disable', 'title' => L('_DISABLE_'), 'items' => $role_list), array('data-id' => 'enable', 'title' => L('_ENABLED_'), 'items' => array()));
$builder->keyKanban('SHOW_ROLE_TAB', L('_IDENTITY_TAB_'), L('_IDENTITY_TAB_AFFIX_'));
$data['SHOW_ROLE_TAB'] = $builder->parseKanbanArray($data['SHOW_ROLE_TAB'], $role_list, $default);
$builder->group(L('_BASIC_CONF_'), 'MAX_SHOW_HEIGHT,SHOW_ROLE_TAB');
$data['USER_SHOW_TITLE1'] = $data['USER_SHOW_TITLE1'] ? $data['USER_SHOW_TITLE1'] : L('_ACTIVE_MEMBER_');
$data['USER_SHOW_COUNT1'] = $data['USER_SHOW_COUNT1'] ? $data['USER_SHOW_COUNT1'] : 5;
$data['USER_SHOW_ORDER_FIELD1'] = $data['USER_SHOW_ORDER_FIELD1'] ? $data['USER_SHOW_ORDER_FIELD1'] : 'score1';
$data['USER_SHOW_ORDER_TYPE1'] = $data['USER_SHOW_ORDER_TYPE1'] ? $data['USER_SHOW_ORDER_TYPE1'] : 'desc';
$data['USER_SHOW_CACHE_TIME1'] = $data['USER_SHOW_CACHE_TIME1'] ? $data['USER_SHOW_CACHE_TIME1'] : '600';
$data['USER_SHOW_TITLE2'] = $data['USER_SHOW_TITLE2'] ? $data['USER_SHOW_TITLE2'] : L('_NEW_MEMBER_');
$data['USER_SHOW_COUNT2'] = $data['USER_SHOW_COUNT2'] ? $data['USER_SHOW_COUNT2'] : 5;
$data['USER_SHOW_ORDER_FIELD2'] = $data['USER_SHOW_ORDER_FIELD2'] ? $data['USER_SHOW_ORDER_FIELD2'] : 'reg_time';
$data['USER_SHOW_ORDER_TYPE2'] = $data['USER_SHOW_ORDER_TYPE2'] ? $data['USER_SHOW_ORDER_TYPE2'] : 'desc';
$data['USER_SHOW_CACHE_TIME2'] = $data['USER_SHOW_CACHE_TIME2'] ? $data['USER_SHOW_CACHE_TIME2'] : '600';
$score = D("Ucenter/Score")->getTypeList(array('status' => 1));
$order['reg_time'] = L('_REGISTER_TIME_');
$order['last_login_time'] = L('_LAST_LOGIN_TIME_');
foreach ($score as $s) {
$order['score' . $s['id']] = '【' . $s['title'] . '】';
}
$builder->keyText('USER_SHOW_TITLE1', L('_TITLE_NAME_'), L('_BLOCK_TITLE_'));
$builder->keyText('USER_SHOW_COUNT1', L('_SHOW_PEOPLE_'), L('_TIP_AFTER_ENABLED_'));
$builder->keyRadio('USER_SHOW_ORDER_FIELD1', L('_SORT_NUMBER_'), L('_SHOW_SORT_STYLE_'), $order);
$builder->keyRadio('USER_SHOW_ORDER_TYPE1', L('_SORT_STYLE_'), L('_SHOW_SORT_STYLE_'), array('desc' => L('_COUNTER_'), 'asc' => L('_DIRECT_')));
$builder->keyText('USER_SHOW_CACHE_TIME1', L('_CACHE_TIME_'), L('_TIP_CACHE_TIME_'));
$builder->keyText('USER_SHOW_TITLE2', L('_TITLE_NAME_'), L('_BLOCK_TITLE_'));
$builder->keyText('USER_SHOW_COUNT2', L('_SHOW_PEOPLE_'), L('_TIP_AFTER_ENABLED_'));
$builder->keyRadio('USER_SHOW_ORDER_FIELD2', L('_SORT_NUMBER_'), L('_SHOW_SORT_STYLE_'), $order);
$builder->keyRadio('USER_SHOW_ORDER_TYPE2', L('_SORT_STYLE_'), L('_SHOW_SORT_STYLE_'), array('desc' => L('_COUNTER_'), 'asc' => L('_DIRECT_')));
$builder->keyText('USER_SHOW_CACHE_TIME2', L('_CACHE_TIME_'), L('_TIP_CACHE_TIME_'));
$builder->group(L('_HOME_SHOW_LEFT_'), 'USER_SHOW_TITLE1,USER_SHOW_COUNT1,USER_SHOW_ORDER_FIELD1,USER_SHOW_ORDER_TYPE1,USER_SHOW_CACHE_TIME1');
$builder->group(L('_HOME_SHOW_RIGHT_'), 'USER_SHOW_TITLE2,USER_SHOW_COUNT2,USER_SHOW_ORDER_FIELD2,USER_SHOW_ORDER_TYPE2,USER_SHOW_CACHE_TIME2');
$builder->data($data);
$builder->buttonSubmit();
$builder->display();
}
示例3: 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();
}
示例4: config
public function config()
{
$builder = new AdminConfigBuilder();
$data = $builder->handleConfig();
$data['OPEN_LOGIN_PANEL'] = $data['OPEN_LOGIN_PANEL'] ? $data['OPEN_LOGIN_PANEL'] : 1;
$builder->title(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();
}
示例5: 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();
}
示例6: 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();
}
示例7: config
public function config()
{
$builder = new AdminConfigBuilder();
$data = $builder->handleConfig();
$data['OPEN_LOGIN_PANEL'] = $data['OPEN_LOGIN_PANEL'] ? $data['OPEN_LOGIN_PANEL'] : 1;
$builder->title(L('_HOME_SETTING_'));
$modules = D('Common/Module')->getAll();
foreach ($modules as $m) {
if ($m['is_setup'] == 1 && $m['entry'] != '') {
if (file_exists(APP_PATH . $m['name'] . '/Widget/HomeBlockWidget.class.php')) {
$module[] = array('data-id' => $m['name'], 'title' => $m['alias']);
}
}
}
$module[] = array('data-id' => 'slider', 'title' => L('_CAROUSEL_'));
$default = array(array('data-id' => 'disable', 'title' => L('_DISABLED_'), 'items' => $module), array('data-id' => 'enable', 'title' => L('_ENABLED_'), 'items' => array()));
$builder->keyKanban('BLOCK', L('_DISPLAY_BLOCK_'), L('_TIP_DISPLAY_BLOCK_'));
$data['BLOCK'] = $builder->parseKanbanArray($data['BLOCK'], $module, $default);
$builder->group(L('_DISPLAY_BLOCK_'), 'BLOCK');
$show_blocks = get_kanban_config('BLOCK_SORT', 'enable', array(), 'Home');
$builder->buttonSubmit();
$builder->data($data);
$builder->display();
}
示例8: 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));
}
//.........这里部分代码省略.........
示例9: install
public function install()
{
$aName = I('get.name', '', 'text');
$aNav = I('add_nav', 0, 'intval');
$module = $this->moduleModel->getModule($aName);
if (IS_POST) {
//执行guide中的内容
$res = $this->moduleModel->install($module['id']);
if ($res === true) {
if ($aNav) {
$channel['title'] = $module['alias'];
$channel['url'] = $module['entry'];
$channel['sort'] = 100;
$channel['status'] = 1;
$channel['icon'] = $module['icon'];
M('Channel')->add($channel);
S('common_nav', null);
}
$this->success(L('_INSTALLATION_MODULE_SUCCESS_'), U('lists'));
} else {
$this->error(L('_SETUP_MODULE_FAILED_') . $this->moduleModel->getError());
}
} else {
$builder = new AdminConfigBuilder();
$builder->title($module['alias'] . L('_DASH_') . L('_GUIDE_MODULE_INSTALL_'));
$builder->keyId()->keyReadOnly('name', L('_MODULE_NAME_'))->keyText('alias', L('_MODULE_CHINESE_NAME_'))->keyReadOnly('version', L('_VERSION_'))->keyText('icon', L('_ICON_'))->keyTextArea('summary', L('_MODULE_INTRODUCTION_'))->keyReadOnly('developer', L('_DEVELOPER_'))->keyText('entry', L('_FRONT_ENTRANCE_'))->keyText('admin_entry', L('_BACKGROUND_ENTRY_'));
//, 'repair' => L('_FIX_MODE_')修复模式不会导入模块专用数据表,只导入菜单、权限、行为、行为限制
$builder->keyRadio('mode', L('_INSTALLATION_MODE_'), '', array('install' => L('_COVER_INSTALLATION_MODE_')));
if ($module['entry']) {
$builder->keyBool('add_nav', L('_ADD_NAVIGATION_'), L('_INSTALL_AUTO_ADD_MENU_', array('link' => U('channel/index'))));
}
/* $builder->keyRadio('add_nav',L('_ADD_NAVIGATION_MENU_'),L('_DEFAULT_WILL_NOT_ADD_NAVIGATION_'),array(1=>L('_DO_NOT_ADD_'),2=>L('_ADD_')));*/
$builder->group(L('_INSTALL_OPTION_'), 'mode,add_nav');
/* $builder->group(L('_MODULE_INFORMATION_'), 'id,name,alias,version,icon,summary,developer,entry,admin_entry');*/
$module['mode'] = 'install';
$module['add_nav'] = '1';
$builder->data($module);
$builder->buttonSubmit();
$builder->buttonBack();
$builder->display();
}
/* */
}
示例10: 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));
}
//.........这里部分代码省略.........
示例11: website
public function website()
{
$builder = new AdminConfigBuilder();
$data = $builder->handleConfig();
$builder->title('网站信息')->suggest('此处配置网站的一般信息。');
$builder->keyText('WEB_SITE_NAME', '网站名', '用于邮件,短信,站内信显示');
$builder->keyText('ICP', '网站备案号', '设置在网站底部显示的备案号,如“沪ICP备12007941号-2');
$builder->keySingleImage('LOGO', '网站Logo', '网站的logo设置,建议尺寸156*50');
$builder->keySingleImage('QRCODE', '微信二维码', '悬浮微信二维码');
$builder->keySingleImage('JUMP_BACKGROUND', '跳转页背景图片', '跳转页背景图片');
$builder->keyText('SUCCESS_WAIT_TIME', '成功等待时间', '设置成功时页面等待页面');
$builder->keyText('ERROR_WAIT_TIME', '失败等待时间', '设置失败时页面等待页面');
$builder->keyEditor('ABOUT_US', '关于我们内容', '页脚关于我们介绍');
$builder->keyEditor('SUBSCRIB_US', '关注我们', '页脚关注我们内容');
$builder->keyEditor('COPY_RIGHT', '版权信息', '页脚版权信息');
$builder->group('基本信息', array('WEB_SITE_NAME', 'ICP', 'LOGO', 'QRCODE'));
$builder->group('页脚信息', array('ABOUT_US', 'SUBSCRIB_US', 'COPY_RIGHT'));
$builder->group('跳转页面', array('JUMP_BACKGROUND', 'SUCCESS_WAIT_TIME', 'ERROR_WAIT_TIME'));
$builder->data($data);
$builder->keyDefault('SUCCESS_WAIT_TIME', 2);
$builder->keyDefault('ERROR_WAIT_TIME', 5);
$builder->buttonSubmit();
$builder->display();
}
示例12: website
public function website()
{
$builder = new AdminConfigBuilder();
$data = $builder->handleConfig();
$builder->title('网站信息')->suggest('此处配置网站的一般信息。');
$builder->keyText('WEB_SITE_NAME', '网站名', '用于邮件,短信,站内信显示');
$builder->keyText('ICP', '网站备案号', '设置在网站底部显示的备案号,如“沪ICP备12007941号-2');
$builder->keySingleImage('LOGO', '网站Logo', '网站的logo设置,建议尺寸156*50');
$builder->keySingleImage('QRCODE', '微信二维码', '悬浮微信二维码');
$builder->keySingleImage('JUMP_BACKGROUND', '跳转页背景图片', '跳转页背景图片');
$builder->keyText('SUCCESS_WAIT_TIME', '成功等待时间', '设置成功时页面等待页面');
$builder->keyText('ERROR_WAIT_TIME', '失败等待时间', '设置失败时页面等待页面');
$builder->keyEditor('ABOUT_US', '关于我们内容', '页脚关于我们介绍');
$builder->keyEditor('SUBSCRIB_US', '关注我们', '页脚关注我们内容');
$builder->keyEditor('COPY_RIGHT', '版权信息', '页脚版权信息');
$addons = \Think\Hook::get('uploadDriver');
$opt = array('local' => '本地');
foreach ($addons as $name) {
if (class_exists($name)) {
$class = new $name();
$config = $class->getConfig();
if ($config['switch']) {
$opt[$class->info['name']] = $class->info['title'];
}
}
}
$builder->keySelect('PICTURE_UPLOAD_DRIVER', '图片上传驱动', '图片上传驱动', $opt);
$builder->keySelect('DOWNLOAD_UPLOAD_DRIVER', '附件上传驱动', '附件上传驱动', $opt);
$builder->group('基本信息', array('WEB_SITE_NAME', 'ICP', 'LOGO', 'QRCODE'));
$builder->group('页脚信息', array('ABOUT_US', 'SUBSCRIB_US', 'COPY_RIGHT'));
$builder->group('跳转页面', array('JUMP_BACKGROUND', 'SUCCESS_WAIT_TIME', 'ERROR_WAIT_TIME'));
$builder->group('上传配置', array('PICTURE_UPLOAD_DRIVER', 'DOWNLOAD_UPLOAD_DRIVER'));
$builder->data($data);
$builder->keyDefault('SUCCESS_WAIT_TIME', 2);
$builder->keyDefault('ERROR_WAIT_TIME', 5);
$builder->buttonSubmit();
$builder->display();
}
示例13: website
public function website()
{
$builder = new AdminConfigBuilder();
$data = $builder->handleConfig();
$builder->title(L('_SITE_INFO_'))->suggest(L('_SITE_INFO_VICE_'));
/* $builder->keySelect('LANG', L('_WEBSITE_LANGUAGE_'), L('_SELECT_THE_DEFAULT_LANGUAGE_'), array('zh-cn' => L('_SIMPLIFIED_CHINESE_'), 'en-us' => L('_ENGLISH_')));*/
$builder->keyText('WEB_SITE_NAME', L('_SITE_NAME_'), L('_SITE_NAME_VICE_'));
$builder->keyText('ICP', L('_LICENSE_NO_'), L('_LICENSE_NO_VICE_'));
$builder->keySingleImage('LOGO', L('_SITE_LOGO_'), L('_SITE_LOGO_VICE_'));
$builder->keySingleImage('QRCODE', L('_QR_WEIXIN_'), L('_QR_WEIXIN_VICE_'));
$builder->keySingleImage('JUMP_BACKGROUND', L('_IMG_BG_REDIRECTED_'), L('_IMG_BG_REDIRECTED_'));
$builder->keyText('SUCCESS_WAIT_TIME', L(''), L(''));
$builder->keyText('ERROR_WAIT_TIME', L(''), L(''));
$builder->keyEditor('ABOUT_US', L(''), L(''));
$builder->keyEditor('SUBSCRIB_US', L(''), L(''));
$builder->keyEditor('COPY_RIGHT', L(''), L(''));
$addons = \Think\Hook::get('uploadDriver');
$opt = array('local' => L('_LOCAL_'));
foreach ($addons as $name) {
if (class_exists($name)) {
$class = new $name();
$config = $class->getConfig();
if ($config['switch']) {
$opt[$class->info['name']] = $class->info['title'];
}
}
}
$builder->keySelect('PICTURE_UPLOAD_DRIVER', L('_PICTURE_UPLOAD_DRIVER_'), L('_PICTURE_UPLOAD_DRIVER_'), $opt);
$builder->keySelect('DOWNLOAD_UPLOAD_DRIVER', L('_ATTACHMENT_UPLOAD_DRIVER_'), L('_ATTACHMENT_UPLOAD_DRIVER_'), $opt);
$builder->group(L('_BASIC_INFORMATION_'), array('WEB_SITE_NAME', 'ICP', 'LOGO', 'QRCODE', 'LANG'));
$builder->group(L('_THE_FOOTER_INFORMATION_'), array('ABOUT_US', 'SUBSCRIB_US', 'COPY_RIGHT'));
$builder->group(L('_JUMP_PAGE_'), array('JUMP_BACKGROUND', 'SUCCESS_WAIT_TIME', 'ERROR_WAIT_TIME'));
$builder->keyBool('GET_INFORMATION', L('_OPEN_INSTANT_ACCESS_TO_THE_MESSAGE_'), L('_OPEN_INSTANT_ACCESS_TO_THE_MESSAGE_VICE_'));
$builder->keyText('GET_INFORMATION_INTERNAL', L('_MESSAGE_POLLING_INTERVAL_'), L('_MESSAGE_POLLING_INTERVAL_VICE_'));
$builder->group(L('_PERFORMANCE_SETTINGS_'), array('GET_INFORMATION', 'GET_INFORMATION_INTERNAL'));
$builder->group(L('_UPLOAD_CONFIGURATION_'), array('PICTURE_UPLOAD_DRIVER', 'DOWNLOAD_UPLOAD_DRIVER'));
$builder->data($data);
$builder->keyDefault('SUCCESS_WAIT_TIME', 2);
$builder->keyDefault('ERROR_WAIT_TIME', 5);
$builder->keyDefault('LANG', 'zh-cn');
$builder->keyDefault('GET_INFORMATION', 1);
$builder->keyDefault('GET_INFORMATION_INTERNAL', 10);
$builder->buttonSubmit();
$builder->display();
}
示例14: install
public function install()
{
$aName = I('get.name', '', 'text');
$aNav = I('add_nav', 0, 'intval');
$module = $this->moduleModel->getModule($aName);
if (IS_POST) {
//执行guide中的内容
$res = $this->moduleModel->install($module['id']);
if ($res === true) {
if ($aNav) {
$channel['title'] = $module['alias'];
$channel['url'] = $module['entry'];
$channel['sort'] = 100;
$channel['status'] = 1;
$channel['icon'] = $module['icon'];
M('Channel')->add($channel);
S('common_nav', null);
}
$this->success('安装模块成功。', U('lists'));
} else {
$this->error('安装模块失败。' . $this->moduleModel->getError());
}
} else {
$builder = new AdminConfigBuilder();
$builder->title($module['alias'] . '——模块安装向导');
$builder->keyId()->keyReadOnly('name', '模块名')->keyText('alias', '模块中文名')->keyReadOnly('version', '版本')->keyText('icon', '图标')->keyTextArea('summary', '模块介绍')->keyReadOnly('developer', '开发者')->keyText('entry', '前台入口')->keyText('admin_entry', '后台入口');
//, 'repair' => '修复模式'修复模式不会导入模块专用数据表,只导入菜单、权限、行为、行为限制
$builder->keyRadio('mode', '安装模式', '', array('install' => '覆盖安装模式'));
if ($module['entry']) {
$builder->keyBool('add_nav', '添加导航', '安装后自动在导航栏中加入菜单,或者<a target="_blank" href="' . U('channel/index') . '">手动设置</a>');
}
/* $builder->keyRadio('add_nav','添加导航菜单','默认不会添加导航',array(1=>'不添加',2=>'添加'));*/
$builder->group('安装选项', 'mode,add_nav');
/* $builder->group('模块信息', 'id,name,alias,version,icon,summary,developer,entry,admin_entry');*/
$module['mode'] = 'install';
$module['add_nav'] = '1';
$builder->data($module);
$builder->buttonSubmit();
$builder->buttonBack();
$builder->display();
}
/* */
}
示例15: expandinfo_details
/**
* 用户扩展资料详情
* @param string $uid
* @author 郑钟良<zzl@ourstu.com>
*/
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;
}
}
$res = D('Member')->where(array('uid' => $data['id']))->save($data_score);
if ($res) {
$this->success('设置成功');
} else {
$this->error('设置失败');
}
/* 修改积分 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->group('基本设置', implode(',', $field_key));
$builder->group('积分设置', implode(',', $score_key));
$builder->data($member);
$builder->buttonSubmit('', '保存');
$builder->buttonBack();
$builder->display();
}
}