/// <summary> /// 验证是否登录成功 /// </summary> /// <param name="context"></param> private void Login_States(NVelocity.VelocityContext context) { int login_type = String_Manage.Return_Request_Int("logintype", 0); string urls = String_Manage.Return_Request_Str("urls"); CookieManage_HongRenHui.AddCookie("RED_HREN_Login_Type", login_type.ToString(), 7, false); if (urls != "" && urls != "0") { CookieManage_HongRenHui.AddCookie("RED_HREN_Login_Urls", urls, 7, false); } else { CookieManage_HongRenHui.AddCookie("RED_HREN_Login_Urls", CheckIsLogin_HongRenHui.Get_User_CenterUrl_HongRenHui(), 7, false); } if (CheckIsLogin_HongRenHui.IsLogin("RED_HREN_USERID")) { if (urls != "") { context.Put("redirecturl", urls); } else { context.Put("redirecturl", CheckIsLogin_HongRenHui.Get_User_CenterUrl_HongRenHui()); } } }
private void GetLoginState(HttpContext context) { string result = "ok"; if (!CheckIsLogin_HongRenHui.IsLogin("RED_HREN_USERID")) { result = "/login"; } context.Response.Write(result); }