Web/User/UserPage.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace Common
{
public class UserPage : System.Web.UI.Page
{
protected internal string RoleID;
protected internal string RoleName;
protected internal int userid;
protected internal string username;
public UserPage()
{
if (Context.Request.Cookies["qtuser"] == null || string.IsNullOrEmpty(Context.Request.Cookies["qtuser"].Values["username"]))
{
Context.Response.Redirect("/Login.aspx?ReturnUrl=" + Context.Request.Url.AbsoluteUri);
return;
}
HttpCookie cookie = HttpContext.Current.Request.Cookies["qtuser"];
if (Context.Request.Cookies["qtuser"] == null || string.IsNullOrEmpty(Context.Request.Cookies["qtuser"].Values["username"]))
{
Context.Response.Redirect("/Login.aspx");
return;
}
else
{
RoleID = Server.UrlDecode(cookie.Values["RoleID"]);
RoleName = Server.UrlDecode(cookie.Values["RoleName"]);
username =Server.UrlDecode(cookie.Values["username"]);
userid = Convert.ToInt32(cookie.Values["userid"]);
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
