Beispiel #1
0
 function index_action()
 {
     if ($this->uid || $this->username) {
         echo "<script>location.href='member/index.php';</script>";
     }
     if ($_POST['submit']) {
         $usertype = $_POST['usertype'] ? $_POST['usertype'] : 1;
         $_POST['username'] = yun_iconv('utf-8', 'gbk', $_POST['username']);
         if (!$this->CheckRegUser($_POST['username']) && !$this->CheckRegEmail($_POST['username'])) {
             $this->layer_msg('无效的用户名!', 9, 0, '');
         }
         if (!$this->CheckRegEmail($_POST['email'])) {
             $this->layer_msg('邮箱格式不正确!', 9, 0, '');
         }
         $UserinfoM = $this->MODEL('userinfo');
         $member = $UserinfoM->GetMemberOne(array('username' => $_POST['username'], " or `email`='" . $_POST['email'] . "'"));
         if (is_array($member)) {
             if ($member['username'] == $_POST['username']) {
                 $this->layer_msg('用户名已存在,请重新输入!', 9, 0, '');
             } elseif ($member['email'] == $_POST['email']) {
                 $this->layer_msg('邮箱已存在,请重新输入!', 9, 0, '');
             }
         } else {
             $regname = @explode(",", $this->config['sy_regname']);
             if (in_array($_POST['username'], $regname)) {
                 $this->layer_msg('用户名已存在,请重新输入!', 9, 0, '');
             }
         }
         if ($usertype == '1') {
             $status = 1;
         } elseif ($usertype == '2') {
             $status = $this->config['com_status'];
         }
         if ($this->config['sy_uc_type'] == "uc_center") {
             $this->uc_open();
             $uid = uc_user_register($_POST['username'], $_POST['password'], $_POST['email']);
             if ($uid <= 0) {
                 $this->layer_msg('该用户或邮箱已存在!', 9, 0, '');
             } else {
                 list($uid, $username, $password, $email, $salt) = uc_user_login($_POST['username'], $_POST['password']);
                 $pass = md5(md5($_POST['password']) . $salt);
                 $ucsynlogin = uc_user_synlogin($uid);
             }
         } elseif ($this->config['sy_pw_type'] == "pw_center") {
             include APP_PATH . "/api/pw_api/pw_client_class_phpapp.php";
             $username = $username;
             $password = $_POST['password'];
             $email = $_POST['email'];
             $pw = new PwClientAPI($username, $password, $email);
             $pwuid = $pw->register();
             $salt = substr(uniqid(rand()), -6);
             $pass = md5(md5($password) . $salt);
         } else {
             $salt = substr(uniqid(rand()), -6);
             $pass = md5(md5($_POST['password']) . $salt);
         }
         $idata = array('username' => $_POST['username'], 'password' => $pass, 'email' => $_POST['email'], 'usertype' => $usertype, 'status' => $status, 'salt' => $salt, 'reg_date' => time(), 'login_date' => time());
         $userid = $UserinfoM->AddMember($idata);
         if ($userid) {
             if ($_COOKIE['wxid']) {
                 $UserinfoM->UpdateMember(array('wxid' => ''), array('wxid' => $_COOKIE['wxid']));
                 $UserinfoM->UpdateMember(array('wxid' => $_COOKIE['wxid']), array('uid' => $userid));
                 setcookie("wxid", '', time() - 86400, "/");
             }
             if ($_COOKIE['unionid']) {
                 $UserinfoM->UpdateMember(array('unionid' => ''), array('unionid' => $_COOKIE['unionid']));
                 $UserinfoM->UpdateMember(array('unionid' => $_COOKIE['unionid']), array('uid' => $userid));
                 setcookie("unionid", '', time() - 86400, "/");
             }
             if ($this->config[sy_pw_type] == "pw_center") {
                 $UserinfoM->UpdateMember(array('pwuid' => $pwuid), array('uid' => $userid));
             }
             $UserinfoM->RegisterMember($_POST, array('uid' => $userid, 'usertype' => $usertype));
             if ($this->config['integral_reg'] != "") {
                 $UserinfoM->company_invtal($userid, $this->config['integral_reg'], true, "注册", true, 2, 'integral', '26');
             }
             $this->add_cookie($userid, $_POST['username'], $salt, $_POST['email'], $pass, $usertype);
             $this->layer_msg('恭喜您,已成功注册会员!', 9, 0, 'member/index.php?c=addresume');
         }
     }
     if ($_GET['usertype'] == "2") {
         $this->yunset("headertitle", "会员注册");
     } else {
         $this->yunset("headertitle", "会员注册");
     }
     $this->seo("register");
     $this->yuntpl(array('mobile/register'));
 }
