kekezu::admin_system_log($_lang['delete_kf'] . $del_info[username]);
        $res and kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_success'], 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_fail'], 'warning');
        break;
}
if ($sbt_action) {
    $keyids = $ckb;
    if (is_array($keyids)) {
        $ids = implode(',', $keyids);
        $res = db_factory::execute(sprintf("update %switkey_space set group_id = 0 where uid in (%s) ", TABLEPRE, $ids));
        kekezu::admin_system_log($_lang['more_delete_kfs'] . $ids);
        $res and kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['mulit_operate_success']) or kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['mulit_operate_fail'], "error");
    }
}
$sql = " 1 = 1 and group_id != 0 ";
$w[page_size] and $p_size = intval($w[page_size]) or $p_size = 10;
$page = intval($page) ? intval($page) : 1;
$w[uid] and $sql .= " and uid='{$w['uid']}'";
$w[username] and $sql .= " and username like '%{$w['username']}%'";
$w[status] == 1 and $sql .= " and status = 1";
$w[status] == 2 and $sql .= " and status = 0";
$ord[uid] and $sql .= " order by uid " . $ord[uid] or $sql .= " order by uid desc ";
$space_obj->setWhere($sql);
$count = $space_obj->count_keke_witkey_space();
$limit = $p_size;
$kekezu->_page_obj->setAjax(1);
$kekezu->_page_obj->setAjaxDom('ajax_dom');
$pages = $kekezu->_page_obj->getPages($count, $limit, $page, $url);
$space_obj->setWhere($sql . $pages['where']);
$userlist_arr = $space_obj->query_keke_witkey_space();
$grouplist_arr = keke_admin_class::get_user_group();
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_custom_list');
 public function save_user_info($user_info, $account, $ckb_cookie = 1, $login_type = 0, $auto_login = 0, $oauth_login = 0)
 {
     global $kekezu, $_K, $handlekey;
     global $_lang;
     $_SESSION['uid'] = $user_info['uid'];
     $_SESSION['username'] = $user_info['username'];
     $_SESSION['last_login_time'] = $user_info['last_login_time'];
     $this->add_login_time(0);
     $login_type = $this->_login_type;
     if ($auto_login == '1') {
         $c = array();
         $c[0] = base64_encode($user_info['uid']);
         $c[1] = base64_encode($account);
         $c[2] = base64_encode($user_info['uid'] . '|' . $user_info['password'] . '|' . $account);
         setcookie('keke_auto_login', serialize($c), time() + 3600 * 24 * 30);
     }
     if ($_K['refer']) {
         //登录之后不同身份跳转到各自管理页面
         $user_obj = new keke_user_class();
         $user_type = $user_obj->get_user_type($user_info['uid']);
         if ($user_type['user_type'] == 2) {
             $r_url = '?do=user&view=wk';
         } elseif ($user_type['user_type'] == 1) {
             $r_url = '?do=user&view=gz';
         }
         $r = $_K['refer'] . $r_url;
     } else {
         $r = 'index.php';
     }
     if ($login_type) {
         $r = 'index.php';
     }
     if ($oauth_login) {
         $r = 'index.php';
     }
     if ($this->_sys_config['user_intergration'] == 2) {
         $synhtml = keke_user_class::user_synlogin($user_info['uid'], $this->_password);
     }
     $synhtml = isset($synhtml) ? $synhtml : "";
     $user_obj = new Keke_witkey_space_class();
     $user_obj->setLast_login_time(time());
     $user_obj->setWhere("uid = '{$user_info['uid']}'");
     $user_obj->edit_keke_witkey_space();
     $black_obj = new Keke_witkey_member_black_class();
     $black_obj->setWhere("uid = '{$user_info['uid']}'");
     $black_obj->del_keke_witkey_member_black();
     db_factory::execute(sprintf("update %switkey_member_oltime set last_op_time=%d where uid = %d", TABLEPRE, time(), $user_info['uid']));
     if (isset($_COOKIE['prom']) && $_COOKIE['prom']) {
         $prom_obj = keke_prom_class::get_instance();
         $url_data = $prom_obj->extract_prom_cookie();
         $url_data['p'] == 'reg' or $prom_obj->create_prom_relation($user_info['uid'], $user_info['username'], $url_data, '2');
     }
     if ($login_type == 1) {
         if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
             $this->show_msg($_lang['login_success'] . "{$synhtml}", 1, $r);
         } elseif (strtolower($_SERVER['REQUEST_METHOD']) == 'get') {
             echo "{$synhtml}<script>window.location.href='{$r}';</script>";
             die;
         }
     } else {
         if ($login_type == 3 || $login_type == 4) {
             $info = $user_info;
             $return_info['uid'] = $info['uid'];
             $return_info['username'] = $info['username'];
             $return_info['balance'] = intval($info['balance']);
             $return_info['credit'] = intval($info['credit']);
             $return_info['pic'] = keke_user_class::get_user_pic($user_info['uid']);
             $return_info['syn'] = $synhtml;
             $user_info['uid'] == ADMIN_UID || $user_info['group_id'] > 0 and $return_info['is_admin'] = 1;
             $return_info['g_pic'] = unserialize($info['buyer_level']);
             $return_info['s_pic'] = unserialize($info['seller_level']);
             $this->show_msg($_lang['login_success'], 1, $return_info);
             die;
         } elseif ($login_type == 2) {
             return true;
         } else {
             $this->show_msg($_lang['login_success'] . "{$synhtml}", 1, $r);
         }
     }
 }
 static function action_user_by_email($uid, $code)
 {
     $auth_obj = new Keke_witkey_auth_record_class();
     $auth_obj->setWhere(" uid = " . $uid . " and auth_code= 'email' and auth_status=0 and ext_data = '{$code}'");
     $count = $auth_obj->count_keke_witkey_auth_record();
     if ($count > 0) {
         $space_obj = new Keke_witkey_space_class();
         $space_obj->setStatus(1);
         $space_obj->setWhere("uid = {$uid}");
         $space_obj->edit_keke_witkey_space();
         $auth_obj->setWhere(" uid = " . $uid . " and auth_code= 'email' and auth_status=0 and ext_data = '{$code}'");
         $auth_obj->del_keke_witkey_auth_record();
         return true;
     }
     return false;
 }