Esempio n. 1
0
        private void UpdateUserInfo()
        {
            member.ID             = Convert.ToInt32(Function.GetFormString("ID"));
            member.UserName       = userName;
            member.Nickname       = Function.GetFormString("Nickname");
            member.Telphone       = Function.GetFormString("Telphone");
            member.QQ             = Function.GetFormString("QQ");
            member.SafetyQuestion = Function.GetFormString("SafetyQuestion");
            member.SafetyAnswer   = HttpUtility.HtmlEncode(Function.GetFormString("SafetyAnswer"));

            string strSet = "Nickname='" + member.Nickname + "'";

            strSet += ",Telphone='" + member.Telphone + "'";
            strSet += ",QQ='" + member.QQ + "'";
            strSet += ",SafetyQuestion='" + member.SafetyQuestion + "'";
            strSet += ",SafetyAnswer='" + member.SafetyAnswer + "'";

            string strWhere = "ID=" + member.ID + "";

            strWhere += " AND UserName='******'";

            if (memberBLL.Updates(strSet, strWhere) > 0)
            {
                Response.Write("<script>alert('资料保存成功');location.href='/vip/info/';</script>");
            }
            else
            {
                Response.Write("<script>alert('数据保存失败,请重试。。。');location.href='/vip/info/';</script>");
            }
        }
Esempio n. 2
0
        private void UpdatePassword()
        {
            string oldPassword = Function.GetFormString("oldPwd");
            string newPassword = Function.GetFormString("newPwd");

            oldPassword = Function.MD5(oldPassword);
            newPassword = Function.MD5(newPassword);

            string strSet = "Password='******'";

            string strWhere = "UserName='******'";

            strWhere += " AND Password='******'";


            userName = userName.Replace(" ", "").Replace("'", "");

            if (memberBLL.Updates(strSet, strWhere) > 0)
            {
                Response.Write("<script>alert('密码修改成功');location.href='/vip/changePwd/';</script>");
            }
            else
            {
                Response.Write("<script>alert('旧密码错误,请重试。。。');location.href='/vip/changePwd/';</script>");
            }
        }
Esempio n. 3
0
        private void ResetPassword(HttpContext context)
        {
            string id = context.Request.QueryString["id"];

            ClassLibrary.BLL.Member mber = new ClassLibrary.BLL.Member();

            if (mber.Updates("Password = '******'", "id = " + id) > 0)
            {
                Print(context, "success");
            }
            else
            {
                Print(context, "errors");
            }
        }
Esempio n. 4
0
        private void ChangePassword()
        {
            string newPassword = Function.GetFormString("Password");

            if (string.IsNullOrEmpty(newPassword))
            {
                Response.Write("<script>alert('没有检测到新密码,密码找回失败,请重试。。。');location.href='/forgetpwd/';</script>");
            }
            else
            {
                newPassword = Function.MD5(newPassword);

                if (bll.Updates("Password='******'", "UserName='******' AND SafetyAnswer='" + safetyAnswer + "'") > 0)
                {
                    Response.Write("<script>alert('密码修改成功,请登录!');location.href='/login/';</script>");
                }
                else
                {
                    Response.Write("<script>alert('数据保存失败,请重试。。。');location.href='/forgetpwd/';</script>");
                }
            }
        }