Beispiel #2
0
 function index_action()
 {
     $this->get_moblie();
     if ($this->uid || $this->username) {
         echo "<script>location.href='member/index.php';</script>";
     }
     if ($_POST['submit']) {
         if ($_POST['wxid']) {
             $wxparse = '&wxid=' . $_POST['wxid'] . '&wxname=' . $_POST['wxname'];
         }
         if ($_POST['wxname']) {
             $wxparse = '&wxname=' . $_POST['wxname'];
         }
         $usertype = $_POST['usertype'] ? $_POST['usertype'] : 1;
         if (!$this->CheckRegUser($_POST['username'])) {
             $this->wapheader('index.php?m=login&', '无效的用户名!');
         }
         if (!$this->CheckRegEmail($_POST['email'])) {
             $this->wapheader('index.php?m=login&', '邮箱格式不正确!');
         }
         $member = $this->obj->DB_select_once("member", "`username`='" . $_POST['username'] . "' OR `email`='" . $_POST['email'] . "'");
         if (is_array($member)) {
             if ($member['username'] == $_POST['username']) {
                 $this->wapheader('index.php?m=register&usertype=' . $usertype . $wxparse . '&', '用户名已存在,请重新输入!');
             } elseif ($member['email'] == $_POST['email']) {
                 $this->wapheader('index.php?m=register&usertype=' . $usertype . $wxparse . '&', '邮箱已存在,请重新输入!');
             }
         } else {
             $regname = @explode(",", $this->config['sy_regname']);
             if (in_array($_POST['username'], $regname)) {
                 $this->wapheader('index.php?m=register&usertype=' . $usertype . $wxparse . '&', '用户名已存在,请重新输入!');
             }
         }
         if ($usertype == '1') {
             $status = 1;
         } elseif ($usertype == '2') {
             $status = $this->config['com_status'];
         }
         if ($this->config['sy_uc_type'] == "uc_center") {
             $this->obj->uc_open();
             $uid = uc_user_register($_POST['username'], $_POST['password'], $_POST['email']);
             if ($uid <= 0) {
                 $this->wapheader('index.php?m=register&usertype=' . $usertype . $wxparse . '&', '该用户或邮箱已存在!');
             } else {
                 list($uid, $username, $password, $email, $salt) = uc_user_login($_POST['username'], $_POST['password']);
                 $pass = md5(md5($_POST['password']) . $salt);
                 $ucsynlogin = uc_user_synlogin($uid);
             }
         } elseif ($this->config['sy_pw_type'] == "pw_center") {
             include APP_PATH . "/api/pw_api/pw_client_class_phpapp.php";
             $username = $username;
             $password = $_POST['password'];
             $email = $_POST['email'];
             $pw = new PwClientAPI($username, $password, $email);
             $pwuid = $pw->register();
             $salt = substr(uniqid(rand()), -6);
             $pass = md5(md5($password) . $salt);
         } else {
             $salt = substr(uniqid(rand()), -6);
             $pass = md5(md5($_POST['password']) . $salt);
         }
         $idata['username'] = $_POST['username'];
         $idata['password'] = $pass;
         $idata['email'] = $_POST['email'];
         $idata['usertype'] = $usertype;
         $idata['status'] = $status;
         $idata['salt'] = $salt;
         $idata['source'] = '2';
         $idata['reg_date'] = $idata['login_date'] = time();
         if ($_POST['wxid']) {
             $this->obj->update_once('member', array('wxid' => '', 'wxname' => ''), array('wxid' => $this->stringfilter($_POST['wxid'])));
             $idata['wxid'] = $_POST['wxid'];
             $idata['wxname'] = $this->stringfilter($_POST['wxname']);
             $idata['wxbindtime'] = time();
         }
         $userid = $this->obj->insert_into('member', $idata);
         if ($userid) {
             if ($this->config[sy_pw_type] == "pw_center") {
                 $this->obj->update_once('member', array('pwuid' => $pwuid), array('uid' => $userid));
             }
             if ($usertype == "1") {
                 $table = "member_statis";
                 $table2 = "resume";
                 $value = "`uid`='" . $userid . "'";
                 $udata['uid'] = $userid;
                 $udata2['uid'] = $userid;
                 $udata2['email'] = $_POST['email'];
             } elseif ($usertype == "2") {
                 $table = "company_statis";
                 $table2 = "company";
                 $udata['uid'] = $userid;
                 $udata2['uid'] = $userid;
                 $udata2['linkmail'] = $_POST['email'];
                 $udata2['linkman'] = trim($_POST['linkman']);
                 $udata2['linktel'] = trim($_POST['moblie']);
                 $udata = $this->rating_info($udata);
             }
             $this->obj->insert_into($table, $udata);
             $this->obj->insert_into($table2, $udata2);
             $this->obj->insert_into('friend_info', array('uid' => $userid, 'nickname' => $_POST['username'], 'usertype' => $usertype));
             setcookie("uid", $userid, time() + 86400, "/");
             setcookie("username", $_POST['username'], time() + 86400, "/");
             setcookie("usertype", $usertype, time() + 86400, "/");
             setcookie("salt", $salt, time() + 86400, "/");
             setcookie("shell", md5($idata['username'] . $idata['password'] . $idata['salt']), time() + 86400, "/");
             $this->wapheader('member/index.php');
         }
     }
     if ($_GET['usertype'] == "2") {
         $this->yunset("title", "企业会员注册");
     } else {
         $this->yunset("title", "个人会员注册");
     }
     $this->yuntpl(array('wap/register'));
 }
