Web.UI/ManagePage.cs

(开头部分) 30KB

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

using System;
using System.IO;
using System.Xml;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Web;
using System.Web.UI.WebControls;
using Common;

namespace Web.UI
{
    public class ManagePage : System.Web.UI.Page
    {
        protected internal Model.WebSet webset;
        protected internal Model.Email email;
        protected internal Model.MembersSet membersset;
        public ManagePage()
        {
            this.Load += new EventHandler(ManagePage_Load);
            webset = new BLL.WebSet().loadConfig(Utils.GetXmlMapPath("Configpath"));
            email = new BLL.Email().loadConfig(Utils.GetXmlMapPath("Emailpath"));
            membersset = new BLL.MembersSet().loadConfig(Utils.GetXmlMapPath("MembersConfigpath"));
        }

        void ManagePage_Load(object sender, EventArgs e)
        {
            if (!IsAdminLogin())
            {
                Response.Write("<script>parent.location.href='" + webset.WebPath + webset.WebManagePath + "/login.aspx'</script>");
                Response.End();
            }
        }

        /// <summary>
        /// 判断管理员是否已经登录(解决Session超时问题)
        /// </summary>
        public bool IsAdminLogin()
        {
            //如果Session为Null
            if (Session["AdminNo"] != null && Session["AdminName"] != null && Session["AdminLevel"] != null && Session["AdminType"] != null)
            {
                return true;
            }
            else
            {
                //检查Cookies
                string adminname = Utils.GetCookie("AdminName", "Shop"); //解密用户名
                string adminpwd = Utils.GetCookie("AdminPwd", "Shop");
                if (adminname != "" && adminpwd != "")
                {
                    adminname = DESEncrypt.Decrypt(adminname); //解密用户名
                    BLL.Administrator bll = new BLL.Administrator();
                    if (bll.chkAdminLogin(adminname, adminpwd))
                    {
                        Model.Administrator model = new Model.Administrator();
                        model = bll.GetModel(adminname);
                        Session["AdminNo"] = model.Id;
                        Session["AdminName"] = model.UserName;
                        Session["AdminType"] = model.UserType;
后面还有 782 行代码,购买后查看完整代码

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

AI 解读 AI

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

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