Esempio n. 1
0
    public string CheckReg(string name, string password, string email)
    {
        name     = name.Trim();
        password = password.Trim();
        email    = email.Trim();
        if (!PF.CheckUserName(name))
        {
            return("对不起用户名中含有禁止使用的字符");
        }

        if (Shove._String.GetLength(name) < 5 || Shove._String.GetLength(name) > 16)
        {
            return("用户名长度在 5-16 个英文字符或数字、中文 3-8 之间。");
        }

        if (password.Length < 6 || password.Length > 16)
        {
            return("密码长度必须在 6-16 位之间。");
        }

        if (!Shove._String.Valid.isEmail(email))
        {
            return("电子邮件地址格式不正确。");
        }
        return("");
    }
Esempio n. 2
0
 public string CheckReg(string name, string password, string password2, string email, string realityName, string IDCardNumber)
 {
     name         = name.Trim();
     password     = password.Trim();
     password2    = password2.Trim();
     email        = email.Trim();
     realityName  = realityName.Trim();
     IDCardNumber = IDCardNumber.Trim();
     if (!PF.CheckUserName(name))
     {
         return("对不起用户名中含有禁止使用的字符");
     }
     if ((_String.GetLength(name) < 5) || (_String.GetLength(name) > 0x10))
     {
         return("用户名长度在 5-16 个英文字符或数字、中文 3-8 之间。");
     }
     if (password != password2)
     {
         return("两次密码输入不一致,请仔细检查。");
     }
     if ((password.Length < 6) || (password.Length > 0x10))
     {
         return("密码长度必须在 6-16 位之间。");
     }
     if (!_String.Valid.isEmail(email))
     {
         return("电子邮件地址格式不正确。");
     }
     return("");
 }
 public string CheckReg(string name, string password, string realyName, string email)
 {
     name      = name.Trim();
     password  = password.Trim();
     realyName = realyName.Trim();
     email     = email.Trim();
     if (!PF.CheckUserName(name))
     {
         return("对不起用户名中含有禁止使用的字符");
     }
     if ((_String.GetLength(name) < 5) || (_String.GetLength(name) > 0x10))
     {
         return("用户名长度在 5-16 个英文字符或数字、中文 3-8 之间。");
     }
     if ((password.Length < 6) || (password.Length > 0x10))
     {
         return("密码长度必须在 6-16 位之间。");
     }
     if (string.IsNullOrEmpty(realyName))
     {
         return("真实姓名不能为空.");
     }
     if (!_String.Valid.isEmail(email))
     {
         return("电子邮件地址格式不正确。");
     }
     return("");
 }
Esempio n. 4
0
    public string CheckReg(string name, string password, string password2, string email, string realityName, string inputCheckCode, string CheckCode, string IDCardNumber)
    {
        name         = name.Trim();
        password     = password.Trim();
        password2    = password2.Trim();
        email        = email.Trim();
        realityName  = realityName.Trim();
        IDCardNumber = IDCardNumber.Trim();

        if (!PF.CheckUserName(name))
        {
            return("对不起用户名中含有禁止使用的字符");
        }

        if (Shove._String.GetLength(name) < 5 || Shove._String.GetLength(name) > 16)
        {
            return("用户名长度在 5-16 个英文字符或数字、中文 3-8 之间。");
        }

        if (password != password2)
        {
            return("两次密码输入不一致,请仔细检查。");
        }

        if (password.Length < 6 || password.Length > 16)
        {
            return("密码长度必须在 6-16 位之间。");
        }

        if (!Shove._String.Valid.isEmail(email))
        {
            return("电子邮件地址格式不正确。");
        }

        //if (IDCardNumber.Trim() == "")
        //{
        //    return "请输入您的身份证号码。";
        //}

        if (IDCardNumber.Trim() != "")
        {
            if ((!Shove._String.Valid.isIDCardNumber(IDCardNumber.Trim())) && (!Shove._String.Valid.isIDCardNumber_Hongkong(IDCardNumber.Trim())) &&
                (!Shove._String.Valid.isIDCardNumber_Macau(IDCardNumber.Trim())) && (!Shove._String.Valid.isIDCardNumber_Singapore(IDCardNumber.Trim())) &&
                (!Shove._String.Valid.isIDCardNumber_Taiwan(IDCardNumber.Trim())))
            {
                return("身份证号码格式不正确。");
            }
        }

        Shove.Web.UI.ShoveCheckCode sccCheckCode = new Shove.Web.UI.ShoveCheckCode();

        if (!sccCheckCode.Valid(CheckCode, inputCheckCode))
        {
            return("验证码输入错误");
        }

        return("");
    }
