修改文件:source/include/spacecp/spacecp_usergroup.php
找到代码
- $groupexpirynew = $groupterms['ext'][$groupid];
复制代码 替换为- $groupexpirynew = $groupterms['ext'][$extgroupidsnew];
复制代码 然后找到代码- $expirylist[$group['groupid']]['grouptitle'] = in_array($group['groupid'], $expgrouparray) ?''.$group['grouptitle'].'' : $group['grouptitle'];
- }
- }
复制代码 在它的下面加上如下代码:- if($expgrouparray) {
- $extgroupidarray = 数组();
- foreach(explode(“\t”, $_G['forum_extgroupids']) as $extgroupid) {
- if(($extgroupid = intval($extgroupid)) && !in_array($extgroupid, $expgrouparray)) {
- $extgroupidarray[] = $extgroupid;
- }
- }
- $groupidnew = $_G['groupid'];
- $adminidnew = $_G['adminid'];
- foreach($expgrouparray as $expgroupid) {
- if($expgroupid == $_G['groupid']) {
- if(!empty($groupterms['main']['groupid'])) {
- $groupidnew = $groupterms['main']['groupid'];
- $adminidnew = $groupterms['main']['adminid'];
- } else {
- $groupidnew = DB::result_first(“SELECT groupid from ”.DB::table('common_usergroup').”其中 type='member' 和 '“.$_G['member']['credits'].”'>=creditshigher and '$credits'<creditslower limit=“” 1“);
- if(in_array($_G['adminid'], array(1, 2, 3))) {
- $query = DB::query(“SELECT groupid FROM ”)。.DB::table('common_usergroup').”WHERE groupid IN (“.dimplode($extgroupidarray).”)AND radminid='$_G[adminid]' LIMIT 1“);
- $adminidnew = (DB::num_rows($query)) ?$_G ['adminid'] : 0;
- } else {
- $adminidnew = 0;
- }
- }
- unset($groupterms['main']);
- }
- unset($groupterms['ext'][$expgroupid]);
- }
- require_once libfile('function/forum');
- $groupexpirynew = 组过期($groupterms);
- $extgroupidsnew = 内爆(“\t”, $extgroupidarray);
- $grouptermsnew = addslashes(serialize($groupterms));
- DB::query(“UPDATE ”.DB::table('common_member').”SET adminid='$adminidnew', groupid='$groupidnew', extgroupids='$extgroupidsnew', groupexpiry='$groupexpirynew' WHERE uid='$_G[uid]'“);
- DB::query(“UPDATE ”.DB::table('common_member_field_forum').”SET groupterms='$grouptermsnew' WHERE uid='$_G[uid]'“);
- }
复制代码
|