예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Title = "会员中心-" + Master.webinfo.WebName;
            string strUid = TravelAgent.Tool.CookieHelper.GetCookieValue("uid");

            if (string.IsNullOrEmpty(strUid))
            {
                Response.Redirect("/member/Login.aspx");
            }
            else
            {
                club = clubBll.GetModel(Convert.ToInt32(strUid));

                if (club.IsLocked())
                {
                    Response.Redirect("/member/Login.aspx");
                }

                if (TravelAgent.Tool.StringPlus.PasswordStrength(club.clubPwd) == TravelAgent.Tool.EnumSummary.Strength.Normal)
                {
                    strPasswordStrengthcss = "middle";
                }
                else if (TravelAgent.Tool.StringPlus.PasswordStrength(club.clubPwd) == TravelAgent.Tool.EnumSummary.Strength.Strong)
                {
                    strPasswordStrengthcss = "strong";
                }
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Title = "会员登录-" + Master.webinfo.WebName;
            if (!this.IsPostBack)
            {
                if (Request["username"] != null && Request["password"] != null)
                {
                    string strUserName = StringPlus.FilterStr(Request["username"]);
                    string strPassWord = StringPlus.FilterStr(Request["password"]);

                    TravelAgent.Model.Club model = ClubBll.GetModel(strUserName, strPassWord);
                    if (model != null)
                    {
                        if (model.IsLocked())
                        {
                            Response.Redirect("/Opr.aspx?t=o&msg=locked");
                        }

                        double day = 1.0;
                        if (Request["cooktime"] != null)
                        {
                            if (Request["cooktime"] == "1")
                            {
                                day = 7.0;
                            }
                        }
                        TravelAgent.Tool.CookieHelper.SetCookie("uid", model.id.ToString(), DateTime.Now.AddDays(day));
                        TravelAgent.Tool.CookieHelper.SetCookie("username", model.clubName, DateTime.Now.AddDays(day));
                        Response.Redirect("/member/Index.aspx");
                    }
                    else
                    {
                        Response.Redirect("/Opr.aspx?t=error&msg=login");
                    }
                }
            }
        }