Esempio n. 5
0
    public string CheckReg(string name, string password, string realyName, string siteName, string webUrl, string phone, string email, string userID)
    {
        name     = name.Trim();
        password = password.Trim();
        siteName = siteName.Trim();
        webUrl   = webUrl.Trim();
        phone    = phone.Trim();
        email    = email.Trim();

        if (Shove._Convert.StrToLong(userID, -1) < 1)
        {
            if (!PF.CheckUserName(name))
            {
                return("对不起用户名中含有禁止使用的字符");
            }

            if (Shove._String.GetLength(name) < 5 || Shove._String.GetLength(name) > 16)
            {
                return("用户名长度在 5-16 个英文字符或数字、中文 3-8 之间。");
            }

            if (password.Length < 6 || password.Length > 16)
            {
                return("密码长度必须在 6-16 位之间。");
            }

            if (realyName == "")
            {
                return("真实姓名不能为空。");
            }
        }

        if (!Shove._String.Valid.isUrl(webUrl))
        {
            return("网址不正确!");
        }

        if (string.IsNullOrEmpty(siteName))
        {
            return("请输入网站名称。");
        }

        if (!Shove._String.Valid.isMobile(phone))
        {
            return("请输入正确的手机号码。");
        }

        if (!Shove._String.Valid.isEmail(email))
        {
            return("请输入正确的电子信箱。");
        }

        return("");
    }
Esempio n. 6
0
    protected bool CheckInput()
    {
        string name = tbUserName.Text;

        if (!PF.CheckUserName(name))
        {
            Shove._Web.JavaScript.Alert(this.Page, "对不起用户名中含有禁止使用的字符");

            return(false);
        }

        if (Shove._String.GetLength(name) < 5 || Shove._String.GetLength(name) > 16)
        {
            Shove._Web.JavaScript.Alert(this.Page, "用户名长度在 5-16 个英文字符或数字、中文 3-8 之间。");

            return(false);
        }

        if (tbPassword.Text != tbPwd.Text)
        {
            Shove._Web.JavaScript.Alert(this.Page, "两次密码输入不一致,请仔细检查。");

            return(false);
        }

        if (tbPassword.Text.Length < 6 || tbPassword.Text.Length > 16)
        {
            Shove._Web.JavaScript.Alert(this.Page, "密码长度必须在 6-16 位之间。");

            return(false);
        }

        DataTable dt = new DAL.Tables.T_Users().Open("ID", "Name='" + Shove._Web.Utility.FilteSqlInfusion(name) + "'", "");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

            return(false);
        }

        if (dt.Rows.Count > 0)
        {
            Shove._Web.JavaScript.Alert(this.Page, "用户名已存在!");

            return(false);
        }

        return(true);
    }
Esempio n. 7
0
    public int CheckUserName(long siteid, string name)
    {
        if (!PF.CheckUserName(name))
        {
            return(-1);
        }

        DataTable dt = new DAL.Tables.T_Users().Open("ID", "SiteID=" + siteid + " and [Name] = '" + Shove._Web.Utility.FilteSqlInfusion(name) + "'", "");

        if (dt != null && dt.Rows.Count > 0)
        {
            return(-2);
        }

        return(0);
    }
    public int CheckUserName(string userName)
    {
        if (!PF.CheckUserName(userName))
        {
            return(-1);
        }
        DataTable table = new Tables.T_Users().Open("ID", "Name = '" + Shove._Web.Utility.FilteSqlInfusion(userName) + "'", "");

        if ((table != null) && (table.Rows.Count > 0))
        {
            return(-2);
        }
        if ((_String.GetLength(userName) >= 5) && (_String.GetLength(userName) <= 0x10))
        {
            return(0);
        }
        return(-3);
    }
