function showtitle($title, $extra = '', $multi = 1) { global $_G; if (!empty($_G['showsetting_multi'])) { return; } echo "\n" . '<tr' . ($extra ? " {$extra}" : '') . '><th colspan="15" class="partition">' . cplang($title) . '</th></tr>'; if ($multi) { showmultititle(1); } }
if ($multiset) { showtips('setting_multi_tips'); } showformheader("admingroup&operation=edit&id={$_GET['id']}"); if ($multiset) { $_G['showsetting_multi'] = 0; $_G['showsetting_multicount'] = count($mgroup); foreach ($mgroup as $group) { $_G['showtableheader_multi'][] = '<a href="javascript:;" onclick="location.href=\'' . ADMINSCRIPT . '?action=admingroup&operation=edit&id=' . $group['groupid'] . '&anchor=\'+$(\'cpform\').anchor.value;return false">' . $group['grouptitle'] . '(groupid:' . $group['groupid'] . ')</a>'; } } $mgids = array(); foreach ($mgroup as $group) { $_GET['id'] = $gid = $group['groupid']; $mgids[] = $gid; showmultititle(); showtableheader(); showtagheader('tbody', 'threadperm', $_GET['anchor'] == 'threadperm'); showtitle('admingroup_edit_threadperm'); showsetting('admingroup_edit_stick_thread', array('allowstickthreadnew', array(array(0, $lang['admingroup_edit_stick_thread_none']), array(1, $lang['admingroup_edit_stick_thread_1']), array(2, $lang['admingroup_edit_stick_thread_2']), array(3, $lang['admingroup_edit_stick_thread_3']))), $group['allowstickthread'], 'mradio'); showsetting('admingroup_edit_digest_thread', array('allowdigestthreadnew', array(array(0, $lang['admingroup_edit_digest_thread_none']), array(1, $lang['admingroup_edit_digest_thread_1']), array(2, $lang['admingroup_edit_digest_thread_2']), array(3, $lang['admingroup_edit_digest_thread_3']))), $group['allowdigestthread'], 'mradio'); showsetting('admingroup_edit_bump_thread', 'allowbumpthreadnew', $group['allowbumpthread'], 'radio'); showsetting('admingroup_edit_highlight_thread', 'allowhighlightthreadnew', $group['allowhighlightthread'], 'radio'); showsetting('admingroup_edit_recommend_thread', 'allowrecommendthreadnew', $group['allowrecommendthread'], 'radio'); showsetting('admingroup_edit_stamp_thread', 'allowstampthreadnew', $group['allowstampthread'], 'radio'); showsetting('admingroup_edit_stamp_list', 'allowstamplistnew', $group['allowstamplist'], 'radio'); showsetting('admingroup_edit_close_thread', 'allowclosethreadnew', $group['allowclosethread'], 'radio'); showsetting('admingroup_edit_move_thread', 'allowmovethreadnew', $group['allowmovethread'], 'radio'); showsetting('admingroup_edit_edittype_thread', 'allowedittypethreadnew', $group['allowedittypethread'], 'radio'); showsetting('admingroup_edit_copy_thread', 'allowcopythreadnew', $group['allowcopythread'], 'radio'); showsetting('admingroup_edit_merge_thread', 'allowmergethreadnew', $group['allowmergethread'], 'radio');
function showtableheaders($title = '', $classname = '', $extra = '', $titlespan = 15) { global $_G; $classname = str_replace(array('nobottom', 'notop'), array('nobdb', 'nobdt'), $classname); if(isset($_G['showsetting_multi'])) { if($_G['showsetting_multi'] == 0) { $extra .= ' style="width:'.($_G['showsetting_multicount'] * 270 + 20).'px"'; } else { return; } } echo "\n".'<table class="tb tb2 '.$classname.'"'.($extra ? " $extra" : '').' style="clear: both;margin-top: 35px;width: 100%">'; if($title) { $span = $titlespan ? 'colspan="'.$titlespan.'"' : ''; echo "\n".'<tr><th '.$span.' class="partition">'.cplang($title).'</th></tr>'; showmultititle(1); } }