Beispiel #3
0
 function regsave_action()
 {
     $_POST = $this->post_trim($_POST);
     $usertype = intval($_POST['usertype']);
     $_POST['username'] = yun_iconv("utf-8", "gbk", $_POST['username']);
     $_POST['unit_name'] = yun_iconv("utf-8", "gbk", $_POST['unit_name']);
     $_POST['address'] = yun_iconv("utf-8", "gbk", $_POST['address']);
     $_POST['linkman'] = yun_iconv("utf-8", "gbk", $_POST['linkman']);
     $_POST['name'] = yun_iconv("utf-8", "gbk", $_POST['name']);
     if ($_COOKIE['uid'] != "" && $_COOKIE['username'] != "") {
         $this->errjson('您已经登录了!');
     }
     if (strpos($this->config['code_web'], '注册会员') !== false) {
         session_start();
         if (md5($_POST['authcode']) != $_SESSION['authcode']) {
             $this->errjson('验证码错误!');
         }
     }
     if (!$this->CheckRegUser($_POST['username']) && !$this->CheckRegEmail($_POST['username'])) {
         $this->errjson('用户名包含特殊字符!');
     }
     $Member = $this->MODEL("userinfo");
     if ($_POST['codeid'] == '1') {
         if ($this->config['reg_username'] == '1' && $usertype == '1') {
             if (!$this->CheckRegUser($_POST['name']) || $_POST['name'] == "") {
                 $this->errjson('真实姓名格式不规范');
             }
         }
         if ($this->config['reg_usertel'] == '1' && $usertype == '1' || $this->config['reg_comtel'] == '1' && $usertype == '2') {
             if (!preg_match("/1[34578]{1}\\d{9}\$/", $_POST['moblie'])) {
                 $this->errjson('手机格式错误!');
             } else {
                 $moblieNum = $Member->GetMemberNum(array("moblie" => $_POST['moblie']));
                 if ($moblieNum > 0) {
                     $this->errjson('手机已存在!');
                 }
             }
         }
         if ($this->config['reg_useremail'] == '1' && $usertype == '1' || $this->config['reg_comemail'] == '1' && $usertype == '2') {
             if (!$this->CheckRegEmail($_POST['email']) || $_POST['email'] == "") {
                 $this->errjson('Email格式不规范!');
             }
         }
         if ($usertype == '2') {
             if ($this->config['reg_comname'] == '1') {
                 if (!$this->CheckRegUser($_POST['unit_name']) || $_POST['unit_name'] == "") {
                     $this->errjson('请正确填写企业名称!');
                 }
             }
             if ($this->config['reg_comaddress'] == '1') {
                 if (!$this->CheckRegUser($_POST['address']) || $_POST['address'] == "") {
                     $this->errjson('请正确填写企业地址!');
                 }
             }
             if ($this->config['reg_comlink'] == '1') {
                 if (!$this->CheckRegUser($_POST['linkman']) || $_POST['linkman'] == "") {
                     $this->errjson('请正确填写企业联系人');
                 }
             }
         }
     } elseif ($_POST['codeid'] == '2') {
         if (!preg_match("/1[34578]{1}\\d{9}\$/", $_POST['moblie'])) {
             $this->errjson('手机格式错误!');
         }
         if ($this->config['sy_msg_regcode'] == "1") {
             if ($_POST['moblie_code']) {
                 $regCertMobile = $Member->GetCompanyCert(array("type" => '2', "check" => $_POST['moblie']));
             }
             if ($regCertMobile['check2'] != $_POST['moblie_code'] || $regCertMobile['check2'] == '') {
                 $this->errjson('短信验证码错误!');
             }
         }
         $_POST['username'] = $_POST['moblie'];
     } elseif ($_POST['codeid'] == '3') {
         if (!$this->CheckRegEmail($_POST['email']) || $_POST['email'] == "") {
             $this->errjson('Email格式不规范!');
         }
         $_POST['username'] = $_POST['email'];
     }
     if ($_POST['username'] != "") {
         $nid = $Member->GetMemberNum(array("username" => $_POST['username']));
         if ($nid) {
             $this->errjson('账户名已存在!');
         } else {
             if ($_POST['usertype'] == '1') {
                 $satus = 1;
             } elseif ($_POST['usertype'] == '2') {
                 $satus = $this->config['com_status'];
             }
             if ($this->config['sy_uc_type'] == "uc_center") {
                 $this->uc_open();
                 $uid = uc_user_register($_POST['username'], $_POST['password'], $_POST['email']);
                 if ($uid <= 0) {
                     $this->errjson('该邮箱已存在!');
                 } else {
                     list($uid, $username, $password, $email, $salt) = uc_user_login($_POST['username'], $_POST['password']);
                     $pass = md5(md5($_POST['password']) . $salt);
                     $ucsynlogin = uc_user_synlogin($uid);
                 }
             } elseif ($this->config['sy_pw_type'] == "pw_center") {
                 include APP_PATH . "/api/pw_api/pw_client_class_phpapp.php";
                 $password = $_POST['password'];
                 $email = $_POST['email'];
                 $pw = new PwClientAPI($username, $password, $email);
                 $pwuid = $pw->register();
                 $salt = substr(uniqid(rand()), -6);
                 $pass = md5(md5($password) . $salt);
             } else {
                 $salt = substr(uniqid(rand()), -6);
                 $pass = md5(md5($_POST['password']) . $salt);
             }
             $ip = fun_ip_get();
             $data['username'] = $_POST['username'];
             $data['password'] = $pass;
             $data['usertype'] = $_POST['usertype'];
             $data['email'] = $_POST['email'];
             $data['moblie'] = $_POST['moblie'];
             $data['status'] = $satus;
             $data['salt'] = $salt;
             $data['reg_date'] = time();
             $data['reg_ip'] = $ip;
             $data['qqid'] = $_SESSION['qq']['openid'];
             $data['sinaid'] = $_SESSION['sina']['openid'];
             $data['wxid'] = $_SESSION['wx']['openid'];
             $data['regcode'] = (int) $_COOKIE['regcode'];
             $userid = $Member->AddMember($data);
             if (!$userid) {
                 $user_id = $Member->GetMemberOne(array("username" => $_POST['username']), array("field" => "uid"));
                 $userid = $user_id['uid'];
             }
             if ($userid) {
                 $this->unset_cookie();
                 if ($this->config['sy_pw_type'] == "pw_center") {
                     $Member->UpdateMember(array("pwuid" => $pwuid), array("uid" => $userid));
                 }
                 if ($_POST['usertype'] == "1") {
                     $table = "member_statis";
                     $table2 = "resume";
                     $data1 = array("uid" => $userid);
                     $data2 = array("uid" => $userid, "email" => $_POST['email'], "telphone" => $_POST['moblie'], "name" => $_POST['name']);
                 } elseif ($_POST['usertype'] == "2") {
                     $table = "company_statis";
                     $table2 = "company";
                     $data1 = $Member->FetchRatingInfo(array("uid" => $userid));
                     $data2['uid'] = $userid;
                     $data2['linkmail'] = $_POST['email'];
                     $data2['name'] = $_POST['unit_name'];
                     $data2['linktel'] = $_POST['moblie'];
                     $data2['address'] = $_POST['address'];
                     $data2['linkman'] = $_POST['linkman'];
                     if ($this->config['com_status'] == 0) {
                         $data2['r_status'] = 2;
                     }
                 }
                 if ($_POST['codeid'] == '2' && $this->config['sy_msg_regcode'] == "1") {
                     $Member->UpdateMember(array("moblie" => ''), array("moblie" => trim($_POST['moblie'])));
                     if ($usertype == '1') {
                         $Member->UpdateResume(array("telphone" => "", "moblie_status" => "0"), array("telphone" => $_POST['moblie']));
                         $data2['moblie_status'] = "1";
                     } elseif ($usertype == '2') {
                         $Member->UpdateCompany(array("linktel" => "", "moblie_status" => "0"), array("linktel" => $_POST['moblie']));
                         $data2['moblie_status'] = "1";
                     }
                 }
                 $Member->InsertReg($table, $data1);
                 $Member->InsertReg($table2, $data2);
                 $Friend = $this->MODEL("friend");
                 $Friend->SaveFriendInfo(array("uid" => $userid, "nickname" => $_POST['username'], "usertype" => $_POST['usertype']));
                 if ($_COOKIE['regcode'] != "") {
                     if ($this->config['integral_invite_reg_type'] == "1") {
                         $auto = true;
                     } else {
                         $auto = false;
                     }
                     $Member->company_invtal((int) $_COOKIE['regcode'], $this->config['integral_invite_reg'], $auto, "邀请注册", true, 2, 'integral', 23);
                 }
                 if ($this->config['integral_reg'] > 0) {
                     $Member->company_invtal($userid, $this->config['integral_reg'], true, "注册赠送", true, 2, 'integral', 23);
                 }
                 if ($_POST['usertype'] == "1") {
                     if ($this->config['user_status'] == "1" && $_POST['email']) {
                         $randstr = rand(10000000, 99999999);
                         $base = base64_encode($userid . "|" . $randstr . "|" . $this->config['coding']);
                         $data_cert['uid'] = $userid;
                         $data_cert['type'] = "cert";
                         $data_cert['email'] = $_POST['email'];
                         $data_cert['url'] = "<a href='" . $this->config['sy_weburl'] . "/index.php?m=qqconnect&c=mcert&id=" . $base . "'>点击认证</a>";
                         $data_cert['date'] = date("Y-m-d");
                         if ($this->config['sy_smtpserver'] != "" && $this->config['sy_smtpemail'] != "" && $this->config['sy_smtpuser'] != "") {
                             $this->send_msg_email($data_cert);
                             $this->errjson('帐号激活邮件已发送到您邮箱,请先激活!', 7);
                         } else {
                             $this->errjson('还没有配置邮箱,请联系管理员!');
                         }
                     } else {
                         $Member->UpdateMember(array("login_date" => time()), array("uid" => $userid));
                         $this->add_cookie($userid, $_POST['username'], $salt, $_POST['email'], $pass, $usertype);
                         $_POST['uid'] = $userid;
                         $this->regemail($_POST);
                         $this->errjson('', 1);
                     }
                 } elseif ($usertype == "2") {
                     $_POST['uid'] = $userid;
                     $this->regemail($_POST);
                     if ($this->config['com_status'] != "1") {
                         $this->errjson('注册成功,请等待管理员审核!', 7);
                     } else {
                         $Member->UpdateMember(array("login_date" => time()), array("uid" => $userid));
                         $this->add_cookie($userid, $_POST['username'], $salt, $_POST['email'], $pass, $usertype);
                         $this->errjson('', 1);
                     }
                 }
             } else {
                 $this->errjson('注册失败!', 8);
             }
         }
     } else {
         if ($_POST['username'] == '') {
             $this->errjson('用户名不能为空!', 8);
         }
     }
 }