Esempio n. 9
0
    public int CheckUserName(string name)
    {
        if (!PF.CheckUserName(name))
        {
            return(-1);
        }

        DataTable dt = new DAL.Tables.T_Users().Open("ID", "Name = '" + Shove._Web.Utility.FilteSqlInfusion(name) + "'", "");

        if (dt != null && dt.Rows.Count > 0)
        {
            return(-2);
        }

        if (Shove._String.GetLength(name) < 5 || Shove._String.GetLength(name) > 16)
        {
            return(-3);
        }

        return(0);
    }
    public string CheckReg(string name, string password, string password2, string email, string realityName, string inputCheckCode, string CheckCode, string IDCardNumber)
    {
        name         = name.Trim();
        password     = password.Trim();
        password2    = password2.Trim();
        email        = email.Trim();
        realityName  = realityName.Trim();
        IDCardNumber = IDCardNumber.Trim();
        if (!PF.CheckUserName(name))
        {
            return("对不起用户名中含有禁止使用的字符");
        }
        if ((_String.GetLength(name) < 5) || (_String.GetLength(name) > 0x10))
        {
            return("用户名长度在 5-16 个英文字符或数字、中文 3-8 之间。");
        }
        if (password != password2)
        {
            return("两次密码输入不一致,请仔细检查。");
        }
        if ((password.Length < 6) || (password.Length > 0x10))
        {
            return("密码长度必须在 6-16 位之间。");
        }
        if (!_String.Valid.isEmail(email))
        {
            return("电子邮件地址格式不正确。");
        }
        if ((((IDCardNumber.Trim() != "") && !_String.Valid.isIDCardNumber(IDCardNumber.Trim())) && (!_String.Valid.isIDCardNumber_Hongkong(IDCardNumber.Trim()) && !_String.Valid.isIDCardNumber_Macau(IDCardNumber.Trim()))) && (!_String.Valid.isIDCardNumber_Singapore(IDCardNumber.Trim()) && !_String.Valid.isIDCardNumber_Taiwan(IDCardNumber.Trim())))
        {
            return("身份证号码格式不正确。");
        }
        ShoveCheckCode code = new ShoveCheckCode();

        if (!code.Valid(CheckCode, inputCheckCode))
        {
            return("验证码输入错误");
        }
        return("");
    }
