TrainSign.Common/LoginCheck/AdminPage.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Web;
using System.Web.UI;
using System.Collections;
using System.Collections.Specialized;
using Common;


namespace TindWit.Common
{
    public class AdminPage : System.Web.UI.Page
    {


        public AdminPage()
        {

            if (Context.Request.Cookies["witAdmin"] == null || string.IsNullOrEmpty(Context.Request.Cookies["witAdmin"].Values["token"]))
            {
                Context.Response.Redirect("/index.aspx?ReturnUrl=" + Context.Request.Url.AbsoluteUri);
                return;
            }
            HttpCookie cookie = HttpContext.Current.Request.Cookies["witAdmin"];

            if (Context.Request.Cookies["witAdmin"] == null || string.IsNullOrEmpty(Context.Request.Cookies["witAdmin"].Values["token"]))
            {
                Context.Response.Redirect("/index.aspx");
                return;
            }

        }



        public static int AdminUserID()
        {
            if (HttpContext.Current.Request != null && HttpContext.Current.Request.Cookies["witAdmin"] != null)
            {
                HttpCookie cookie = HttpContext.Current.Request.Cookies["witAdmin"];
                string Token = HttpUtility.UrlDecode(cookie.Values["token"].ToString());
                string myToken = C_UserToKen.UserToKen_Decrypt(Token);

                return Convert.ToInt32(myToken.Split('|')[0]);
            }
            else
            {
                return 0;
            }
        }


        public static string AdminUserName()
        {

            if (HttpContext.Current.Request != null && HttpContext.Current.Request.Cookies["witAdmin"] != null)
            {
                HttpCookie cookie = HttpContext.Current.Request.Cookies["witAdmin"];
                string Token = HttpUtility.UrlDecode(cookie.Values["token"].ToString());
                string myToken = C_UserToKen.UserToKen_Decrypt(Token);

后面还有 21 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。