fetch_all(null);
if(!$isfounder) {
unset($setting['ftp']);
}
$extbutton = '';
$operation = $operation ? $operation : 'basic';
if($operation == 'styles') {
$floatwinkeys = array('login', 'sendpm', 'newthread', 'reply', 'viewratings', 'viewwarning', 'viewthreadmod', 'viewvote', 'tradeorder', 'activity', 'debate', 'nav', 'usergroups', 'task');
$floatwinarray = array();
foreach($floatwinkeys as $k) {
$floatwinarray[] = array($k, $lang['setting_styles_global_allowfloatwin_'.$k]);
}
}
if(!submitcheck('settingsubmit')) {
if($operation == 'ec') {
shownav('extended', 'nav_ec', 'nav_ec_config');
} elseif(in_array($operation, array('memory', 'cachethread', 'serveropti'))) {
shownav('global', 'setting_optimize');
} elseif($operation == 'seo') {
shownav('global', 'nav_seo');
} elseif($operation == 'styles') {
shownav('style', 'setting_styles');
} elseif($operation == 'editor') {
shownav('style', 'setting_editor');
} elseif($operation == 'profile') {
shownav('user', 'nav_members_profile_group');
} elseif($operation == 'threadprofile') {
shownav('style', 'setting_threadprofile');
} elseif($operation == 'sec') {
shownav('safe', 'setting_sec');
} elseif($operation == 'seccheck') {
shownav('safe', 'setting_seccheck');
} elseif($operation == 'accountguard') {
shownav('safe', 'setting_accountguard');
} elseif(in_array($operation, array('mail', 'uc'))) {
shownav('founder', 'setting_'.$operation);
} else {
shownav('global', 'setting_'.$operation);
}
if(in_array($operation, array('memory', 'cachethread', 'serveropti', 'memorydata'))) {
$current = array($operation => 1);
$memorydata = memory('check') ? array('setting_memorydata', 'setting&operation=memorydata', $current['memorydata']) : '';
showsubmenu('setting_optimize', array(
array('setting_cachethread', 'setting&operation=cachethread', $current['cachethread']),
array('setting_serveropti', 'setting&operation=serveropti', $current['serveropti']),
array('setting_memory', 'setting&operation=memory', $current['memory']),
$memorydata
));
} elseif($operation == 'seo') {
$_GET['anchor'] = in_array($_GET['anchor'], array('rewrite', 'portal', 'forum', 'home', 'group')) ? $_GET['anchor'] : 'rewrite';
showsubmenuanchors('nav_seo', array(
array('nav_seo_rewrite', 'rewrite', $_GET['anchor'] == 'rewrite'),
array('nav_seo_portal', 'portal', $_GET['anchor'] == 'portal'),
array('nav_seo_forum', 'forum', $_GET['anchor'] == 'forum'),
array('nav_seo_home', 'home', $_GET['anchor'] == 'home'),
array('nav_seo_group', 'group', $_GET['anchor'] == 'group'),
array('other', 'other', $_GET['anchor'] == 'other'),
));
} elseif($operation == 'ec') {
showsubmenu('nav_ec', array(
array('nav_ec_config', 'setting&operation=ec', 1),
array('nav_ec_tenpay', 'ec&operation=tenpay', 0),
array('nav_ec_alipay', 'ec&operation=alipay', 0),
array('nav_ec_credit', 'ec&operation=credit', 0),
array('nav_ec_orders', 'ec&operation=orders', 0),
array('nav_ec_tradelog', 'tradelog&mod=forum', 0),
array('nav_ec_inviteorders', 'ec&operation=inviteorders', 0)
));
} elseif($operation == 'access') {
$_GET['anchor'] = in_array($_GET['anchor'], array('register', 'access')) ? $_GET['anchor'] : 'register';
showsubmenuanchors('setting_access', array(
array('setting_access_register', 'register', $_GET['anchor'] == 'register'),
array('setting_access_access', 'access', $_GET['anchor'] == 'access')
));
} elseif($operation == 'follow') {
$_GET['anchor'] = 'base';
showsubmenuanchors('setting_follow', array(
array('setting_follow_base', 'base', true)
));
} elseif($operation == 'home') {
$_GET['anchor'] = in_array($_GET['anchor'], array('base', 'privacy')) ? $_GET['anchor'] : 'base';
showsubmenuanchors('setting_home', array(
array('setting_home_base', 'base', $_GET['anchor'] == 'base'),
array('setting_home_privacy', 'privacy', $_GET['anchor'] == 'privacy')
));
} elseif($operation == 'profile') {
$_GET['anchor'] = in_array($_GET['anchor'], array('base', 'edit')) ? $_GET['anchor'] : 'base';
} elseif($operation == 'mail') {
$_GET['anchor'] = in_array($_GET['anchor'], array('setting', 'check')) ? $_GET['anchor'] : 'setting';
showsubmenuanchors('setting_mail', array(
array('setting_mail_setting', 'mailsetting', $_GET['anchor'] == 'setting'),
array('setting_mail_check', 'mailcheck', $_GET['anchor'] == 'check')
));
} elseif($operation == 'sec') {
$_GET['anchor'] = in_array($_GET['anchor'], array('base', 'reginput', 'postperiodtime')) ? $_GET['anchor'] : 'base';
showsubmenuanchors('setting_sec', array(
array('setting_sec_base', 'base', $_GET['anchor'] == 'base'),
array('setting_sec_reginput', 'reginput', $_GET['anchor'] == 'reginput'),
array('setting_sec_postperiodtime', 'postperiodtime', $_GET['anchor'] == 'postperiodtime'),
));
} elseif($operation == 'seccheck') {
$_GET['anchor'] = in_array($_GET['anchor'], array('seccode', 'secqaa')) ? $_GET['anchor'] : 'seccode';
showsubmenuanchors('setting_seccheck', array(
array('setting_sec_seccode', 'seccode', $_GET['anchor'] == 'seccode'),
array('setting_sec_secqaa', 'secqaa', $_GET['anchor'] == 'secqaa'),
));
} elseif($operation == 'attach') {
$_GET['anchor'] = in_array($_GET['anchor'], array('basic', 'forumattach', 'remote', 'albumattach', 'portalarticle')) ? $_GET['anchor'] : 'basic';
showsubmenuanchors('setting_attach', array(
array('setting_attach_basic', 'basic', $_GET['anchor'] == 'basic'),
$isfounder ? array('setting_attach_remote', 'remote', $_GET['anchor'] == 'remote') : '',
array('setting_attach_forumattach', 'forumattach', $_GET['anchor'] == 'forumattach'),
array('setting_attach_album', 'albumattach', $_GET['anchor'] == 'albumattach'),
array('setting_attach_portal_article_attach', 'portalarticle', $_GET['anchor'] == 'portalarticle'),
));
} elseif($operation == 'styles') {
$_GET['anchor'] = in_array($_GET['anchor'], array('global', 'index', 'forumdisplay', 'viewthread', 'threadprofile', 'numbercard', 'refresh', 'sitemessage')) ? $_GET['anchor'] : 'global';
$current = array($_GET['anchor'] => 1);
showsubmenu('setting_styles', array(
array('setting_styles_global', 'setting&operation=styles&anchor=global', $current['global']),
array('setting_styles_index', 'setting&operation=styles&anchor=index', $current['index']),
array('setting_styles_forumdisplay', 'setting&operation=styles&anchor=forumdisplay', $current['forumdisplay']),
array('setting_styles_viewthread', 'setting&operation=styles&anchor=viewthread', $current['viewthread']),
array('setting_styles_threadprofile', 'setting&operation=styles&anchor=threadprofile', $current['threadprofile']),
array('members_profile_numbercard', 'setting&operation=styles&anchor=numbercard', $current['numbercard']),
array('setting_styles_refresh', 'setting&operation=styles&anchor=refresh', $current['refresh']),
array('setting_styles_sitemessage', 'setting&operation=styles&anchor=sitemessage', $current['sitemessage'])
));
} elseif($operation == 'functions') {
$_GET['anchor'] = in_array($_GET['anchor'], array('curscript', 'mod', 'heatthread', 'recommend', 'comment', 'activity', 'other', 'threadexp', 'guide')) ? $_GET['anchor'] : 'curscript';
showsubmenu('setting_functions', array(
array('setting_functions_curscript', 'setting&operation=functions&anchor=curscript', $_GET['anchor'] == 'curscript'),
array('setting_functions_mod', 'setting&operation=functions&anchor=mod', $_GET['anchor'] == 'mod'),
array('setting_functions_heatthread', 'setting&operation=functions&anchor=heatthread', $_GET['anchor'] == 'heatthread'),
array('setting_functions_recommend', 'setting&operation=functions&anchor=recommend', $_GET['anchor'] == 'recommend'),
array('setting_functions_comment', 'setting&operation=functions&anchor=comment', $_GET['anchor'] == 'comment'),
array('setting_functions_guide', 'setting&operation=functions&anchor=guide', $_GET['anchor'] == 'guide'),
array('setting_functions_activity', 'setting&operation=functions&anchor=activity', $_GET['anchor'] == 'activity'),
array('setting_functions_threadexp', 'setting&operation=functions&anchor=threadexp', $_GET['anchor'] == 'threadexp'),
array('setting_functions_other', 'setting&operation=functions&anchor=other', $_GET['anchor'] == 'other'),
));
} elseif($operation == 'credits') {
$_GET['anchor'] = in_array($_GET['anchor'], array('base', 'policytable')) ? $_GET['anchor'] : 'base';
$current = array($_GET['anchor'] => 1);
showsubmenu('setting_credits', array(
array('setting_credits_base', 'setting&operation=credits&anchor=base', $current['base']),
array('setting_credits_policy', 'credits&operation=list&anchor=policytable', $current['policytable']),
));
} elseif($operation == 'editor') {
showsubmenu('setting_editor', array(
array('setting_editor_global', 'setting&operation=editor', 1),
array('setting_editor_code', 'misc&operation=bbcode', 0),
));
} elseif($operation == 'imgwater') {
$_GET['anchor'] = in_array($_GET['anchor'], array('portal', 'forum', 'album')) ? $_GET['anchor'] : 'portal';
showsubmenuanchors('setting_imgwater', array(
array('setting_imgwater_portal', 'portal', $_GET['anchor'] == 'portal'),
array('setting_imgwater_forum', 'forum', $_GET['anchor'] == 'forum'),
array('setting_imgwater_album', 'album', $_GET['anchor'] == 'album'),
));
} elseif($operation == 'mobile') {
$_GET['anchor'] = in_array($_GET['anchor'], array('status')) ? $_GET['anchor'] : 'status';
showsubmenuanchors('setting_mobile', array(
array('setting_mobile_status', 'status', $_GET['anchor'] == 'status')
));
} elseif($operation == 'antitheft') {
$_GET['anchor'] = in_array($_GET['anchor'], array('iplist'), true) ? $_GET['anchor'] : '';
showsubmenu('setting_antitheft', array(
array('setting_antitheft', 'setting&operation=antitheft', $_GET['anchor'] == ''),
array('setting_antitheft_iplist', 'setting&operation=antitheft&anchor=iplist', $_GET['anchor'] == 'iplist'),
));
} else {
showsubmenu('setting_'.$operation);
}
showformheader('setting&edit=yes', 'enctype');
showhiddenfields(array('operation' => $operation));
if($operation == 'basic') {
/*search={"setting_basic":"action=setting&operation=basic"}*/
showtableheader('');
showsetting('setting_basic_bbname', 'settingnew[bbname]', $setting['bbname'], 'text');
showsetting('setting_basic_sitename', 'settingnew[sitename]', $setting['sitename'], 'text');
showsetting('setting_basic_siteurl', 'settingnew[siteurl]', $setting['siteurl'], 'text');
showsetting('setting_basic_adminemail', 'settingnew[adminemail]', $setting['adminemail'], 'text');
showsetting('setting_basic_site_qq', 'settingnew[site_qq]', $setting['site_qq'], 'text',$disabled = '', $hidden = 0, $comment = '', $extra = 'id="settingnew[site_qq]"');
showsetting('setting_basic_icp', 'settingnew[icp]', $setting['icp'], 'text');
showsetting('setting_basic_boardlicensed', 'settingnew[boardlicensed]', $setting['boardlicensed'], 'radio');
showsetting('setting_basic_stat', 'settingnew[statcode]', $setting['statcode'], 'textarea');
showtablefooter();
showtableheader('setting_basic_bbclosed');
showsetting('setting_basic_bbclosed', 'settingnew[bbclosed]', $setting['bbclosed'], 'radio', 0, 1);
showsetting('setting_basic_closedreason', 'settingnew[closedreason]', $setting['closedreason'], 'textarea');
showsetting('setting_basic_bbclosed_activation', 'settingnew[closedallowactivation]', $setting['closedallowactivation'], 'radio');
showtagfooter('tbody');
/*search*/
} elseif($operation == 'follow') {
require_once libfile('function/forumlist');
/*search={"setting_follow":"action=setting&operation=follow","setting_follow_base":"action=setting&operation=follow&anchor=base"}*/
showtableheader('', 'nobottom', 'id="base"'.($_GET['anchor'] != 'base' ? ' style="display: none"' : ''));
showsetting('setting_follow_base_default_follow_retain_day', 'settingnew[followretainday]', $setting['followretainday'], 'text');
showsetting('setting_follow_base_default_view_profile', 'settingnew[allowquickviewprofile]', $setting['allowquickviewprofile'], 'radio');
showtablefooter();
/*search*/
} elseif($operation == 'home') {
require_once libfile('function/forumlist');
/*search={"setting_home":"action=setting&operation=home","setting_home_base":"action=setting&operation=home&anchor=base"}*/
showtableheader('', 'nobottom', 'id="base"'.($_GET['anchor'] != 'base' ? ' style="display: none"' : ''));
showsetting('setting_home_base_feedday', 'settingnew[feedday]', $setting['feedday'], 'text');
showsetting('setting_home_base_feedmaxnum', 'settingnew[feedmaxnum]', $setting['feedmaxnum'], 'text');
showsetting('setting_home_base_feedhotday', 'settingnew[feedhotday]', $setting['feedhotday'], 'text');
showsetting('setting_home_base_feedhotmin', 'settingnew[feedhotmin]', $setting['feedhotmin'], 'text');
showsetting('setting_home_base_feedtargetblank', 'settingnew[feedtargetblank]', $setting['feedtargetblank'], 'radio');
showsetting('setting_home_base_showallfriendnum', 'settingnew[showallfriendnum]', $setting['showallfriendnum'], 'text');
showsetting('setting_home_base_feedhotnum', 'settingnew[feedhotnum]', $setting['feedhotnum'], 'text');
showsetting('setting_home_base_maxpage', 'settingnew[maxpage]', $setting['maxpage'], 'text');
showsetting('setting_home_base_sendmailday', 'settingnew[sendmailday]', $setting['sendmailday'], 'text');
showsetting('setting_home_base_recycle_bin', 'settingnew[blogrecyclebin]', $setting['blogrecyclebin'], 'radio');
showtagfooter('tbody');
loadcache('forums');
showsetting('setting_home_base_groupnum', 'settingnew[friendgroupnum]', $setting['friendgroupnum'], 'text');
$threadtype = array('1' => 'poll', '2' => 'trade', '3' => 'reward', '4' => 'activity', '5' => 'debate');
$oldforums = $_G['cache']['forums'];
foreach($threadtype as $special => $key) {
if($special == 0) {
$fields = C::t('forum_forumfield')->fetch_all_by_fid(array_keys($_G['cache']['forums']));
foreach($fields as $fid => $field) {
if(!empty($field['threadsorts'])) {
unset($_G['cache']['forums'][$fid]);
}
}
} else {
$_G['cache']['forums'] = $oldforums;
}
$forumselect = "';
showsetting('setting_home_base_default_'.$key.'_forum', "settingnew[{$key}forumid]", $setting[$key.'forumid'], sprintf($forumselect, "settingnew[{$key}forumid]"));
}
showsetting('setting_home_base_default_doing', 'settingnew[defaultdoing]', $setting['defaultdoing'], 'textarea');
showtablefooter();
/*search*/
if(isset($setting['privacy'])) {
$setting['privacy'] = dunserialize($setting['privacy']);
}
/*search={"setting_home":"action=setting&operation=home","setting_home_privacy":"action=setting&operation=home&anchor=privacy"}*/
showtableheader('', 'nobottom', 'id="privacy"'.($_GET['anchor'] != 'privacy' ? ' style="display: none"' : ''));
showtitle('setting_home_privacy_new_user');
showsetting('setting_home_privacy_view_index', array('settingnew[privacy][view][index]', array(
array(0, $lang['setting_home_privacy_alluser']),
array(1, $lang['setting_home_privacy_friend']),
array(2, $lang['setting_home_privacy_self']),
array(3, $lang['setting_home_privacy_register'])
)), $setting['privacy']['view']['index'], 'select');
showsetting('setting_home_privacy_view_friend', array('settingnew[privacy][view][friend]', array(
array(0, $lang['setting_home_privacy_alluser']),
array(1, $lang['setting_home_privacy_friend']),
array(2, $lang['setting_home_privacy_self']),
array(3, $lang['setting_home_privacy_register'])
)), $setting['privacy']['view']['friend'], 'select');
showsetting('setting_home_privacy_view_wall', array('settingnew[privacy][view][wall]', array(
array(0, $lang['setting_home_privacy_alluser']),
array(1, $lang['setting_home_privacy_friend']),
array(2, $lang['setting_home_privacy_self']),
array(3, $lang['setting_home_privacy_register'])
)), $setting['privacy']['view']['wall'], 'select');
showsetting('setting_home_privacy_view_feed', array('settingnew[privacy][view][home]', array(
array(0, $lang['setting_home_privacy_alluser']),
array(1, $lang['setting_home_privacy_friend']),
array(3, $lang['setting_home_privacy_register'])
)), $setting['privacy']['view']['home'], 'select');
showsetting('setting_home_privacy_view_doing', array('settingnew[privacy][view][doing]', array(
array(0, $lang['setting_home_privacy_alluser']),
array(1, $lang['setting_home_privacy_friend']),
array(3, $lang['setting_home_privacy_register'])
)), $setting['privacy']['view']['doing'], 'select');
showsetting('setting_home_privacy_view_blog', array('settingnew[privacy][view][blog]', array(
array(0, $lang['setting_home_privacy_alluser']),
array(1, $lang['setting_home_privacy_friend']),
array(3, $lang['setting_home_privacy_register'])
)), $setting['privacy']['view']['blog'], 'select');
showsetting('setting_home_privacy_view_album', array('settingnew[privacy][view][album]', array(
array(0, $lang['setting_home_privacy_alluser']),
array(1, $lang['setting_home_privacy_friend']),
array(3, $lang['setting_home_privacy_register'])
)), $setting['privacy']['view']['album'], 'select');
showsetting('setting_home_privacy_view_share', array('settingnew[privacy][view][share]', array(
array(0, $lang['setting_home_privacy_alluser']),
array(1, $lang['setting_home_privacy_friend']),
array(3, $lang['setting_home_privacy_register'])
)), $setting['privacy']['view']['share'], 'select');
showsetting('setting_home_privacy_default_feed', array('settingnew[privacy][feed]', array(
array('doing', $lang['setting_home_privacy_default_feed_doing'], '1'),
array('blog', $lang['setting_home_privacy_default_feed_blog'], '1'),
array('upload', $lang['setting_home_privacy_default_feed_upload'], '1'),
array('share', $lang['setting_home_privacy_default_feed_share'], '1'),
array('poll', $lang['setting_home_privacy_default_feed_poll'], '1'),
array('joinpoll', $lang['setting_home_privacy_default_feed_joinpoll'], '1'),
array('friend', $lang['setting_home_privacy_default_feed_friend'], '1'),
array('comment', $lang['setting_home_privacy_default_feed_comments'], '1'),
array('show', $lang['setting_home_privacy_default_feed_show'], '1'),
array('credit', $lang['setting_home_privacy_default_feed_credit'], '1'),
array('spaceopen', $lang['setting_home_privacy_default_feed_spaceopen'], '1'),
array('invite', $lang['setting_home_privacy_default_feed_invite'], '1'),
array('task', $lang['setting_home_privacy_default_feed_task'], '1'),
array('profile', $lang['setting_home_privacy_default_feed_profile'], '1'),
array('click', $lang['setting_home_privacy_default_feed_click'], '1'),
array('newthread', $lang['setting_home_privacy_default_feed_newthread'], '1'),
array('newreply', $lang['setting_home_privacy_default_feed_newreply'], '1'),
)), $setting['privacy']['feed'], 'omcheckbox');
showtablefooter();
/*search*/
showtableheader();
} elseif($operation == 'profile') {
$profilegroup = dunserialize($setting['profilegroup']);
if($_GET['anchor'] == 'edit' && in_array($_GET['type'], array('base', 'contact', 'edu', 'work', 'info'))) {
shownav('user', 'nav_members_profile_group');
$groupinfo = $profilegroup[$_GET['type']];
showsubmenu($lang['setting_profile_group_name'].'-'.$groupinfo['title'], array(
array('members_profile_group', 'setting&operation=profile&anchor=base', 0),
array($lang['edit'], 'setting&operation=profile&anchor=edit&type='.$_GET['type'], 1),
));
showtableheader();
showsetting('setting_profile_group_name', "settingnew[profile][title]", $groupinfo['title'], 'text');
showsetting('setting_profile_group_available', "settingnew[profile][available]", $groupinfo['available'], 'radio');
showsetting('setting_profile_group_displayorder', "settingnew[profile][displayorder]", $groupinfo['displayorder'], 'text');
$varname = array('settingnew[profile][field]', array(), 'isfloat');
foreach(C::t('common_member_profile_setting')->fetch_all_by_available(1) as $value) {
if(!in_array($value['fieldid'], array('constellation', 'zodiac', 'birthyear', 'birthmonth', 'resideprovince', 'birthprovince', 'residedist', 'residecommunity'))) {
$varname[1][] = array($value['fieldid'], $value['title'], $value['fieldid']);
}
}
$varname[1][] = array('sightml', $lang['setting_profile_personal_signature'], 'sightml');
$varname[1][] = array('customstatus', $lang['setting_profile_permission_basic_status'], 'customstatus');
$varname[1][] = array('timeoffset', $lang['setting_profile_time_zone'], 'timeoffset');
showsetting('setting_profile_field', $varname, $groupinfo['field'], 'omcheckbox');
echo "";
showtablefooter();
} else {
$current = array($_GET['action'] => 1);
$profilenav = array(
array('members_profile_list', 'members&operation=profile', $current['members']),
array('members_profile_group', 'setting&operation=profile', $current['setting']),
);
showsubmenu($lang['members_profile'], $profilenav);
showtips('setting_profile_tips');
showtableheader('setting_profile_group_setting', 'fixpadding');
showsubtitle(array('setting_profile_group_available', 'setting_profile_group_displayorder', 'setting_profile_group_name', ''), 'header');
foreach($profilegroup as $key => $group) {
showtablerow('', array('class="td25"', '', '', 'class="td25"'), array(
"",
"",
"",
"".$lang['edit'].""
));
}
showtablefooter();
}
} elseif($operation == 'access') {
$wmsgcheck = array($setting['welcomemsg'] =>'checked');
$setting['inviteconfig'] = dunserialize($setting['inviteconfig']);
$setting['extcredits'] = dunserialize($setting['extcredits']);
$buycredits = $rewardcredits = '';
for($i = 0; $i <= 8; $i++) {
if($setting['extcredits'][$i]['available']) {
$extcredit = 'extcredits'.$i.' ('.$setting['extcredits'][$i]['title'].')';
$buycredits .= '';
$rewardcredits .= '';
}
}
$groupselect = '';
foreach(C::t('common_usergroup')->fetch_all_by_type('special') as $group) {
$groupselect .= "\n";
}
$taskarray = array(array('', cplang('select')));
foreach(C::t('common_task')->fetch_all_by_available(2) as $task) {
$taskarray[] = array($task['taskid'], $task['name']);
}
/*search={"setting_access":"action=setting&operation=access","setting_access_register":"action=setting&operation=access&anchor=register"}*/
showtableheader('', 'nobottom', 'id="register"'.($_GET['anchor'] != 'register' ? ' style="display: none"' : ''));
$regstatus = array();
if($setting['regstatus'] == 1 || $setting['regstatus'] == 3) {
$regstatus[] = 'open';
}
if($setting['regstatus'] == 2 || $setting['regstatus'] == 3) {
$regstatus[] = 'invite';
}
if($setting['regconnect']) {
$regstatus[] = 'connect';
}
showsetting('setting_access_register_status', array('settingnew[regstatus]', array(
array('open', $lang['setting_access_register_open']),
array('invite', $lang['setting_access_register_invite'], 'showinvite'),
$_G['setting']['connect']['allow'] ? array('connect', $lang['setting_access_register_connect']) : array(),
)), $regstatus, 'mcheckbox');
showtagheader('tbody', 'showinvite', in_array('invite', $regstatus), 'sub');
showsetting('setting_access_register_invite_buyprompt', 'settingnew[inviteconfig][invitecodeprompt]', $setting['inviteconfig']['invitecodeprompt'], 'textarea');
showsetting('setting_access_register_invite_buy', 'settingnew[inviteconfig][buyinvitecode]', $setting['inviteconfig']['buyinvitecode'], 'radio');
showsetting('setting_access_register_invite_buyprice', 'settingnew[inviteconfig][invitecodeprice]', $setting['inviteconfig']['invitecodeprice'], 'text');
showsetting('setting_access_register_invite_credit', '', '', '');
showsetting('setting_access_register_invite_addcredit', 'settingnew[inviteconfig][inviteaddcredit]', $setting['inviteconfig']['inviteaddcredit'], 'text');
showsetting('setting_access_register_invite_invitedcredit', 'settingnew[inviteconfig][invitedaddcredit]', $setting['inviteconfig']['invitedaddcredit'], 'text');
showsetting('setting_access_register_invite_group', '', '', '');
showsetting('setting_access_register_invite_areawhite', 'settingnew[inviteconfig][inviteareawhite]', $setting['inviteconfig']['inviteareawhite'], 'textarea');
showsetting('setting_access_register_invite_ipwhite', 'settingnew[inviteconfig][inviteipwhite]', $setting['inviteconfig']['inviteipwhite'], 'textarea');
showtagfooter('tbody');
showsetting('setting_access_register_regclosemessage', 'settingnew[regclosemessage]', $setting['regclosemessage'], 'textarea');
showsetting('setting_access_register_name', 'settingnew[regname]', $setting['regname'], 'text');
showsetting('setting_access_register_send_register_url', 'settingnew[sendregisterurl]', $setting['sendregisterurl'], 'radio');
showsetting('setting_access_register_link_name', 'settingnew[reglinkname]', $setting['reglinkname'], 'text');
showsetting('setting_access_register_censoruser', 'settingnew[censoruser]', $setting['censoruser'], 'textarea');
showsetting('setting_access_register_pwlength', 'settingnew[pwlength]', $setting['pwlength'], 'text');
$setting['strongpw'] = dunserialize($setting['strongpw']);
showsetting('setting_access_register_strongpw', array('settingnew[strongpw]', array(
array('1', $lang['setting_access_register_strongpw_1']),
array('2', $lang['setting_access_register_strongpw_2']),
array('3', $lang['setting_access_register_strongpw_3']),
array('4', $lang['setting_access_register_strongpw_4']),
)), $setting['strongpw'], 'mcheckbox2');
showsetting('setting_access_register_verify', array('settingnew[regverify]', array(
array(0, $lang['none'], array('regverifyext' => 'none')),
array(1, $lang['setting_access_register_verify_email'], array('regverifyext' => '')),
array(2, $lang['setting_access_register_verify_manual'], array('regverifyext' => ''))
)), $setting['regverify'], 'mradio');
showtagheader('tbody', 'regverifyext', $setting['regverify'], 'sub');
showsetting('setting_access_register_verify_areawhite', 'settingnew[areaverifywhite]', $setting['areaverifywhite'], 'textarea');
showsetting('setting_access_register_verify_ipwhite', 'settingnew[ipverifywhite]', $setting['ipverifywhite'], 'textarea');
showtagfooter('tbody');
showsetting('setting_access_register_maildomain', array('settingnew[regmaildomain]', array(
array(0, $lang['none'], array('regmaildomainext' => 'none')),
array(1, $lang['setting_access_register_maildomain_white'], array('regmaildomainext' => '')),
array(2, $lang['setting_access_register_maildomain_black'], array('regmaildomainext' => ''))
)), $setting['regmaildomain'], 'mradio');
showtagheader('tbody', 'regmaildomainext', $setting['regmaildomain'], 'sub');
showsetting('setting_access_register_maildomain_list', 'settingnew[maildomainlist]', $setting['maildomainlist'], 'textarea');
showtagfooter('tbody');
showsetting('setting_access_register_ctrl', 'settingnew[regctrl]', $setting['regctrl'], 'text');
showsetting('setting_access_register_floodctrl', 'settingnew[regfloodctrl]', $setting['regfloodctrl'], 'text');
showsetting('setting_access_register_ipctrl_time', 'settingnew[ipregctrltime]', $setting['ipregctrltime'], 'text');
showsetting('setting_access_register_ipctrl', 'settingnew[ipregctrl]', $setting['ipregctrl'], 'textarea');
$welcomemsg = array();
if($setting['welcomemsg'] == 1) {
$welcomemsg[] = '1';
} elseif($setting['welcomemsg'] == 2) {
$welcomemsg[] = '2';
} elseif($setting['welcomemsg'] == 3) {
$welcomemsg[] = '1';
$welcomemsg[] = '2';
} else {
$welcomemsg[] = '0';
}
showsetting('setting_access_register_welcomemsg', array('settingnew[welcomemsg]', array(
array(1, $lang['setting_access_register_welcomemsg_pm']),
array(2, $lang['setting_access_register_welcomemsg_email'])
)), $welcomemsg, 'mcheckbox');
showsetting('setting_access_register_welcomemsgtitle', 'settingnew[welcomemsgtitle]', $setting['welcomemsgtitle'], 'text');
showsetting('setting_access_register_welcomemsgtxt', 'settingnew[welcomemsgtxt]', $setting['welcomemsgtxt'], 'textarea');
showsetting('setting_access_register_bbrules', 'settingnew[bbrules]', $setting['bbrules'], 'radio', '', 1);
showsetting('setting_access_register_bbruleforce', 'settingnew[bbrulesforce]', $setting['bbrulesforce'], 'radio');
showsetting('setting_access_register_bbrulestxt', 'settingnew[bbrulestxt]', $setting['bbrulestxt'], 'textarea');
showtagfooter('tbody');
showtablefooter();
/*search*/
/*search={"setting_access":"action=setting&operation=access","setting_access_access":"action=setting&operation=access&anchor=access"}*/
showtableheader('', 'nobottom', 'id="access"'.($_GET['anchor'] != 'access' ? ' style="display: none"' : ''));
showsetting('setting_access_access_newbiespan', 'settingnew[newbiespan]', $setting['newbiespan'], 'text');
showsetting('setting_access_access_ipaccess', 'settingnew[ipaccess]', $setting['ipaccess'], 'textarea');
showsetting('setting_access_access_adminipaccess', 'settingnew[adminipaccess]', $setting['adminipaccess'], 'textarea');
showsetting('setting_access_access_domainwhitelist', 'settingnew[domainwhitelist]', '', '
'.cplang('setting_access_access_domainwhitelist_affectimg'));
showtablefooter();
/*search*/
showtableheader('', 'notop');
showsubmit('settingsubmit');
showtablefooter();
showformfooter();
exit;
} elseif($operation == 'styles') {
$_G['setting']['showsettings'] = str_pad(decbin($setting['showsettings']), 3, 0, STR_PAD_LEFT);
$setting['showsignatures'] = $_G['setting']['showsettings']{0};
$setting['showavatars'] = $_G['setting']['showsettings']{1};
$setting['showimages'] = $_G['setting']['showsettings']{2};
$setting['postnocustom'] = implode("\n", (array)dunserialize($setting['postnocustom']));
$setting['sitemessage'] = dunserialize($setting['sitemessage']);
$setting['disallowfloat'] = $setting['disallowfloat'] ? dunserialize($setting['disallowfloat']) : array();
$setting['allowfloatwin'] = array_diff($floatwinkeys, $setting['disallowfloat']);
$setting['indexhot'] = dunserialize($setting['indexhot']);
$setting['customauthorinfo'] = dunserialize($setting['customauthorinfo']);
$setting['customauthorinfo'] = $setting['customauthorinfo'][0];
list($setting['zoomstatus'], $setting['imagemaxwidth']) = explode("\t", $setting['zoomstatus']);
$setting['imagemaxwidth'] = !empty($setting['imagemaxwidth']) ? $setting['imagemaxwidth'] : 600;
$setting['guestviewthumb'] = dunserialize($setting['guestviewthumb']);
$setting['guesttipsinthread'] = dunserialize($setting['guesttipsinthread']);
/*search={"setting_styles":"action=setting&operation=styles","setting_styles_global":"action=setting&operation=styles&anchor=global"}*/
showtips('setting_tips', 'global_tips', $_GET['anchor'] == 'global');
showtableheader('setting_styles_global', 'nobottom', 'id="global"'.($_GET['anchor'] != 'global' ? ' style="display: none"' : ''));
showsetting('setting_styles_global_home_style', array('settingnew[homestyle]', array(
array(1, $lang['setting_styles_global_home_style_1']),
array(0, $lang['setting_styles_global_home_style_0']),
)), $setting['homestyle'], 'mradio');
showsetting('setting_styles_global_homepage_style', array('settingnew[homepagestyle]', array(
array(1, $lang['setting_styles_global_homepage_style_1']),
array(0, $lang['setting_styles_global_homepage_style_0']),
)), $setting['homepagestyle'], 'mradio');
showsetting('setting_styles_global_navsubhover', array('settingnew[navsubhover]', array(
array(0, $lang['setting_styles_global_navsubhover_0']),
array(1, $lang['setting_styles_global_navsubhover_1']),
)), $setting['navsubhover'], 'mradio');
showsetting('setting_styles_index_allowwidthauto', array('settingnew[allowwidthauto]', array(
array(1, $lang['setting_styles_index_allowwidthauto_1']),
array(0, $lang['setting_styles_index_allowwidthauto_0']),
), 1), $setting['allowwidthauto'], 'mradio');
showtagheader('tbody', '', 1, 'sub');
showsetting('setting_styles_index_switchwidthauto', 'settingnew[switchwidthauto]', $setting['switchwidthauto'], 'radio');
showtagfooter('tbody');
showsetting('setting_styles_global_allowfloatwin', array('settingnew[allowfloatwin]', $floatwinarray), $setting['allowfloatwin'], 'mcheckbox');
showsetting('setting_styles_global_showfjump', 'settingnew[showfjump]', $setting['showfjump'], 'radio');
showsetting('setting_styles_global_creditnotice', 'settingnew[creditnotice]', $setting['creditnotice'], 'radio');
showsetting('setting_styles_global_showusercard', 'settingnew[showusercard]', $setting['showusercard'], 'radio');
showsetting('setting_styles_global_anonymoustext', 'settingnew[anonymoustext]', $setting['anonymoustext'], 'text');
showtablefooter();
/*search*/
/*search={"setting_styles":"action=setting&operation=styles","setting_styles_index":"action=setting&operation=styles&anchor=index"}*/
showtableheader('setting_styles_index', 'nobottom', 'id="index"'.($_GET['anchor'] != 'index' ? ' style="display: none"' : ''));
showsetting('setting_styles_index_indexhot_status', 'settingnew[indexhot][status]', $setting['indexhot']['status'], 'radio', 0, 1);
showsetting('setting_styles_index_indexhot_limit', 'settingnew[indexhot][limit]', $setting['indexhot']['limit'], 'text');
showsetting('setting_styles_index_indexhot_days', 'settingnew[indexhot][days]', $setting['indexhot']['days'], 'text');
showsetting('setting_styles_index_indexhot_expiration', 'settingnew[indexhot][expiration]', $setting['indexhot']['expiration'], 'text');
showsetting('setting_styles_index_indexhot_messagecut', 'settingnew[indexhot][messagecut]', $setting['indexhot']['messagecut'], 'text');
showtagfooter('tbody');
showsetting('setting_styles_index_subforumsindex', 'settingnew[subforumsindex]', $setting['subforumsindex'], 'radio');
showsetting('setting_styles_index_forumlinkstatus', 'settingnew[forumlinkstatus]', $setting['forumlinkstatus'], 'radio');
showsetting('setting_styles_index_forumallowside', 'settingnew[forumallowside]', $setting['forumallowside'], 'radio');
showsetting('setting_styles_index_whosonline', array('settingnew[whosonlinestatus]', array(
array(0, $lang['setting_styles_index_display_none']),
array(1, $lang['setting_styles_index_whosonline_index']),
array(2, $lang['setting_styles_index_whosonline_forum']),
array(3, $lang['setting_styles_index_whosonline_both'])
)), $setting['whosonlinestatus'], 'select');
showsetting('setting_styles_index_whosonline_contract', 'settingnew[whosonline_contract]', $setting['whosonline_contract'], 'radio');
showsetting('setting_styles_index_online_more_members', 'settingnew[maxonlinelist]', $setting['maxonlinelist'], 'text');
showsetting('setting_styles_index_hideprivate', 'settingnew[hideprivate]', $setting['hideprivate'], 'radio');
showsetting('setting_styles_index_showfollowcollection', 'settingnew[showfollowcollection]', $setting['showfollowcollection'], 'text');
showsetting('setting_styles_index_disfixednv', 'settingnew[disfixednv_forumindex]', !empty($setting['disfixednv_forumindex']), 'radio');
showtablefooter();
/*search*/
/*search={"setting_styles":"action=setting&operation=styles","setting_styles_forumdisplay":"action=setting&operation=styles&anchor=forumdisplay"}*/
showtips('setting_tips', 'forumdisplay_tips', $_GET['anchor'] == 'forumdisplay');
showtableheader('setting_styles_forumdisplay', 'nobottom', 'id="forumdisplay"'.($_GET['anchor'] != 'forumdisplay' ? ' style="display: none"' : ''));
showsetting('setting_styles_forumdisplay_tpp', 'settingnew[topicperpage]', $setting['topicperpage'], 'text');
showsetting('setting_styles_forumdisplay_threadmaxpages', 'settingnew[threadmaxpages]', $setting['threadmaxpages'], 'text');
showsetting('setting_styles_forumdisplay_leftsidewidth', 'settingnew[leftsidewidth]', $setting['leftsidewidth'], 'text');
showsetting('setting_styles_forumdisplay_leftsideopen', 'settingnew[leftsideopen]', $setting['leftsideopen'], 'radio');
showsetting('setting_styles_forumdisplay_globalstick', 'settingnew[globalstick]', $setting['globalstick'], 'radio');
showsetting('setting_styles_forumdisplay_targetblank', 'settingnew[targetblank]', $setting['targetblank'], 'radio');
showsetting('setting_styles_forumdisplay_stick', 'settingnew[threadsticky]', $setting['threadsticky'], 'text');
showsetting('setting_styles_forumdisplay_part', 'settingnew[forumseparator]', $setting['forumseparator'], 'radio');
showsetting('setting_styles_forumdisplay_visitedforums', 'settingnew[visitedforums]', $setting['visitedforums'], 'text');
showsetting('setting_styles_forumdisplay_fastpost', 'settingnew[fastpost]', $setting['fastpost'], 'radio', 0, 1);
showsetting('setting_styles_forumdisplay_fastsmilies', 'settingnew[fastsmilies]', $setting['fastsmilies'], 'radio');
showtagfooter('tbody');
$setting['forumpicstyle'] = dunserialize($setting['forumpicstyle']);
showsetting('setting_styles_forumdisplay_forumpicstyle_thumbwidth', 'settingnew[forumpicstyle][thumbwidth]', $setting['forumpicstyle']['thumbwidth'], 'text');
showsetting('setting_styles_forumdisplay_forumpicstyle_thumbheight', 'settingnew[forumpicstyle][thumbheight]', $setting['forumpicstyle']['thumbheight'], 'text');
showsetting('setting_styles_forumdisplay_forumpicstyle_thumbnum', 'settingnew[forumpicstyle][thumbnum]', $setting['forumpicstyle']['thumbnum'], 'text');
$stamplist[] = array(0, '');
foreach(C::t('common_smiley')->fetch_all_by_type('stamplist') as $smiley) {
$stamplist[] = array($smiley['displayorder'], $smiley['code']);
}
showsetting('setting_styles_forumdisplay_newbie', array('settingnew[newbie]', $stamplist), $setting['newbie'], 'select');
showsetting('setting_styles_forumdisplay_disfixednv_forumdisplay', 'settingnew[disfixednv_forumdisplay]', !empty($setting['disfixednv_forumdisplay']), 'radio');
showsetting('setting_styles_forumdisplay_threadpreview', 'settingnew[forumdisplaythreadpreview]', !empty($setting['forumdisplaythreadpreview']), 'radio');
showtablefooter();
/*search*/
/*search={"setting_styles":"action=setting&operation=styles","setting_styles_viewthread":"action=setting&operation=styles&anchor=viewthread"}*/
showtagheader('div', 'viewthread', $_GET['anchor'] == 'viewthread');
showtableheader('nav_setting_viewthread', 'nobottom');
showsetting('setting_styles_viewthread_ppp', 'settingnew[postperpage]', $setting['postperpage'], 'text');
showsetting('setting_styles_viewthread_starthreshold', 'settingnew[starthreshold]', $setting['starthreshold'], 'text');
showsetting('setting_styles_viewthread_maxsigrows', 'settingnew[maxsigrows]', $setting['maxsigrows'], 'text');
showsetting('setting_styles_viewthread_sigviewcond', 'settingnew[sigviewcond]', $setting['sigviewcond'], 'text');
showsetting('setting_styles_viewthread_rate_on', 'settingnew[ratelogon]', $setting['ratelogon'], 'radio');
showsetting('setting_styles_viewthread_rate_number', 'settingnew[ratelogrecord]', $setting['ratelogrecord'], 'text');
showsetting('setting_styles_viewthread_collection_number', 'settingnew[collectionnum]', $setting['collectionnum'], 'text');
showsetting('setting_styles_viewthread_relate_number', 'settingnew[relatenum]', $setting['relatenum'], 'text');
showsetting('setting_styles_viewthread_relate_time', 'settingnew[relatetime]', $setting['relatetime'], 'text');
showsetting('setting_styles_viewthread_show_signature', 'settingnew[showsignatures]', $setting['showsignatures'], 'radio');
showsetting('setting_styles_viewthread_show_face', 'settingnew[showavatars]', $setting['showavatars'], 'radio');
showsetting('setting_styles_viewthread_show_images', 'settingnew[showimages]', $setting['showimages'], 'radio');
showsetting('setting_styles_viewthread_imagemaxwidth', 'settingnew[imagemaxwidth]', $setting['imagemaxwidth'], 'text');
showsetting('setting_styles_viewthread_imagelistthumb', 'settingnew[imagelistthumb]', $setting['imagelistthumb'], 'text');
showsetting('setting_styles_viewthread_zoomstatus', 'settingnew[zoomstatus]', $setting['zoomstatus'], 'radio', 0, 1);
showsetting('setting_styles_viewthread_showexif', 'settingnew[showexif]', $setting['showexif'], 'radio', !function_exists('exif_read_data'));
showtagfooter('tbody');
showsetting('setting_styles_viewthread_vtonlinestatus', array('settingnew[vtonlinestatus]', array(
array(0, $lang['setting_styles_viewthread_display_none']),
array(1, $lang['setting_styles_viewthread_online_easy']),
array(2, $lang['setting_styles_viewthread_online_exactitude'])
)), $setting['vtonlinestatus'], 'select');
showsetting('setting_styles_viewthread_userstatusby', 'settingnew[userstatusby]', $setting['userstatusby'], 'radio');
showsetting('setting_styles_viewthread_postno', 'settingnew[postno]', $setting['postno'], 'text');
showsetting('setting_styles_viewthread_postnocustom', 'settingnew[postnocustom]', $setting['postnocustom'], 'textarea');
showsetting('setting_styles_viewthread_maxsmilies', 'settingnew[maxsmilies]', $setting['maxsmilies'], 'text');
showsetting('setting_styles_viewthread_author_onleft', array('settingnew[authoronleft]', array(
array(1, cplang('setting_styles_viewthread_author_onleft_yes')),
array(0, cplang('setting_styles_viewthread_author_onleft_no')))), $setting['authoronleft'], 'mradio');
showsetting('setting_styles_forumdisplay_disfixedavatar', 'settingnew[disfixedavatar]', !empty($setting['disfixedavatar']), 'radio');
showsetting('setting_styles_forumdisplay_disfixednv_viewthread', 'settingnew[disfixednv_viewthread]', !empty($setting['disfixednv_viewthread']), 'radio');
showsetting('setting_styles_forumdisplay_threadguestlite', 'settingnew[threadguestlite]', !empty($setting['threadguestlite']), 'radio');
showsetting('setting_styles_viewthread_close_leftinfo', 'settingnew[close_leftinfo]', !empty($setting['close_leftinfo']), 'radio');
showsetting('setting_styles_viewthread_close_leftinfo_userctrl', 'settingnew[close_leftinfo_userctrl]', !empty($setting['close_leftinfo_userctrl']), 'radio');
showsetting('setting_styles_viewthread_guestviewthumb', 'settingnew[guestviewthumb][flag]', !empty($setting['guestviewthumb']['flag']), 'radio', 0, 1);
showsetting('setting_styles_viewthread_guestviewthumb_width', 'settingnew[guestviewthumb][width]', $setting['guestviewthumb']['width'], 'text');
showsetting('setting_styles_viewthread_guestviewthumb_height', 'settingnew[guestviewthumb][height]', $setting['guestviewthumb']['height'], 'text');
showtagfooter('tbody');
showsetting('setting_styles_viewthread_guesttipsinthread', 'settingnew[guesttipsinthread][flag]', !empty($setting['guesttipsinthread']['flag']), 'radio', 0, 1);
showsetting('setting_styles_viewthread_guesttipsinthread_text', 'settingnew[guesttipsinthread][text]', $setting['guesttipsinthread']['text'], 'text');
showtagfooter('tbody');
showsetting('setting_styles_viewthread_imgcontent', 'settingnew[imgcontentwidth]', $setting['imgcontentwidth'], 'text');
showsetting('setting_styles_viewthread_fast_reply', 'settingnew[allowfastreply]', $setting['allowfastreply'], 'radio');
showsetting('setting_styles_viewthread_allow_replybg', 'settingnew[allowreplybg]', $setting['allowreplybg'], 'radio', 0, 1);
$replybghtml = '';
if($setting['globalreplybg']) {
$replybghtml = '
';
}
if($setting['globalreplybg']) {
$replybgurl = parse_url($setting['globalreplybg']);
}
showsetting('setting_styles_viewthread_global_reply_background', 'globalreplybg', (!$replybgurl['host'] ? str_replace($_G['setting']['attachurl'].'common/', '', $setting['globalreplybg']) : $setting['globalreplybg']), 'filetext', '', 0, $replybghtml);
showtablefooter();
showtagfooter('div');
$setting['msgforward'] = !empty($setting['msgforward']) ? dunserialize($setting['msgforward']) : array();
$setting['msgforward']['messages'] = !empty($setting['msgforward']['messages']) ? implode("\n", $setting['msgforward']['messages']) : '';
showtablefooter();
/*search*/
/*search={"setting_styles":"action=setting&operation=styles","setting_styles_threadprofile":"action=setting&operation=styles&anchor=threadprofile"}*/
loadcache('usergroups');
$threadprofiles = C::t('forum_threadprofile')->fetch_all();
$threadprofile_group = C::t('forum_threadprofile_group')->fetch_all();
showtagheader('div', 'threadprofile', $_GET['anchor'] == 'threadprofile');
echo '
';
showtableheader('setting_styles_threadprofile_group', 'nobottom');
showsubtitle(array('setting_styles_threadprofile_name', 'setting_styles_threadprofile_plan'));
foreach($_G['cache']['usergroups'] as $gid => $usergroup) {
$select = '';
showtablerow('', array('', ''), array($usergroup['grouptitle'], $select));
}
if($_G['setting']['verify']['enabled']) {
foreach($_G['setting']['verify'] as $gid => $verify) {
if($verify['available']) {
$select = '';
showtablerow('', array('', ''), array($verify['title'], $select));
}
}
}
showtablefooter();
echo ' | | ';
showtableheader('setting_styles_threadprofile_project', 'nobottom');
$setting['threadprofile'] = !empty($setting['threadprofile']) ? dunserialize($setting['threadprofile']) : array();
showsubtitle(array('setting_styles_threadprofile_name', 'nav_global', ''));
foreach($threadprofiles as $id => $threadprofile) {
showtablerow('', array('style="width:200px"', 'style="width:50px"', ''), array(
$threadprofile['name'],
'',
''.cplang('edit').''.
($id > 1 ? ' '.cplang('delete').'' : ''),
));
}
echo ' |
'.$lang['setting_styles_threadprofile_addplan'].' |
';
showtablefooter();
echo '
';
showtagfooter('div');
/*search*/
showtips('members_profile_numbercard_tips', 'numbercard_tips', $_GET['anchor'] == 'numbercard');
showtableheader('members_profile_numbercard', 'nobottom', 'id="numbercard"'.($_GET['anchor'] != 'numbercard' ? ' style="display: none"' : ''));
$settingsAttribute = array();
$allowedAttribute = array('threads', 'posts', 'credits', 'digestposts', 'doings', 'blogs', 'albums', 'sharings', 'oltime', 'feeds', 'follower', 'following', 'friends');
foreach($allowedAttribute as $attribute) {
$settingsAttribute[] = array($attribute, $lang['setting_numbercard_type_'.$attribute]);
}
$extcredits = dunserialize($setting['extcredits']);
foreach($extcredits as $creditid=>$extcredit) {
if($extcredit['title']) {
$settingsAttribute[] = array('extcredits'.$creditid, $extcredit['title']);
}
}
$setting['numbercard'] = dunserialize($setting['numbercard']);
for($i = 1; $i <= 3; $i++) {
showsetting(cplang('setting_numbercard_row', array('i' => $i)), array('settingnew[numbercard][row]['.$i.']', $settingsAttribute), $setting['numbercard']['row'][$i], 'select');
}
showtablefooter();
/*search={"setting_styles":"action=setting&operation=styles","setting_styles_refresh":"action=setting&operation=styles&anchor=refresh"}*/
showtableheader('setting_styles_refresh', 'nobottom', 'id="refresh"'.($_GET['anchor'] != 'refresh' ? ' style="display: none"' : ''));
showsetting('setting_styles_refresh_refreshtime', 'settingnew[msgforward][refreshtime]', $setting['msgforward']['refreshtime'], 'text');
showsetting('setting_styles_refresh_quick', 'settingnew[msgforward][quick]', $setting['msgforward']['quick'], 'radio', '', 1);
showsetting('setting_styles_refresh_messages', 'settingnew[msgforward][messages]', $setting['msgforward']['messages'], 'textarea');
showtagfooter('tbody');
showtablefooter();
/*search*/
/*search={"setting_styles":"action=setting&operation=styles","setting_styles_sitemessage":"action=setting&operation=styles&anchor=sitemessage"}*/
showtableheader('setting_styles_sitemessage', 'nobottom', 'id="sitemessage"'.($_GET['anchor'] != 'sitemessage' ? ' style="display: none"' : ''));
showsetting('setting_styles_sitemessage_time', 'settingnew[sitemessage][time]', $setting['sitemessage']['time'], 'text');
showsetting('setting_styles_sitemessage_register', 'settingnew[sitemessage][register]', $setting['sitemessage']['register'], 'textarea');
showsetting('setting_styles_sitemessage_login', 'settingnew[sitemessage][login]', $setting['sitemessage']['login'], 'textarea');
showsetting('setting_styles_sitemessage_newthread', 'settingnew[sitemessage][newthread]', $setting['sitemessage']['newthread'], 'textarea');
showsetting('setting_styles_sitemessage_reply', 'settingnew[sitemessage][reply]', $setting['sitemessage']['reply'], 'textarea');
showtagfooter('tbody');
showtablefooter();
/*search*/
showtableheader('', 'notop');
showsubmit('settingsubmit');
showtablefooter();
showformfooter();
exit;
} elseif($operation == 'threadprofile') {
$authorinfoitems = array();
$authorinfoitems = array(
'{numbercard}' => $lang['setting_styles_threadprofile_attrcard'],
'{groupicon}{*}
{/groupicon}' => $lang['setting_styles_threadprofile_groupicon'],
'{authortitle}{*}
{/authortitle}' => $lang['setting_styles_threadprofile_groupname'],
'{customstatus}{*}
{/customstatus}' => $lang['members_edit_nickname'],
'{star}{*}
{/star}' => $lang['group_level_icon'],
'{upgradeprogress}' => $lang['setting_styles_threadprofile_groupstep'],
);
if(!empty($_G['setting']['extcredits'])) {
foreach($_G['setting']['extcredits'] as $key => $value) {
$authorinfoitems['extcredits'.$key] = $value['title'];
}
}
$authorinfoitems = array_merge($authorinfoitems, array(
1 => '-',
'uid' => 'UID',
'friends' => $lang['setting_styles_viewthread_userinfo_friends'],
'doings' => $lang['setting_styles_viewthread_userinfo_doings'],
'blogs' => $lang['setting_styles_viewthread_userinfo_blogs'],
'albums' => $lang['setting_styles_viewthread_userinfo_albums'],
'posts' => $lang['setting_styles_viewthread_userinfo_posts'],
'threads' => $lang['setting_styles_viewthread_userinfo_threads'],
'sharings' => $lang['setting_styles_viewthread_userinfo_sharings'],
'digest' => $lang['setting_styles_viewthread_userinfo_digest'],
'credits' => $lang['setting_styles_viewthread_userinfo_credits'],
'readperm' => $lang['setting_styles_viewthread_userinfo_readperm'],
'regtime' => $lang['setting_styles_viewthread_userinfo_regtime'],
'lastdate' => $lang['setting_styles_viewthread_userinfo_lastdate'],
'oltime' => $lang['setting_styles_viewthread_userinfo_oltime'],
'eccredit_seller' => $lang['setting_styles_threadprofile_eccredit_seller'],
'eccredit_buyer' => $lang['setting_styles_threadprofile_eccredit_buyer'],
'follower' => $lang['setting_styles_viewthread_userinfo_follower'],
'following' => $lang['setting_styles_viewthread_userinfo_following']
));
foreach(C::t('common_member_profile_setting')->fetch_all_by_available(1) as $profilefields) {
if($profilefields['fieldid'] == 'birthyear' || $profilefields['fieldid'] == 'birthmonth') {
continue;
} elseif($profilefields['fieldid'] == 'realname') {
$setting['verify'] = dunserialize($setting['verify']);
if($setting['verify'][6]['available'] && !$setting['verify'][6]['viewrealname']) {
continue;
}
}
$authorinfoitems['field_'.$profilefields['fieldid']] = $profilefields['title'];
}
if($_G['setting']['hookscript']['global']['profile']['funcs']['profile_node']) {
$pluginidentifiers = array();
foreach($_G['setting']['hookscript']['global']['profile']['funcs']['profile_node'] as $plugin) {
$pluginidentifiers[] = $plugin[0];
}
$plugins = C::t('common_plugin')->fetch_all_identifier($pluginidentifiers);
foreach($plugins as $id => $value) {
$authorinfoitems['{plugin:'.$id.'}'] = $value['name'];
}
}
if($_GET['do'] == 'add') {
/*search={"setting_styles":"action=setting&operation=threadprofile&do=add"}*/
showtips('setting_threadprofile_tpl_tpls');
showtableheader('');
showhiddenfields(array('do' => 'add'));
showsetting('setting_styles_threadprofile_name', 'namenew', '', 'text');
showsetting_threadprfile($authorinfoitems);
showtagfooter('tbody');
showtablefooter();
/*search*/
} elseif($_GET['do'] == 'edit') {
$id = intval($_GET['id']);
$threadprofile = C::t('forum_threadprofile')->fetch($id);
if(!$threadprofile) {
dheader('location: '.ADMINSCRIPT.'?action=setting&operation=styles&anchor=threadprofile');
}
showtips('setting_threadprofile_tpl_tpls');
showtableheader('');
showhiddenfields(array('do' => 'edit', 'id' => $id));
$threadprofile['template'] = dunserialize($threadprofile['template']);
showsetting('setting_styles_threadprofile_name', 'namenew', $threadprofile['name'], 'text');
showsetting_threadprfile($authorinfoitems, $threadprofile['template']);
showtagfooter('tbody');
showtablefooter();
} elseif($_GET['do'] == 'delete') {
$id = intval($_GET['id']);
C::t('forum_threadprofile')->delete($_GET['id']);
C::t('forum_threadprofile_group')->delete_by_tpid($_GET['id']);
updatecache('setting');
cpmsg('setting_update_succeed', 'action=setting&operation=styles&anchor=threadprofile', 'succeed');
}
} elseif($operation == 'seo') {
$setting['seotitle'] = dunserialize($setting['seotitle']);
$setting['seodescription'] = dunserialize($setting['seodescription']);
$setting['seokeywords'] = dunserialize($setting['seokeywords']);
$rewritedata = rewritedata();
$setting['rewritestatus'] = isset($setting['rewritestatus']) ? dunserialize($setting['rewritestatus']) : '';
$setting['rewriterule'] = isset($setting['rewriterule']) ? dunserialize($setting['rewriterule']) : '';
/*search={"setting_optimize":"action=setting&operation=seo","setting_seo":"action=setting&operation=seo"}*/
echo '';
showtips('setting_tips', 'tips_rewrite');
showtableheader('', 'nobottom');
showtitle(''.cplang('setting_seo_rewritestatus_viewrule').''.cplang('setting_seo_rewritestatus'));
showtablerow('', array('class="vtop tips2" colspan="3"'), array(cplang('setting_seo_rewritestatus_comment')));
showsubtitle(array('setting_seo_pages', 'setting_seo_vars', 'setting_seo_rule', 'available'));
foreach($rewritedata['rulesearch'] as $k => $v) {
$v = !$setting['rewriterule'][$k] ? $v : $setting['rewriterule'][$k];
showtablerow('', array('class="td24"', 'class="td31"', 'class="longtxt"', 'class="td25"'), array(
cplang('setting_seo_rewritestatus_'.$k),
implode(', ', array_keys($rewritedata['rulevars'][$k])),
'',
''
));
}
showtablefooter();
showtableheader();
showsetting('setting_seo_rewritecompatible', 'settingnew[rewritecompatible]', $setting['rewritecompatible'], 'radio');
showsetting('setting_seo_rewriteguest', 'settingnew[rewriteguest]', $setting['rewriteguest'], 'radio');
showtablefooter();
echo '
';
echo '';
showtableheader();
showtitle('
'.cplang('setting_seo_robots_output').''.cplang('setting_seo'));
showtablerow('', array('class="vtop tips2" colspan="4" style="padding-left:20px;"'), array('
- '.cplang('setting_seo_seotitle_comment').'
- '.cplang('setting_seo_seodescription_comment').'
- '.cplang('setting_seo_seokeywords_comment').'
'));
if($_G['setting']['navs'][5]['navname']) {
showtitle($_G['setting']['navs'][5]['navname']);
showtablerow('', array('width="80"', ''), array(
cplang('setting_seo_seotitle'),
'
',
)
);
showtablerow('', array('width="80"', ''), array(
cplang('setting_seo_seokeywords'),
'
'
)
);
showtablerow('', array('width="80"', ''), array(
cplang('setting_seo_seodescription'),
'
',
)
);
}
showtablefooter();
showtableheader();
showsetting('setting_seo_seohead', 'settingnew[seohead]', $setting['seohead'], 'textarea');
showtablefooter();
echo '
';
$seotypes = array(
'portal' => array('portal', 'articlelist', 'article'),
'forum' => array('forum', 'threadlist', 'viewthread'),
'home' => array('home', 'blog', 'album'),
'group' => array('group', 'grouppage', 'viewthread_group')
);
$codetypes = array(
'portal' => 'bbname',
'articlelist' => 'bbname,curcat,firstcat,secondcat,page',
'article' => 'bbname,curcat,firstcat,secondcat,subject,summary,user,page',
'forum' => 'bbname',
'threadlist' => 'bbname,forum,fup,fgroup,page',
'viewthread' => 'bbname,forum,fup,fgroup,subject,summary,tags,page',
'home' => 'bbname',
'blog' => 'bbname,subject,summary,tags,user',
'album' => 'bbname,album,depict,user',
'group' => 'bbname,forum,first,second',
'grouppage' => 'bbname,forum,first,second,gdes,page',
'viewthread_group' => 'bbname,forum,first,second,gdes,subject,summary,tags,page',
);
foreach($codetypes as $key => $val) {
$jscodetypes .= "codetypes['{$key}'] = '{$val}';\r\n";
foreach(explode(',', $val) as $code) {
$cname = $code == 'bbname' ? cplang('setting_seo_code_bbname') : cplang('setting_seo_code_'.$key.'_'.$code);
$jscodenames .= "codenames['{$key}_{$code}'] = '{$cname}';\r\n";
}
}
print <<
EOF;
echo cplang('setting_seo_insallowcode');
print <<
{subject}
|
{forum}
EOF;
$first = $seconds = $thirds = $afirst = $aseconds = $athirds = array();
$query = C::t('forum_forum')->fetch_all_forum_for_sub_order();
foreach($query as $forum) {
$forum['description'] = $forum['seodescription'];
$forum['id'] = $forum['fid'];
if($forum['type'] == 'group') {
$first[$forum['fid']] = $forum;
} elseif($forum['type'] == 'sub') {
$thirds[$forum['fup']][] = $forum;
} else {
$seconds[$forum['fup']][] = $forum;
}
}
loadcache('portalcategory');
$portalcategory = $_G['cache']['portalcategory'];
if($portalcategory) {
foreach($portalcategory as $category) {
$category['id'] = $category['catid'];
$category['name'] = $category['catname'];
$category['keywords'] = $category['keyword'];
if($category['level'] == 0) {
$afirst[$category['catid']] = $category;
} elseif($category['level'] == 1) {
$aseconds[$category['upid']][] = $category;
} else {
$athirds[$category['upid']][] = $category;
}
}
}
foreach($seotypes as $type => $subtypes) {
echo '';
showtips(cplang('setting_seo_global_tips').cplang('setting_seo_'.$type.'_tips'), 'tips_'.$type);
showtableheader();
foreach($subtypes as $subtype) {
showtitle(cplang('setting_seo_'.$subtype).($subtype == 'threadlist' || $subtype == 'articlelist' ? '
'.cplang('setting_seo_opendetail').'' : ''));
showtablerow('', array('width="12%"', ''), array(
cplang('setting_seo_seotitle'),
'
',
)
);
showtablerow('', array('width="12%"', ''), array(
cplang('setting_seo_seokeywords'),
'
'
)
);
showtablerow('', array('width="12%"', ''), array(
cplang('setting_seo_seodescription'),
'
',
)
);
if($subtype == 'threadlist') {
showlist($first, $seconds, $thirds, $subtype);
}
if($subtype == 'articlelist') {
showlist($afirst, $aseconds, $athirds, $subtype);
}
}
showtablefooter();
echo '
';
}
showtagfooter('tbody');
/*search*/
} elseif($operation == 'cachethread') {
include_once libfile('function/forumlist');
$forumselect = '';
/*search={"setting_optimize":"action=setting&operation=seo","setting_cachethread":"action=setting&operation=cachethread"}*/
showtableheader();
showtitle('setting_cachethread');
showsetting('setting_cachethread_indexlife', 'settingnew[cacheindexlife]', $setting['cacheindexlife'], 'text');
showsetting('setting_cachethread_life', 'settingnew[cachethreadlife]', $setting['cachethreadlife'], 'text');
showsetting('setting_cachethread_dir', 'settingnew[cachethreaddir]', $setting['cachethreaddir'], 'text');
showtitle('setting_cachethread_coefficient_set');
showsetting('setting_cachethread_coefficient', 'settingnew[threadcaches]', '', "");
showsetting('setting_cachethread_coefficient_forum', '', '', $forumselect);
/*search*/
} elseif($operation == 'serveropti') {
$checkgzipfunc = !function_exists('ob_gzhandler') ? 1 : 0;
if($setting['jspath'] == 'static/js/') {
$tjspath['default'] = 'checked="checked"';
$setting['jspath'] = '';
} elseif($setting['jspath'] == 'data/cache/') {
$tjspath['cache'] = 'checked="checked"';
$setting['jspath'] = '';
} else {
$tjspath['custom'] = 'checked="checked"';
}
if(!$setting['csspathv'] || $setting['csspathv'] == 'data/cache/') {
$tcsspath['cache'] = 'checked="checked"';
$setting['csspathv'] = '';
} else {
$tcsspath['custom'] = 'checked="checked"';
}
/*search={"setting_optimize":"action=setting&operation=seo","setting_serveropti":"action=setting&operation=serveropti"}*/
showtips('setting_tips');
showtableheader();
showtitle('setting_serveropti');
showsetting('setting_serveropti_optimize_thread_view', 'settingnew[optimizeviews]', $setting['optimizeviews'], 'radio');
showsetting('setting_serveropti_preventrefresh', 'settingnew[preventrefresh]', $setting['preventrefresh'], 'radio');
showsetting('setting_serveropti_delayviewcount', 'settingnew[delayviewcount]', $setting['delayviewcount'], 'radio');
showsetting('setting_serveropti_nocacheheaders', 'settingnew[nocacheheaders]', $setting['nocacheheaders'], 'radio');
showsetting('setting_serveropti_maxonlines', 'settingnew[maxonlines]', $setting['maxonlines'], 'text');
showsetting('setting_serveropti_onlinehold', 'settingnew[onlinehold]', $setting['onlinehold'], 'text');
showsetting('setting_serveropti_jspath', '', '', ''
);
showsetting('setting_serveropti_csspath', '', '', ''
);
showsetting('setting_serveropti_lazyload', 'settingnew[lazyload]', $setting['lazyload'], 'radio');
showsetting('setting_serveropti_blockmaxaggregationitem', 'settingnew[blockmaxaggregationitem]', $setting['blockmaxaggregationitem'], 'text');
$setting['blockcachetimerange'] = empty($setting['blockcachetimerange']) ? array('0', '23') : explode(',', $setting['blockcachetimerange']);
$blockcachetimerange = range(0, 23);
$point = $lang['setting_serveropti_blockcachetimerangepoint'];
$html = '- ';
showsetting('setting_serveropti_blockcachetimerange', '', '', $html);
showsetting('setting_serveropti_sessionclose', 'settingnew[sessionclose]', $setting['sessionclose'], 'radio', '', 1);
showsetting('setting_serveropti_onlineguestsmultiple', 'settingnew[onlineguestsmultiple]', $setting['onlineguestsmultiple'] ? $setting['onlineguestsmultiple'] : 10, 'text');
showtagheader('tbody', '', true);
/*search*/
} elseif($operation == 'editor') {
$_G['setting']['editoroptions'] = str_pad(decbin($setting['editoroptions']), 3, 0, STR_PAD_LEFT);
$setting['defaulteditormode'] = $_G['setting']['editoroptions']{0};
$setting['allowswitcheditor'] = $_G['setting']['editoroptions']{1};
$setting['simplemode'] = $_G['setting']['editoroptions']{2};
/*search={"setting_editor":"action=setting&operation=editor","setting_editor_global":"action=setting&operation=editor"}*/
showtableheader();
showsetting('setting_editor_mode_default', array('settingnew[defaulteditormode]', array(
array(0, $lang['setting_editor_mode_discuzcode']),
array(1, $lang['setting_editor_mode_wysiwyg']))), $setting['defaulteditormode'], 'mradio');
showsetting('setting_editor_swtich_enable', 'settingnew[allowswitcheditor]', $setting['allowswitcheditor'], 'radio');
showsetting('setting_editor_simplemode', array('settingnew[simplemode]', array(
array(1, $lang['setting_editor_simplemode_1']),
array(0, $lang['setting_editor_simplemode_0'])), 1),$setting['simplemode'], 'mradio');
showsetting('setting_editor_smthumb', 'settingnew[smthumb]', $setting['smthumb'], 'text');
showsetting('setting_editor_smcols', 'settingnew[smcols]', $setting['smcols'], 'text');
showsetting('setting_editor_smrows', 'settingnew[smrows]', $setting['smrows'], 'text');
showtablefooter();
/*search*/
} elseif($operation == 'functions') {
$allowfuntype = array('portal', 'group', 'follow', 'collection', 'guide', 'feed', 'blog', 'doing', 'album', 'share', 'wall', 'homepage', 'ranklist');
$_GET['type'] = in_array($_GET['type'], $allowfuntype) ? trim($_GET['type']) : '';
echo "";
/*search={"setting_functions":"action=setting&operation=functions","setting_functions_curscript":"action=setting&operation=functions&anchor=curscript"}*/
showtableheader('setting_functions_curscript_list', 'nobottom', 'id="curscript"'.($_GET['anchor'] != 'curscript' ? ' style="display: none"' : ''));
$modulehtml = array();
$modulehtml[] = ' | '.$lang['setting_functions_curscript_portal'].' | '.$lang['setting_functions_curscript_portal_intro'].' | | '.($setting['portalstatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
$modulehtml[] = ' | '.$lang['setting_functions_curscript_group'].' | '.$lang['setting_functions_curscript_group_intro'].' | | '.($setting['groupstatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
$modulehtml[] = ' | '.$lang['setting_functions_curscript_follow'].' | '.$lang['setting_functions_curscript_follow_intro'].' | | '.($setting['followstatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
$modulehtml[] = ' | '.$lang['setting_functions_curscript_collection'].' | '.$lang['setting_functions_curscript_collection_intro'].' | | '.($setting['collectionstatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
$modulehtml[] = ' | '.$lang['setting_functions_curscript_guide'].' | '.$lang['setting_functions_curscript_guide_intro'].' | | '.($setting['guidestatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
$modulehtml[] = ' | '.$lang['setting_functions_curscript_feed'].' | '.$lang['setting_functions_curscript_feed_intro'].' | | '.($setting['feedstatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
$modulehtml[] = ' | '.$lang['setting_functions_curscript_blog'].' | '.$lang['setting_functions_curscript_blog_intro'].' | | '.($setting['blogstatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
$modulehtml[] = ' | '.$lang['setting_functions_curscript_album'].' | '.$lang['setting_functions_curscript_album_intro'].' | | '.($setting['albumstatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
$modulehtml[] = ' | '.$lang['setting_functions_curscript_share'].' | '.$lang['setting_functions_curscript_share_intro'].' | | '.($setting['sharestatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
$modulehtml[] = ' | '.$lang['setting_functions_curscript_doing'].' | '.$lang['setting_functions_curscript_doing_intro'].' | | '.($setting['doingstatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
$modulehtml[] = ' | '.$lang['setting_functions_curscript_message'].' | '.$lang['setting_functions_curscript_message_intro'].' | | '.($setting['wallstatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
$modulehtml[] = ' | '.$lang['setting_functions_curscript_ranklist'].' | '.$lang['setting_functions_curscript_ranklist_intro'].' | | '.($setting['rankliststatus'] ? $lang['setting_functions_curscript_close']:$lang['setting_functions_curscript_open']).' | ';
echo ''.implode('
', $modulehtml).'
';
showtablefooter();
/*search*/
/*search={"setting_functions":"action=setting&operation=functions","setting_functions_mod":"action=setting&operation=functions&anchor=mod"}*/
showtips('setting_tips', 'mod_tips', $_GET['anchor'] == 'mod');
showtableheader('', 'nobottom', 'id="mod"'.($_GET['anchor'] != 'mod' ? ' style="display: none"' : ''));
showsetting('setting_functions_mod_updatestat', 'settingnew[updatestat]', $setting['updatestat'], 'radio');
showsetting('setting_functions_mod_status', 'settingnew[modworkstatus]', $setting['modworkstatus'], 'radio');
showsetting('setting_functions_archiver', 'settingnew[archiver]', $setting['archiver'], 'radio', 0, 1);
showsetting('setting_functions_archiverredirect', 'settingnew[archiverredirect]', $setting['archiverredirect'], 'radio');
showtagfooter('tbody');
showsetting('setting_functions_mod_maxmodworksmonths', 'settingnew[maxmodworksmonths]', $setting['maxmodworksmonths'], 'text');
showsetting('setting_functions_mod_losslessdel', 'settingnew[losslessdel]', $setting['losslessdel'], 'text');
showsetting('setting_functions_mod_reasons', 'settingnew[modreasons]', $setting['modreasons'], 'textarea');
showsetting('setting_functions_user_reasons', 'settingnew[userreasons]', $setting['userreasons'], 'textarea');
showsetting('setting_functions_mod_bannedmessages', array('settingnew[bannedmessages]', array(
$lang['setting_functions_mod_bannedmessages_thread'],
$lang['setting_functions_mod_bannedmessages_avatar'],
$lang['setting_functions_mod_bannedmessages_signature'])), $setting['bannedmessages'], 'binmcheckbox');
showsetting('setting_functions_mod_warninglimit', 'settingnew[warninglimit]', $setting['warninglimit'], 'text');
showsetting('setting_functions_mod_warningexpiration', 'settingnew[warningexpiration]', $setting['warningexpiration'], 'text');
showsetting('setting_functions_mod_rewardexpiration', 'settingnew[rewardexpiration]', $setting['rewardexpiration'], 'text');
showsetting('setting_functions_mod_moddetail', 'settingnew[moddetail]', $setting['moddetail'], 'radio');
showtablefooter();
/*search*/
$setting['heatthread'] = dunserialize($setting['heatthread']);
$setting['recommendthread'] = dunserialize($setting['recommendthread']);
$setting['allowpostcomment'] = dunserialize($setting['allowpostcomment']);
$count = count(explode(',', $setting['heatthread']['iconlevels']));
$heatthreadicons = '';
for($i = 0;$i < $count;$i++) {
$heatthreadicons .= ' ';
}
$count = count(explode(',', $setting['recommendthread']['iconlevels']));
$recommendicons = '';
for($i = 0;$i < $count;$i++) {
$recommendicons .= ' ';
}
$setting['commentitem'] = explode("\t", $setting['commentitem']);
foreach($setting['commentitem'] as $k => $v) {
$tmp = explode(chr(0).chr(0).chr(0), $v);
if(count($tmp) > 1) {
$setting['commentitem'][$tmp[0]] = $tmp[1];
}
}
/*search={"setting_functions":"action=setting&operation=functions","setting_functions_heatthread":"action=setting&operation=functions&anchor=heatthread"}*/
showtips('setting_functions_heatthread_tips', 'heatthread_tips', $_GET['anchor'] == 'heatthread');
showtableheader('', 'nobottom', 'id="heatthread"'.($_GET['anchor'] != 'heatthread' ? ' style="display: none"' : ''));
showsetting('setting_functions_heatthread_period', 'settingnew[heatthread][period]', $setting['heatthread']['period'], 'text');
showsetting('setting_functions_heatthread_iconlevels', '', '', '
'.$heatthreadicons);
showtablefooter();
/*search*/
/*search={"setting_functions":"action=setting&operation=functions","setting_functions_recommend":"action=setting&operation=functions&anchor=recommend"}*/
showtips('setting_functions_recommend_tips', 'recommend_tips', $_GET['anchor'] == 'recommend');
showtableheader('', 'nobottom', 'id="recommend"'.($_GET['anchor'] != 'recommend' ? ' style="display: none"' : ''));
showsetting('setting_functions_recommend_status', 'settingnew[recommendthread][status]', $setting['recommendthread']['status'], 'radio', 0, 1);
showsetting('setting_functions_recommend_addtext', 'settingnew[recommendthread][addtext]', $setting['recommendthread']['addtext'], 'text');
showsetting('setting_functions_recommend_subtracttext', 'settingnew[recommendthread][subtracttext]', $setting['recommendthread']['subtracttext'], 'text');
showsetting('setting_functions_recommend_daycount', 'settingnew[recommendthread][daycount]', intval($setting['recommendthread']['daycount']), 'text');
showsetting('setting_functions_recommend_ownthread', 'settingnew[recommendthread][ownthread]', $setting['recommendthread']['ownthread'], 'radio');
showsetting('setting_functions_recommend_iconlevels', '', '', '
'.$recommendicons);
showtablefooter();
/*search*/
/*search={"setting_functions":"action=setting&operation=functions","setting_functions_comment":"action=setting&operation=functions&anchor=comment"}*/
showtableheader('', 'nobottom', 'id="comment"'.($_GET['anchor'] != 'comment' ? ' style="display: none"' : ''));
showsetting('setting_functions_comment_allow', array('settingnew[allowpostcomment]', array(
array(1, $lang['setting_functions_comment_allow_1'], 'commentextra'),
array(2, $lang['setting_functions_comment_allow_2']))), $setting['allowpostcomment'], 'mcheckbox');
showsetting('setting_functions_comment_number', 'settingnew[commentnumber]', $setting['commentnumber'], 'text');
showsetting('setting_functions_comment_postself', 'settingnew[commentpostself]', $setting['commentpostself'], 'radio');
showtagheader('tbody', 'commentextra', in_array(1, $setting['allowpostcomment']));
showsetting('setting_functions_comment_firstpost', 'settingnew[commentfirstpost]', $setting['commentfirstpost'], 'radio');
showsetting('setting_functions_comment_commentitem_0', 'settingnew[commentitem][0]', $setting['commentitem'][0], 'textarea');
showsetting('setting_functions_comment_commentitem_1', 'settingnew[commentitem][1]', $setting['commentitem'][1], 'textarea');
showsetting('setting_functions_comment_commentitem_2', 'settingnew[commentitem][2]', $setting['commentitem'][2], 'textarea');
showsetting('setting_functions_comment_commentitem_3', 'settingnew[commentitem][3]', $setting['commentitem'][3], 'textarea');
showsetting('setting_functions_comment_commentitem_4', 'settingnew[commentitem][4]', $setting['commentitem'][4], 'textarea');
showsetting('setting_functions_comment_commentitem_5', 'settingnew[commentitem][5]', $setting['commentitem'][5], 'textarea');
showtagfooter('tbody');
if(is_array($_G['setting']['threadplugins'])) foreach($_G['setting']['threadplugins'] as $tpid => $data) {
showsetting($data['name'].cplang('setting_functions_comment_commentitem_threadplugin'), 'settingnew[commentitem]['.$tpid.']', $setting['commentitem'][$tpid], 'textarea', '', 0, cplang('setting_functions_comment_commentitem_threadplugin_comment'));
}
showtablefooter();
/*search*/
/*search={"setting_functions":"action=setting&operation=functions","setting_functions_threadexp":"action=setting&operation=functions&anchor=threadexp"}*/
showtableheader('', 'nobottom', 'id="threadexp"'.($_GET['anchor'] != 'threadexp' ? ' style="display: none"' : ''));
showsetting('setting_functions_threadexp_repliesrank', 'settingnew[repliesrank]', $setting['repliesrank'], 'radio');
showsetting('setting_functions_threadexp_blacklist', 'settingnew[threadblacklist]', $setting['threadblacklist'], 'radio');
showsetting('setting_functions_threadexp_hotreplies', 'settingnew[threadhotreplies]', $setting['threadhotreplies'], 'text');
showsetting('setting_functions_threadexp_filter', 'settingnew[threadfilternum]', $setting['threadfilternum'], 'text');
showsetting('setting_functions_threadexp_nofilteredpost', 'settingnew[nofilteredpost]', $setting['nofilteredpost'], 'radio');
showsetting('setting_functions_threadexp_hidefilteredpost', 'settingnew[hidefilteredpost]', $setting['hidefilteredpost'], 'radio');
showsetting('setting_functions_threadexp_filterednovote', 'settingnew[filterednovote]', $setting['filterednovote'], 'radio');
showtablefooter();
/*search*/
/*search={"setting_functions":"action=setting&operation=functions","setting_functions_other":"action=setting&operation=functions&anchor=other"}*/
showtips('setting_tips', 'other_tips', $_GET['anchor'] == 'other');
showtableheader('', 'nobottom', 'id="other"'.($_GET['anchor'] != 'other' ? ' style="display: none"' : ''));
showsetting('setting_functions_other_pwdsafety', 'settingnew[pwdsafety]', $setting['pwdsafety'], 'radio');
showsetting('setting_functions_other_uidlogin', 'settingnew[uidlogin]', $setting['uidlogin'], 'radio');
showsetting('setting_functions_other_autoidselect', 'settingnew[autoidselect]', $setting['autoidselect'], 'radio');
showsetting('setting_functions_other_rssstatus', 'settingnew[rssstatus]', $setting['rssstatus'], 'radio');
showsetting('setting_functions_other_rssttl', 'settingnew[rssttl]', $setting['rssttl'], 'text');
showsetting('setting_functions_other_oltimespan', 'settingnew[oltimespan]', $setting['oltimespan'], 'text');
showsetting('setting_functions_other_debug', 'settingnew[debug]', $setting['debug'], 'radio');
showsetting('setting_functions_other_onlyacceptfriendpm', 'settingnew[onlyacceptfriendpm]', $setting['onlyacceptfriendpm'], 'radio');
showsetting('setting_functions_other_pmreportuser', 'settingnew[pmreportuser]', $setting['pmreportuser'], 'text');
showsetting('setting_functions_other_at_anyone', 'settingnew[at_anyone]', $setting['at_anyone'], 'radio');
showsetting('setting_functions_other_chatpmrefreshtime', 'settingnew[chatpmrefreshtime]', $setting['chatpmrefreshtime'], 'text');
showsetting('setting_functions_other_collectionteamworkernum', 'settingnew[collectionteamworkernum]', $setting['collectionteamworkernum'], 'text');
showsetting('setting_functions_other_shortcut', 'settingnew[shortcut]', $setting['shortcut'], 'text');
showsetting('setting_functions_other_closeforumorderby', 'settingnew[closeforumorderby]', $setting['closeforumorderby'], 'radio');
showsetting('setting_functions_other_disableipnotice', 'settingnew[disableipnotice]', $setting['disableipnotice'], 'radio');
showsetting('setting_functions_other_darkroom', 'settingnew[darkroom]', $setting['darkroom'], 'radio');
showsetting('setting_functions_other_global_sign', 'settingnew[globalsightml]', $setting['globalsightml'], 'textarea');
showtablefooter();
/*search*/
/*search={"setting_functions":"action=setting&operation=functions","setting_functions_guide":"action=setting&operation=functions&anchor=guide"}*/
$setting['guide'] = unserialize($setting['guide']);
showtableheader('', 'nobottom', 'id="guide"'.($_GET['anchor'] != 'guide' ? ' style="display: none"' : ''));
showsetting('setting_functions_heatthread_guidelimit', 'settingnew[heatthread][guidelimit]', $setting['heatthread']['guidelimit'], 'text');
$dtarray = array(
array(604800, $lang['7_day']),
array(1209600, $lang['14_day']),
array(2592000, $lang['30_day']),
array(7776000, $lang['90_day'])
);
showsetting('setting_functions_guide_hotdt', array('settingnew[guide][hotdt]', $dtarray), $setting['guide']['hotdt'], 'select');
showsetting('setting_functions_guide_digestdt', array('settingnew[guide][digestdt]', $dtarray), $setting['guide']['digestdt'], 'select');
showtablefooter();
/*search*/
/*search={"setting_functions":"action=setting&operation=functions","setting_functions_activity":"action=setting&operation=functions&anchor=activity"}*/
showtableheader('', 'nobottom', 'id="activity"'.($_GET['anchor'] != 'activity' ? ' style="display: none"' : ''));
showsetting('setting_functions_activity_type', 'settingnew[activitytype]', $setting['activitytype'], 'textarea');
$varname = array('settingnew[activityfield]', array(), 'isfloat');
$ignorearray = array('birthyear', 'birthmonth', 'resideprovince', 'birthprovince', 'residedist', 'residecommunity', 'constellation', 'zodiac');
foreach(C::t('common_member_profile_setting')->fetch_all_by_available(1) as $row) {
if(in_array($row['fieldid'], $ignorearray)) continue;
$varname[1][] = array($row['fieldid'], $row['title'], $row['title']);
}
$activityfield = dunserialize($_G['setting']['activityfield']);
showsetting('setting_functions_activity_field', $varname, $activityfield, 'omcheckbox');
showsetting('setting_functions_activity_extnum', 'settingnew[activityextnum]', $setting['activityextnum'], 'text');
$_G['setting']['creditstrans'] = array();
$setting['extcredits'] = dunserialize($setting['extcredits']);
for($i = 0; $i <= 8; $i++) {
$_G['setting']['creditstrans'] .= '';
}
showsetting('setting_functions_activity_credit', '', '' ,'');
showsetting('setting_functions_activity_pp', 'settingnew[activitypp]', $setting['activitypp'], 'text');
showtablefooter();
/*search*/
showtableheader('', 'notop');
if($_GET['anchor'] != 'curscript') {
showsubmit('settingsubmit');
}
showtablefooter();
showformfooter();
exit;
} elseif($operation == 'permissions') {
include_once libfile('function/forumlist');
$setting['allowviewuserthread'] = dunserialize($setting['allowviewuserthread']);
$checkallselect = $setting['allowviewuserthread']['fids'] ? '' : ' selected';
$forumselect = '';
if($setting['allowviewuserthread']['fids']) {
foreach($setting['allowviewuserthread']['fids'] as $v) {
$forumselect = str_replace('