Esempio n. 11
0
    protected void btnReg_Click(object sender, EventArgs e)
    {
        string str = "";

        if (!PF.CheckUserName(this.tbUserName.Text))
        {
            str = str + "对不起用户名中含有禁止使用的字符.\r\n";
        }
        if ((_String.GetLength(this.tbUserName.Text) < 5) || (_String.GetLength(this.tbUserName.Text) > 0x10))
        {
            str = str + "用户名长度在 5-16 个英文字符或数字、中文 3-8 之间.\r\n";
        }
        if ((this.tbPassword.Text.Length < 6) || (this.tbPassword.Text.Length > 0x10))
        {
            str = str + "密码长度必须在 6-16 位之间.\r\n";
        }
        if (this.tbSiteName.Text.Trim().Length == 0)
        {
            str = str + "网站名称不能为空.\r\n";
        }
        if (this.tbSiteURL.Text.Trim().Length == 0)
        {
            str = str + "网站地址不能为空.\r\n";
        }
        if (!_String.Valid.isEmail(this.tbEmail.Text))
        {
            str = str + "电子邮件地址格式不正确.\r\n";
        }
        if (!this.ckbAgree.Checked)
        {
            str = str + "必须同意本站会员注册协议才能注册会员。\r\n";
        }
        if (this.CheckCode2.Visible)
        {
            if (this.tbCheckCode.Text.Trim() == "")
            {
                str = str + "请输入验证码!\n";
            }
            else if (!this.ShoveCheckCode1.Valid(this.tbCheckCode.Text.Trim()))
            {
                str = str + "验证码输入有误!\n";
            }
        }
        if (str != "")
        {
            this.lblInputError.Visible = true;
            this.lblInputError.Text    = "输入资料错误:\r\n" + str;
        }
        else
        {
            long num  = -1L;
            long num2 = -1L;
            if (this.Session[this.KeyPromotionUserID] != null)
            {
                num2 = _Convert.StrToLong(this.Session[this.KeyPromotionUserID].ToString(), -1L);
            }
            object obj2 = MSSQL.ExecuteScalar("select ID from T_Cps where OwnerUserID=" + num2, new MSSQL.Parameter[0]);
            if (obj2 != null)
            {
                num = _Convert.StrToLong(obj2.ToString(), -1L);
            }
            Thread.Sleep(500);
            string str2  = this.tbUserName.Text.Trim();
            string str3  = this.tbPassword.Text.Trim();
            string str4  = this.tbEmail.Text.Trim();
            string str5  = this.tbTel.Text.Trim();
            string str6  = this.tbQQ.Text.Trim();
            Users  users = new Users(base._Site.ID)
            {
                Name     = str2,
                Password = str3,
                Email    = str4,
                Mobile   = str5,
                QQ       = str6,
                UserType = 2
            };
            if (num > 0L)
            {
                users.CommenderID = -1L;
                users.CpsID       = num;
            }
            else
            {
                users.CommenderID = num2;
                users.CpsID       = -1L;
            }
            string returnDescription = "";
            if (users.Add(ref returnDescription) < 0)
            {
                JavaScript.Alert(this, returnDescription);
            }
            else
            {
                double    num4  = 0.0;
                DataTable table = new Tables.T_Sites().Open("Opt_CpsBonusScale", "", "");
                if ((table != null) && (table.Rows.Count > 0))
                {
                    num4 = double.Parse(table.Rows[0]["Opt_CpsBonusScale"].ToString());
                }
                users.cps.SiteID     = 1L;
                users.cps.CommendID  = num2;
                users.cps.Name       = this.tbSiteName.Text;
                users.cps.Url        = this.tbSiteURL.Text;
                users.cps.BonusScale = num4;
                users.cps.ON         = true;
                users.cps.Telephone  = this.tbTel.Text.Trim();
                users.cps.Email      = str4;
                users.cps.QQ         = str6;
                users.cps.Type       = 2;
                users.cps.DomainName = users.GetPromotionURL(0);
                if (users.cps.Add(ref returnDescription) < 0)
                {
                    JavaScript.Alert(this, returnDescription);
                }
                else if (users.Login(ref returnDescription) < 0)
                {
                    JavaScript.Alert(this, returnDescription);
                }
                else
                {
                    base.Response.Redirect("../../Default.aspx");
                }
            }
        }
    }
