コード例 #1
0
 static function user_register($username, $password, $email)
 {
     global $kekezu;
     $member_obj = new Keke_witkey_member_class();
     $space_obj = new Keke_witkey_space_class();
     $slt = kekezu::randomkeys(6);
     $pwd = self::get_password($password, $slt);
     if ($kekezu->_sys_config['user_intergration'] == 2) {
         require_once S_ROOT . '/uc_client/client.php';
         $reg_uid = uc_user_register($username, $password, $email);
     }
     die;
     if ($reg_uid > 0 || $kekezu->_sys_config['user_intergration'] == '1') {
         $reg_uid and $member_obj->setUid($reg_uid);
         $member_obj->setEmail($email);
         $member_obj->setUsername($username);
         $member_obj->setPassword($pwd);
         $member_obj->setRand_code($slt);
         $reg_uid = $member_obj->create_keke_witkey_member();
         $space_obj->setUid($reg_uid);
         $kekezu->_sys_config[allow_reg_action] == 1 and $space_obj->setStatus(2) or $space_obj->setStatus(1);
         $space_obj->setUsername($username);
         $space_obj->setPassword($pwd);
         $space_obj->setSec_code($pwd);
         $space_obj->setEmail($email);
         $space_obj->setReg_time(time());
         $space_obj->setReg_ip(kekezu::get_ip());
         $space_obj->create_keke_witkey_space();
         $info = array('uid' => $reg_uid, 'username' => $username, 'email' => $email);
         $kekezu->_sys_config[allow_reg_action] == 1 and self::send_email_action_user($info);
         return $info;
     } else {
         return false;
     }
 }
コード例 #2
0
ファイル: uc.php プロジェクト: huangbinzd/kppwGit
 function synlogin($get, $post)
 {
     global $_G;
     if (!API_SYNLOGIN) {
         return API_RETURN_FORBIDDEN;
     }
     header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
     $cookietime = 31536000;
     $_SESSION['uid'] = intval($get['uid']);
     $_SESSION['username'] = $get['username'];
     //最新登录时间
     $userinfo = db_factory::get_one("select a.*,b.* from " . TABLEPRE . "witkey_space a left join " . TABLEPRE . "witkey_member b on a.uid = b.uid where a.uid = " . $_SESSION['uid'] . " and a.username='******'username'] . "'");
     if ($userinfo) {
         db_factory::updatetable(TABLEPRE . 'witkey_space', array('last_login_time' => time()), array('uid' => $_SESSION['uid']));
         $space_obj = new Keke_witkey_space_class();
         $space_obj->setUid($_SESSION['uid']);
         $space_obj->setLast_login_time(time());
         $space_obj->edit_keke_witkey_space();
     }
 }
コード例 #3
0
kekezu::admin_check_role(33);
$kf_obj = keke_table_class::get_instance("witkey_space");
$member_obj = new Keke_witkey_member_class();
$space_obj = new Keke_witkey_space_class();
$url = 'index.php?do=user&view=custom_list&uid=' . $w[uid] . '&username='******'&w[page_size]=' . $w[page_size] . '&status=' . $w[status] . '&ord[uid]=' . $ord[uid];
switch ($op) {
    case "add":
        if ($is_submit) {
            die('1');
            $m_info = db_factory::get_one(" select uid,username,group_id from " . TABLEPRE . "witkey_space where uid = '{$fds['uid']}'");
            !$m_info and kekezu::admin_show_msg($_lang['user_no_exit'], $url, 3, '', 'warning');
            if ($m_info) {
                if ($m_info[group_id] == 7) {
                    kekezu::admin_show_msg($_lang['no_operate_again_for_user_is_kf_'], $url, 3, '', 'warning');
                } else {
                    $space_obj->setUid($fds[uid]);
                    $space_obj->setGroup_id(7);
                    $res = $space_obj->edit_keke_witkey_space();
                    if ($res) {
                        kekezu::admin_system_log($_lang['add_new_kf'] . $m_info[username]);
                        $v_arr = array('管理员名' => $admin_info['username'], '用户名' => $spaceinfo['username']);
                        keke_msg_class::notify_user($fds['uid'], $m_info['username'], 'kf_set', '客服设置', $v_arr, 2);
                        kekezu::admin_show_msg($_lang['add_kf_successfully'], $url, 3, '', 'success');
                    }
                }
            }
        }
        require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_custom_add');
        die;
        break;
    case "del":