function deleteuser($get, $post) { global $_G; if (!API_DELETEUSER) { return API_RETURN_FORBIDDEN; } $uids = str_replace("'", '', stripcslashes($get['ids'])); require_once libfile('function/delete'); deletemember($uids); return API_RETURN_SUCCEED; }
if ($deleteitem == 'comment') { $comments = array(); $query = C::t('home_comment')->fetch_all_by_uid($uids, 0, $pertask); foreach ($query as $comment) { $comments[] = $comment['cid']; } if ($comments) { deletecomments($comments); } else { $next = 0; $nextdeleteitem = 'allitem'; } } if ($deleteitem == 'allitem') { require_once libfile('function/delete'); $numdeleted = deletemember($uids); if ($isfounder && !empty($_GET['includeuc'])) { loaducenter(); uc_user_delete($uids); } if (!empty($_GET['uidarray'])) { cpmsg('members_delete_succeed', '', 'succeed', array('numdeleted' => $numdeleted)); } else { $allnum += $membernum < $delmemberlimit ? $membernum : $delmemberlimit; $nextlink = "action=members&operation=clean&confirmed=yes&submit=yes&includepost=yes" . (!empty($_GET['includeuc']) ? '&includeuc=yes' : '') . "&allnum={$allnum}&deletestart=" . ($deletestart + $delmemberlimit) . $urladd; cpmsg(cplang('members_delete_user_processing_next', array('deletestart' => $deletestart, 'nextdeletestart' => $deletestart + $delmemberlimit)), $nextlink, 'loadingform', array()); } } $nextlink = "action=members&operation=clean&confirmed=yes&submit=yes&includepost=yes" . (!empty($_GET['includeuc']) ? '&includeuc=yes' : '') . "¤t={$next}&pertask={$pertask}&lastprocess={$processed}&allnum={$allnum}&deletestart={$deletestart}" . $urladd; if (empty($_GET['uidarray'])) { $deladdmsg = cplang('members_delete_user_processing', array('deletestart' => $deletestart, 'nextdeletestart' => $deletestart + $delmemberlimit)) . '<br>';
function deleteuser($get, $post) { global $_G; if (!API_DELETEUSER) { return API_RETURN_FORBIDDEN; } $uids = str_replace("'", '', stripslashes($get['ids'])); $ids = array(); $ids = array_keys(C::t('common_member')->fetch_all($uids)); require_once DISCUZ_ROOT . './source/function/function_delete.php'; $ids && deletemember($ids); return API_RETURN_SUCCEED; }
function deleteuser($get, $post) { global $_G; if (!API_DELETEUSER) { return API_RETURN_FORBIDDEN; } $uids = str_replace("'", '', stripslashes($get['ids'])); $ids = array(); $query = DB::query("SELECT * FROM " . DB::table('common_member') . " WHERE uid IN ({$uids})"); while ($row = DB::fetch($query)) { $ids[] = $row['uid']; } require_once DISCUZ_ROOT . './source/function/function_delete.php'; $ids && deletemember($ids); return API_RETURN_SUCCEED; }
<?php !defined('IN_DISCUZ') && exit('Access Denied'); loadcache('plugin'); $vars = $_G['cache']['plugin']['dsu_kksfs_dzx']; if (!$_G['uid'] || !in_array($_G['groupid'], unserialize($vars['admin'])) || !$_G['gp_uid'] || $_G['gp_formhash'] != md5(FORMHASH)) { exit('Access Denied'); } require_once libfile('function/forum'); require_once libfile('function/delete'); $uid = intval($_G['gp_uid']); $user = getuserbyuid($uid); if (!$user) { showmessage('dsu_kksfs_dzx:user_not_exist', '', '', array('showdialog' => true, 'alert' => 'error')); } if ($user['adminid']) { showmessage('dsu_kksfs_dzx:group_protect', '', '', array('showdialog' => true, 'alert' => 'error')); } $ip = DB::result_first('SELECT lastip FROM ' . DB::table('common_member_status') . " WHERE uid='{$uid}'"); DB::query('DELETE FROM ' . DB::table('forum_thread') . " WHERE authorid='{$uid}'"); DB::query('DELETE FROM ' . DB::table('forum_post') . " WHERE authorid='{$uid}'"); deletemember(array($uid)); if (!$vars['key']) { showmessage('dsu_kksfs_dzx:delete_succeed', '', '', array('alert' => 'right', 'showdialog' => true)); } $submit_url = 'http://www.stopforumspam.com/add.php'; $submit_url .= "?username={$user[username]}"; $submit_url .= "&ip_addr={$ip}"; $submit_url .= "&email={$user[email]}"; $submit_url .= "&api_key={$vars[key]}"; showmessage('dsu_kksfs_dzx:delete_jump', $submit_url, '', array('alert' => 'right', 'showdialog' => true, 'locationtime' => true));