Esempio n. 12
0
    protected void btnReg_Click(object sender, EventArgs e)
    {
        //检查输入
        string inputErrorInfo = "";

        if (!PF.CheckUserName(tbUserName.Text))
        {
            inputErrorInfo += "对不起用户名中含有禁止使用的字符.\r\n";
        }

        if (Shove._String.GetLength(tbUserName.Text) < 5 || Shove._String.GetLength(tbUserName.Text) > 16)
        {
            inputErrorInfo += "用户名长度在 5-16 个英文字符或数字、中文 3-8 之间.\r\n";
        }

        if (tbPassword.Text.Length < 6 || tbPassword.Text.Length > 16)
        {
            inputErrorInfo += "密码长度必须在 6-16 位之间.\r\n";
        }

        if (tbSiteName.Text.Trim().Length == 0)
        {
            inputErrorInfo += "网站名称不能为空.\r\n";
        }
        if (tbSiteURL.Text.Trim().Length == 0)
        {
            inputErrorInfo += "网站地址不能为空.\r\n";
        }

        if (!Shove._String.Valid.isEmail(tbEmail.Text))
        {
            inputErrorInfo += "电子邮件地址格式不正确.\r\n";
        }
        if (!ckbAgree.Checked)
        {
            inputErrorInfo += "必须同意本站会员注册协议才能注册会员。\r\n";
        }

        if (CheckCode2.Visible)
        {
            if (tbCheckCode.Text.Trim() == "")
            {
                inputErrorInfo += "请输入验证码!\n";
            }
            else
            {
                if (!ShoveCheckCode1.Valid(tbCheckCode.Text.Trim()))
                {
                    inputErrorInfo += "验证码输入有误!\n";
                }
            }
        }

        if (inputErrorInfo != "")
        {
            lblInputError.Visible = true;
            lblInputError.Text    = "输入资料错误:\r\n" + inputErrorInfo;
            return;
        }

        long CpsID       = -1;
        long CommenderID = -1;

        if (Session[KeyPromotionUserID] != null)
        {
            CommenderID = Shove._Convert.StrToLong(Session[KeyPromotionUserID].ToString(), -1);
        }


        //检查推荐人是否为CPS商家,是就把此会员标记CSPID
        object tempOjb = Shove.Database.MSSQL.ExecuteScalar("select ID from T_Cps where OwnerUserID=" + CommenderID, new Shove.Database.MSSQL.Parameter[0]);

        if (tempOjb != null)
        {
            CpsID = Shove._Convert.StrToLong(tempOjb.ToString(), -1);
        }

        System.Threading.Thread.Sleep(500);

        string Name     = tbUserName.Text.Trim();
        string Password = tbPassword.Text.Trim();
        string Email    = tbEmail.Text.Trim();
        string Mobile   = tbTel.Text.Trim();
        string QQ       = tbQQ.Text.Trim();


        Users user = new Users(_Site.ID);

        user.Name     = Name;
        user.Password = Password;
        user.Email    = Email;
        user.Mobile   = Mobile;
        user.QQ       = QQ;
        user.UserType = 2;


        if (CpsID > 0)//推荐人为cps商家就填CpsID字段
        {
            user.CommenderID = -1;
            user.CpsID       = CpsID;
        }
        else
        {
            user.CommenderID = CommenderID;
            user.CpsID       = -1;
        }

        string ReturnDescription = "";
        int    Result            = user.Add(ref ReturnDescription);

        if (Result < 0)
        {
            Shove._Web.JavaScript.Alert(this, ReturnDescription);

            return;
        }
        else //注册成功,加入CPS站长商家
        {
            double    cpsBonusScale = 0.00;
            DataTable dtTemp        = new DAL.Tables.T_Sites().Open("Opt_CpsBonusScale", "", "");
            if (dtTemp != null && dtTemp.Rows.Count > 0)
            {
                cpsBonusScale = double.Parse(dtTemp.Rows[0]["Opt_CpsBonusScale"].ToString());
            }
            user.cps.SiteID    = 1;
            user.cps.CommendID = CommenderID;

            user.cps.Name       = tbSiteName.Text;
            user.cps.Url        = tbSiteURL.Text;
            user.cps.BonusScale = cpsBonusScale;
            user.cps.ON         = true;

            user.cps.Telephone  = tbTel.Text.Trim();
            user.cps.Email      = Email;
            user.cps.QQ         = QQ;
            user.cps.Type       = 2;
            user.cps.DomainName = user.GetPromotionURL(0);

            if (user.cps.Add(ref ReturnDescription) < 0)
            {
                Shove._Web.JavaScript.Alert(this, ReturnDescription);

                return;
            }
        }

        Result = user.Login(ref ReturnDescription);

        if (Result < 0)
        {
            Shove._Web.JavaScript.Alert(this, ReturnDescription);

            return;
        }

        Response.Redirect("../../Default.aspx");
    }
    protected void btnReg_Click(object sender, EventArgs e)
    {
        this.lblInputError.Visible = false;
        this.lblInputError.Text    = "";
        string str = "";

        if (!PF.CheckUserName(this.tbUserName.Text))
        {
            str = str + "对不起用户名中含有禁止使用的字符\n";
        }
        if ((_String.GetLength(this.tbUserName.Text) < 5) || (_String.GetLength(this.tbUserName.Text) > 0x10))
        {
            str = str + "用户名长度在 5-16 个英文字符或数字、中文 3-8 之间。\n";
        }
        if ((this.tbPassword.Text.Length < 6) || (this.tbPassword.Text.Length > 0x10))
        {
            str = str + "密码长度必须在 6-16 位之间。\n";
        }
        if (string.IsNullOrEmpty(this.tbRealyName.Text))
        {
            str = str + "真实姓名不能为空。\n";
        }
        if (!_String.Valid.isEmail(this.tbEmail.Text))
        {
            str = str + "电子邮件地址格式不正确。\n";
        }
        if (!this.ckbAgree.Checked)
        {
            str = str + "必须同意本站会员注册协议才能注册会员。\n";
        }
        if (this.CheckCode2.Visible)
        {
            if (this.tbCheckCode.Text.Trim() == "")
            {
                str = str + "请输入验证码!\n";
            }
            else if (!this.ShoveCheckCode1.Valid(this.tbCheckCode.Text.Trim()))
            {
                str = str + "验证码输入有误!\n";
            }
        }
        if (str != "")
        {
            this.lblInputError.Visible = true;
            this.lblInputError.Text    = "输入资料错误:\r\n" + str;
        }
        else
        {
            long num                    = -1L;
            long fromUserID             = -1L;
            long userHongbaoPromotionID = -1L;
            if (this.Session[this.KeyPromotionUserID] != null)
            {
                fromUserID = _Convert.StrToLong(this.Session[this.KeyPromotionUserID].ToString(), -1L);
            }
            if (this.Session[this.KeyHongbaoPromotionID] != null)
            {
                userHongbaoPromotionID = _Convert.StrToLong(this.Session[this.KeyHongbaoPromotionID].ToString(), -1L);
            }
            object obj2 = MSSQL.ExecuteScalar("select ID from T_Cps where OwnerUserID=" + fromUserID, new MSSQL.Parameter[0]);
            if (obj2 != null)
            {
                num = _Convert.StrToLong(obj2.ToString(), -1L);
            }
            Thread.Sleep(500);
            string str2  = this.tbUserName.Text.Trim();
            string str3  = this.tbPassword.Text.Trim();
            string str4  = this.tbEmail.Text.Trim();
            string str5  = this.tbRealyName.Text.Trim();
            string str6  = this.tbQQ.Text.Trim();
            Users  users = new Users(base._Site.ID)
            {
                Name        = str2,
                Password    = str3,
                Email       = str4,
                RealityName = str5,
                QQ          = str6,
                UserType    = 2
            };
            if (num > 0L)
            {
                users.CommenderID = -1L;
                users.CpsID       = num;
            }
            else
            {
                users.CommenderID = fromUserID;
                users.CpsID       = -1L;
            }
            string returnDescription = "";
            if (users.Add(ref returnDescription) < 0)
            {
                JavaScript.Alert(this, returnDescription);
            }
            else
            {
                string str8 = "<span style='font-size: 14px; color: #CC3300; font-weight: bold;'>注册成功,恭喜您成为" + base._Site.Name + "的高级会员!让我们一起共同搏击1000万大奖!</span><br/>";
                if (userHongbaoPromotionID > 0L)
                {
                    DataTable table = MSSQL.Select(string.Concat(new object[] { "select * from T_UserHongbaoPromotion where ID=", userHongbaoPromotionID, " and UserID=", fromUserID }), new MSSQL.Parameter[0]);
                    if ((table != null) && (table.Rows.Count > 0))
                    {
                        double num5 = 0.0;
                        num5 = _Convert.StrToDouble(table.Rows[0]["Money"].ToString(), 0.0);
                        int returnValue = -1;
                        Procedures.P_AcceptUserHongbaoPromotion(fromUserID, users.ID, userHongbaoPromotionID, ref returnValue, ref returnDescription);
                        if (returnValue != 0)
                        {
                            str8 = "<span style='font-size: 14px; color: #CC3300; font-weight: bold;'>注册成功,恭喜您成为" + base._Site.Name + "的高级会员!</span><br/>由以下原因未能获得推荐者的彩票红包:" + returnDescription + "<br/>";
                        }
                        else
                        {
                            str8 = "<span style='font-size: 14px; color: #CC3300; font-weight: bold;'>注册成功,恭喜您成为" + base._Site.Name + "的高级会员,并获得" + num5.ToString() + "元彩票红包!" + num5.ToString() + "元已注入您的" + base._Site.Name + "现金帐户,您可以到我们的购彩页面购买彩票啦,祝君好运!</span><br/>";
                        }
                    }
                }
                if (users.Login(ref returnDescription) < 0)
                {
                    JavaScript.Alert(this, returnDescription);
                }
                else
                {
                    this.MultiView1.ActiveViewIndex = 1;
                    this.divRegResultInfo.InnerHtml = str8;
                }
            }
        }
    }
