protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Request.UrlReferrer != null)
{
ViewState["UrlReferrer"] = Request.UrlReferrer.ToString();
}
if (Session["user"] != null)
{
if (Request.UrlReferrer != null)
{
Response.Redirect(Request.UrlReferrer.ToString());
}
else
{
Response.Redirect("/");
}
}
username.Value = Request.Form["Uname"];
pass.Attributes.Add("value", Request.Form["password"]);
}
}
/// <summary>
/// 个人会员登陆
/// </summary>
protected void userLog()
{
Lovetrip.BLL.Manage.Users bllu = new Lovetrip.BLL.Manage.Users();
Lovetrip.Model.Manage.Users modeu = bllu.Login(username.Value.Trim(), pass.Text.Trim());
if (modeu != null)
{
Session["user"] = modeu;
Session["userType"] = 1;
Command.Public.MoveUserSession(1);
bbsLogin(modeu.unick);
if (Request.UrlReferrer != null)
{
Response.Redirect(ViewState["UrlReferrer"].ToString());
}
else
{
Response.Redirect("/");
}
}
else
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('帐号或密码输入有误!')", true);
}
}
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com