'', 'fieldchoices' => 'none')),
array('textarea', lang('plugin/xj_event', 'duoxingwenbenkuang'), array('valuenumber' => '', 'fieldchoices' => 'none')),
array('select', lang('plugin/xj_event', 'xiaweiliebiaokuang'), array('valuenumber' => 'none', 'fieldchoices' => '')),
//array('uploadfile', '上传图片', array('valuenumber' => '', 'fieldchoices' => 'none')),
)), 'text', 'mradio', '', '', lang('plugin/xj_event', 'xuanzebiaodanxiangdeleixing'));
showtagheader('tbody', 'valuenumber', true, 'sub');
showsetting(lang('plugin/xj_event', 'daxiaoxianding'), 'size', '0', 'text', '', '', lang('plugin/xj_event','zdktxdzfshzdkxztplxxzlsctpdx'), '', '', '');
showtagfooter('tbody');
showtagheader('tbody', 'fieldchoices', false, 'sub'); //第三个参数是隐藏
showsetting(lang('plugin/xj_event', 'kexuanzhi'), 'choices', '', 'textarea', '', '', lang('plugin/xj_event','mhygzlrsrbjsh'), '', '', '');
showtagfooter('tbody');
showsubmit('open_submit', 'submit');
showtablefooter();
} elseif ($_GET['act'] == 'edit') {
$id = intval($_GET['id']);
$item = DB::fetch_first("SELECT * FROM " . DB::table('xj_event_field') . " WHERE id=$id");
$formUrl = 'plugins&operation=config&do=' . $pluginid . '&identifier=xj_event&pmod=admin_field&id=' . $id . '&act=add_full';
showformheader($formUrl, 'enctype="multipart/form-data" onsubmit="return validate();"', 'createform');
showtableheader(lang('plugin/xj_event', 'tianjiabiaodanxiang'));
showsetting(lang('plugin/xj_event', 'biaodanxiangbiaoti'), 'title', $item['title'], 'text', '', '', lang('plugin/xj_event', 'tianxiebiaodanxiangdezhongwenmingchengruxingming'));
showsetting(lang('plugin/xj_event', 'biaodanxiangmiaoshu'), 'description', $item['description'], 'text', '', '', lang('plugin/xj_event', 'tianxiebiaodanxiangdejiandanmiaoshujieshao'));
showsetting(lang('plugin/xj_event', 'biaodanxiangleixing'), array('formtype', array(
array('text', lang('plugin/xj_event', 'danxingwenbenkuang'), array('valuenumber' => '', 'fieldchoices' => 'none')),
array('textarea', lang('plugin/xj_event', 'duoxingwenbenkuang'), array('valuenumber' => '', 'fieldchoices' => 'none')),
array('select', lang('plugin/xj_event', 'xiaweiliebiaokuang'), array('valuenumber' => 'none', 'fieldchoices' => '')),
)), $item['formtype'], 'mradio', '', '', lang('plugin/xj_event', 'xuanzebiaodanxiangdeleixing'));
if (in_array($item['formtype'], array('text', 'textarea', 'checkbox'))) {
$valuenumberdisplay = true;
} else {
$valuenumberdisplay = false;
}
if (in_array($item['formtype'], array('radio', 'checkbox', 'select'))) {
$fieldchoicesdisplay = true;
} else {
$fieldchoicesdisplay = false;
}
showtagheader('tbody', 'valuenumber', $valuenumberdisplay, 'sub');
showsetting(lang('plugin/xj_event', 'daxiaoxianding'), 'size', $item['size'], 'text', '', '', lang('plugin/xj_event','zdktxdzfshzdkxztplxxzlsctpdx'), '', '', '');
showtagfooter('tbody');
showtagheader('tbody', 'fieldchoices', $fieldchoicesdisplay, 'sub'); //第三个参数是隐藏
showsetting(lang('plugin/xj_event', 'kexuanzhi'), 'choices', $item['choices'], 'textarea', '', '', lang('plugin/xj_event','mhygzlrsrbjsh'), '', '', '');
showtagfooter('tbody');
showsubmit('open_submit', 'submit');
showtablefooter();
} elseif ($_GET['act'] == 'manage') {
//未开通卡号管理
$ppp = 20; //每页数量
$page = $_GET['page'] ? intval($_GET['page']) : 1;
$count = DB::result_first("SELECT COUNT(*) FROM " . DB::table('xj_event_field'));
$query = DB::query("SELECT * FROM " . DB::table('xj_event_field') . " LIMIT " . (($page - 1) * $ppp) . ",$ppp");
showtableheader(lang('plugin/xj_event', 'ziduanguanli'));
showtablerow('', array(), array('ID', lang('plugin/xj_event', 'ziduanbiaoti'), lang('plugin/xj_event', 'ziduanmiaoshu'), lang('plugin/xj_event', 'ziduanleixing'), ''), '');
while ($value = DB::fetch($query)) {
showtablerow('', array('class="td25"', 'class="td28"'), array($value['id'], $value['title'], $value['description'], $value['formtype'], '['.lang('plugin/xj_event', 'shanchu').'] [修改] '));
}
showtablefooter();
echo multi($count, $ppp, $page, ADMINSCRIPT . "?action=plugins&operation=config&do=$pluginid&identifier=xj_event&pmod=admin_card&act=wktmanage$extra");
}