Esempio n. 14
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        btnMobileValid.Enabled = true;
        string ValidNumber = "LtnyeFVjxGloveshove19791130ea8g502shove!@#$%^&*()__";

        try
        {
            ValidNumber = ViewState["MobileValidNumber_" + "SZJS"].ToString();
            ValidNumber = Shove._Security.Encrypt.UnEncryptString(PF.GetCallCert(), Shove._Security.Encrypt.Decrypt3DES(PF.GetCallCert(), ValidNumber, PF.DesKey));
        }
        catch { }

        if (ValidNumber != tbValidPassword.Value.Trim())
        {
            Shove._Web.JavaScript.Alert(this.Page, "验证串错误。");

            return;
        }

        if (txtCode.Value.Trim() == "")
        {
            Shove._Web.JavaScript.Alert(this.Page, "请输入验证码!");
            return;
        }
        else
        {
            if (!PF.CheckUserName(txtUser.Value))
            {
                Shove._Web.JavaScript.Alert(this.Page, "对不起用户名中含有禁止使用的字符。");
                return;
            }

            if (Shove._String.GetLength(txtUser.Value) < 5 || Shove._String.GetLength(txtUser.Value) > 16)
            {
                Shove._Web.JavaScript.Alert(this.Page, "用户名长度在 5-16 个英文字符或数字、中文 3-8 之间。");
                return;
            }

            if (txtPwdOne.Value != txtPwdTwo.Value)
            {
                Shove._Web.JavaScript.Alert(this.Page, "两次密码输入不一致,请仔细检查。");
                return;
            }

            if (txtPwdOne.Value.Length < 6 || txtPwdTwo.Value.Length > 16)
            {
                Shove._Web.JavaScript.Alert(this.Page, "密码长度必须在 6-16 位之间。");
                return;
            }

            if (!Shove._String.Valid.isEmail(txtEmail.Value))
            {
                Shove._Web.JavaScript.Alert(this.Page, "电子邮件地址格式不正确");
                return;
            }
            if (!Shove._String.Valid.isMobile(txtPhone.Value))
            {
                Shove._Web.JavaScript.Alert(this.Page, "手机格式不正确");
                return;
            }

            if (new DAL.Tables.T_Users().GetCount("Mobile = '" + txtPhone.Value + "'") > 0)
            {
                Shove._Web.JavaScript.Alert(this.Page, "此手机号码已经被其他用户验证,请重新输入一个手机号码。");
                return;
            }

            string CheckCode = "";
            try
            {
                CheckCode = this.Session["CheckCode"].ToString();
            }
            catch
            {
                Shove._Web.JavaScript.Alert(this.Page, "验证码输入错误!");
                return;
            }

            if (txtCode.Value.Trim().ToUpper() != CheckCode.ToUpper())
            {
                Shove._Web.JavaScript.Alert(this.Page, "验证码输入错误!");
                return;
            }
        }

        string Name     = this.txtUser.Value;
        string Password = this.txtPwdOne.Value;
        string Email    = this.txtEmail.Value;
        string Phpne    = this.txtPhone.Value;
        Users  user     = new Users(_Site.ID);

        user.Name     = Name;
        user.Password = Password;
        user.Email    = Email;
        user.UserType = 1;
        user.Mobile   = Phpne;



        string ReturnDescription = "";
        int    Result            = user.Add(ref ReturnDescription);



        if (Result < 0)
        {
            new Log("Users").Write("会员注册不成功:" + ReturnDescription);
            Shove._Web.JavaScript.Alert(this, ReturnDescription);
            return;
        }

        Result = user.Login(ref ReturnDescription);
        if (Result < 0)
        {
            new Log("Users").Write("注册成功后登录失败:" + ReturnDescription);
            Shove._Web.JavaScript.Alert(this, ReturnDescription);

            return;
        }

        Response.Redirect("Alipay/Send.aspx");
    }