예제 #1
0
     if (in_array('avatar', $_GET['clear'])) {
         $setarr['avatarstatus'] = 0;
         loaducenter();
         uc_user_deleteavatar($member['uid']);
     }
 }
 if (!empty($my_data) && !empty($mylogtype)) {
     $log_handler = Cloud::loadClass('Cloud_Service_SearchHelper');
     $log_handler->myThreadLog($mylogtype, $my_data);
 }
 $setarr['adminid'] = $adminidnew;
 $setarr['groupid'] = $groupidnew;
 $setarr['status'] = $_GET['bannew'] == 'status' ? -1 : 0;
 C::t('common_member' . $tableext)->update($member['uid'], $setarr);
 if ($_G['group']['allowbanuser'] && DB::affected_rows()) {
     banlog($member['username'], $member['groupid'], $groupidnew, $_GET['banexpirynew'], $reason, $_GET['bannew'] == 'status' ? -1 : 0);
 }
 C::t('common_member_field_forum' . $tableext)->update($member['uid'], array('groupterms' => $member['groupterms'] ? serialize($member['groupterms']) : ''));
 $crimeaction = $noticekey = '';
 include_once libfile('function/member');
 if ($_GET['bannew'] == 'post') {
     $crimeaction = 'crime_banspeak';
     $noticekey = 'member_ban_speak';
     $from_idtype = 'banspeak';
 } elseif ($_GET['bannew'] == 'visit') {
     $crimeaction = 'crime_banvisit';
     $noticekey = 'member_ban_visit';
     $from_idtype = 'banvisit';
 } elseif ($_GET['bannew'] == 'status') {
     $crimeaction = 'crime_banstatus';
     $noticekey = 'member_ban_status';
예제 #2
0
         $adminidnew = $member['groupterms']['main']['adminid'];
         unset($member['groupterms']['main']);
         unset($member['groupterms']['ext'][$member['groupid']]);
         $sql .= ', groupexpiry=\'' . groupexpiry($member['groupterms']) . '\'';
     } else {
         $groupidnew = $db->result_first("SELECT groupid FROM {$tablepre}usergroups WHERE type='member' AND creditshigher<='{$member['credits']}' AND creditslower>'{$member['credits']}'");
         $adminidnew = 0;
     }
 } else {
     $groupidnew = $member['groupid'];
     $adminidnew = $member['adminid'];
 }
 $sql .= ", adminid='{$adminidnew}', groupid='{$groupidnew}'";
 $db->query("UPDATE {$tablepre}members SET {$sql} WHERE uid='{$member['uid']}'");
 if ($allowbanuser && $db->affected_rows($query)) {
     banlog($member['username'], $member['groupid'], $groupidnew, $banexpirynew, $reason);
 }
 $db->query("UPDATE {$tablepre}memberfields SET groupterms='" . ($member['groupterms'] ? addslashes(serialize($member['groupterms'])) : '') . "' WHERE uid='{$member['uid']}'");
 if ($delpost && $bannew && $adminid == 1) {
     $query = $db->query("SELECT attachment, thumb, remote FROM {$tablepre}attachments WHERE uid='{$member['uid']}'");
     while ($attach = $db->fetch_array($query)) {
         dunlink($attach['attachment'], $attach['thumb'], $attach['remote']);
     }
     if ($member['uid']) {
         require_once DISCUZ_ROOT . './include/post.func.php';
         $pidsdelete = $tidsdelete = '0';
         $query = $db->query("SELECT pid, fid, tid, first FROM {$tablepre}posts WHERE authorid='{$member['uid']}'");
         while ($post = $db->fetch_array($query)) {
             $prune['forums'][] = $post['fid'];
             $prune['thread'][$post['tid']]++;
             if ($post['first']) {