Beispiel #4
0
 function regsave_action()
 {
     $_POST = $this->post_trim($_POST);
     $usertype = intval($_POST['usertype']);
     $_POST['username'] = $this->stringfilter($_POST['username']);
     $_POST['unit_name'] = $this->stringfilter($_POST['unit_name']);
     $_POST['address'] = $this->stringfilter($_POST['address']);
     $_POST['linkman'] = $this->stringfilter($_POST['linkman']);
     $_POST['name'] = $this->stringfilter($_POST['name']);
     if ($_COOKIE['uid'] != "" && $_COOKIE['username'] != "") {
         $this->errjson('您已经登录了!');
     }
     if (strpos($this->config['code_web'], '注册会员') !== false && md5($_POST['authcode']) != $_SESSION['authcode']) {
         $this->errjson('验证码错误!');
     }
     if (!$this->CheckRegUser($_POST['username']) && !$this->CheckRegEmail($_POST['username'])) {
         $this->errjson('用户名包含特殊字符!');
     }
     if ($_POST['codeid'] == '1') {
         if ($this->config['username'] == '1') {
             if (!$this->CheckRegUser($_POST['name']) || $_POST['name'] == "") {
                 $this->errjson('真实姓名格式不规范');
             }
         }
         if ($this->config['usertel'] == '1' && $usertype == '1' || $this->config['linkphone'] == '1' && $usertype == '2') {
             if (!preg_match("/1[3458]{1}\\d{9}\$/", $_POST['moblie'])) {
                 $this->errjson('手机格式错误!');
             } else {
                 $moblieNum = $this->obj->DB_select_num("member", "`moblie`='" . $_POST['moblie'] . "'");
                 if ($moblieNum > 0) {
                     $this->errjson('手机已存在!');
                 }
             }
         }
         if ($this->config['useremail'] == '1' && $usertype == '1' || $this->config['comemail'] == '1' && $usertype == '2') {
             if (!$this->CheckRegEmail($_POST['email']) || $_POST['email'] == "") {
                 $this->errjson('Email格式不规范!');
             }
         }
         if ($usertype == '2') {
             if ($this->config['comname'] == '1') {
                 if (!$this->CheckRegUser($_POST['unit_name']) || $_POST['unit_name'] == "") {
                     $arr['status'] = 8;
                     $arr['msg'] = '请正确填写企业名称';
                     $arr['msg'] = iconv("gbk", "utf-8", $arr['msg']);
                     echo json_encode($arr);
                     die;
                 }
             }
             if ($this->config['comaddress'] == '1') {
                 if (!$this->CheckRegUser($_POST['address']) || $_POST['address'] == "") {
                     $arr['status'] = 8;
                     $arr['msg'] = '请正确填写企业地址';
                     $arr['msg'] = iconv("gbk", "utf-8", $arr['msg']);
                     echo json_encode($arr);
                     die;
                 }
             }
             if ($this->config['linkman'] == '1') {
                 if (!$this->CheckRegUser($_POST['linkman']) || $_POST['linkman'] == "") {
                     $this->errjson('请正确填写企业联系人');
                 }
             }
         }
     } elseif ($_POST['codeid'] == '2') {
         if (!preg_match("/1[3458]{1}\\d{9}\$/", $_POST['moblie'])) {
             $this->errjson('手机格式错误!');
         }
         if ($this->config['sy_msg_regcode'] == "1") {
             if ($_POST['moblie_code']) {
                 $regCertMobile = $this->obj->DB_select_once("company_cert", "`check`='" . $_POST['moblie'] . "'");
             }
             if ($regCertMobile['check2'] != $_POST['moblie_code'] || $regCertMobile['check2'] == '') {
                 $this->errjson('短信验证码错误!');
             }
         }
         $_POST['username'] = $_POST['moblie'];
     } elseif ($_POST['codeid'] == '3') {
         if (!$this->CheckRegEmail($_POST['email']) || $_POST['email'] == "") {
             $this->errjson('Email格式不规范!');
         }
         $_POST['username'] = $_POST['email'];
     }
     if ($_POST['username'] != "" && $arr['status'] == '') {
         $nid = $this->obj->DB_select_num("member", "`username`='" . $_POST['username'] . "'", "uid");
         if ($nid) {
             $arr['status'] = 8;
             $arr['msg'] = '账户名已存在!';
         } else {
             if ($_POST['usertype'] == '1') {
                 $satus = 1;
             } elseif ($_POST['usertype'] == '2') {
                 $satus = $this->config['com_status'];
             }
             if ($this->config['sy_uc_type'] == "uc_center") {
                 $this->obj->uc_open();
                 $uid = uc_user_register($_POST['username'], $_POST['password'], $_POST['email']);
                 if ($uid <= 0) {
                     $arr['status'] = 8;
                     $arr['msg'] = '该邮箱已存在!';
                 } else {
                     list($uid, $username, $password, $email, $salt) = uc_user_login($_POST['username'], $_POST['password']);
                     $pass = md5(md5($_POST['password']) . $salt);
                     $ucsynlogin = uc_user_synlogin($uid);
                 }
             } elseif ($this->config['sy_pw_type'] == "pw_center") {
                 include APP_PATH . "/api/pw_api/pw_client_class_phpapp.php";
                 $username = $username;
                 $password = $_POST['password'];
                 $email = $_POST['email'];
                 $pw = new PwClientAPI($username, $password, $email);
                 $pwuid = $pw->register();
                 $salt = substr(uniqid(rand()), -6);
                 $pass = md5(md5($password) . $salt);
             } else {
                 $salt = substr(uniqid(rand()), -6);
                 $pass = md5(md5($_POST['password']) . $salt);
             }
             if ($arr['status'] == '') {
                 $ip = $this->obj->fun_ip_get();
                 $data['username'] = $_POST['username'];
                 $data['password'] = $pass;
                 $data['usertype'] = $_POST['usertype'];
                 $data['email'] = $_POST['email'];
                 $data['moblie'] = $_POST['moblie'];
                 $data['status'] = $satus;
                 $data['salt'] = $salt;
                 $data['reg_date'] = time();
                 $data['reg_ip'] = $ip;
                 $data['qqid'] = $_SESSION['qq']['openid'];
                 $data['sinaid'] = $_SESSION['sina']['openid'];
                 $data['wxid'] = $_SESSION['wx']['openid'];
                 $data['regcode'] = $_SESSION['regcode'];
                 $userid = $this->obj->insert_into("member", $data);
                 if (!$userid) {
                     $user_id = $this->obj->DB_select_once("member", "`username`='" . $_POST['username'] . "'", "`uid`");
                     $userid = $user_id['uid'];
                 }
                 if ($userid) {
                     if ($_SESSION['regcode'] != "") {
                         if ($this->config['integral_invite_reg_type'] == "1") {
                             $auto = true;
                         } else {
                             $auto = false;
                         }
                         $this->obj->company_invtal($_SESSION['regcode'], $this->config['integral_invite_reg'], $auto, "邀请注册", true, 2, 'integral', 23);
                     }
                     $this->unset_cookie();
                     if ($this->config[sy_pw_type] == "pw_center") {
                         $this->obj->DB_update_all("member", "`pwuid`='" . $pwuid . "'", "`uid`='" . $userid . "'");
                     }
                     if ($_POST['usertype'] == "1") {
                         $table = "member_statis";
                         $table2 = "resume";
                         $value = "`uid`='" . $userid . "',`integral`='" . $this->config['integral_score'] . "'";
                         $value2 = "`uid`='" . $userid . "',`email`='" . $_POST['email'] . "',`telphone`='" . $_POST['moblie'] . "',`name`='" . $_POST['name'] . "'";
                     } elseif ($_POST['usertype'] == "2") {
                         $table = "company_statis";
                         $table2 = "company";
                         $value = "`uid`='" . $userid . "'," . $this->rating_info();
                         $value2 = "`uid`='" . $userid . "',`linkmail`='" . $_POST['email'] . "',`name`='" . $_POST['unit_name'] . "',`linktel`='" . $_POST['moblie'] . "',`address`='" . $_POST['address'] . "',`linkman`='" . $_POST['linkman'] . "'";
                     }
                     if ($_POST['codeid'] == '2' && $this->config['sy_msg_regcode'] == "1") {
                         $this->obj->DB_update_all("member", "`moblie`='',", "`moblie`='" . $_POST['moblie'] . "'");
                         if ($usertype == '1') {
                             $this->obj->DB_update_all("resume", "`telphone`='',`moblie_status`='0'", "`telphone`='" . $_POST['moblie'] . "'");
                             $value2 .= ",`moblie_status`='1'";
                         } elseif ($usertype == '2') {
                             $this->obj->DB_update_all("company_statis", "`linktel`='',`moblie_status`='0'", "`linktel`='" . $_POST['moblie'] . "'");
                             $value .= ",`moblie_status`='1'";
                         }
                     }
                     $this->obj->DB_insert_once($table, $value);
                     $this->obj->DB_insert_once($table2, $value2);
                     $this->obj->DB_insert_once("friend_info", "`uid`='" . $userid . "',`nickname`='" . $_POST['username'] . "',`usertype`='" . $_POST['usertype'] . "'");
                     if ($_POST['usertype'] == "1") {
                         if ($this->config['user_status'] == "1") {
                             $randstr = rand(10000000, 99999999);
                             $base = base64_encode($userid . "|" . $randstr . "|" . $this->config['coding']);
                             $data_cert['uid'] = $userid;
                             $data_cert['type'] = "cert";
                             $data_cert['email'] = $_POST['email'];
                             $data_cert['url'] = "<a href='" . $this->config['sy_weburl'] . "/index.php?m=qqconnect&c=mcert&id=" . $base . "'>点击认证</a>";
                             $data_cert['date'] = date("Y-m-d");
                             $this->send_msg_email($data_cert);
                             $arr['status'] = 7;
                             $arr['msg'] = '帐号激活邮件已发送到您邮箱,请先激活!';
                         } else {
                             $this->obj->DB_update_all("member", "`login_date`='" . time() . "'", "`uid`='" . $userid . "'");
                             $this->add_cookie($userid, $_POST['username'], $salt, $_POST['email'], $pass, $usertype);
                             $_POST['uid'] = $userid;
                             $this->regemail($_POST);
                             $arr['status'] = 1;
                         }
                     } elseif ($usertype == "2") {
                         $_POST['uid'] = $userid;
                         $this->regemail($_POST);
                         if ($this->config['com_status'] != "1") {
                             $arr['status'] = 7;
                             $arr['msg'] = '注册成功,请等待管理员审核!';
                         } else {
                             $arr['status'] = 1;
                             $this->obj->DB_update_all("member", "`login_date`='" . time() . "'", "`uid`='" . $userid . "'");
                             $this->add_cookie($userid, $_POST['username'], $salt, $_POST['email'], $pass, $usertype);
                         }
                     }
                 } else {
                     $arr['status'] = 8;
                     $arr['msg'] = '注册失败!';
                 }
             }
         }
     } else {
         if ($_POST['username'] == '' && $arr['status'] == '') {
             $arr['status'] = 8;
             $arr['msg'] = '用户名不能为空!';
         }
     }
     $arr['msg'] = iconv("gbk", "utf-8", $arr['msg']);
     echo json_encode($arr);
     die;
 }