918博天堂

Server : Microsoft-IIS/10.0
System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586
User : jxgj ( 0)
PHP Version : 7.0.33
Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server
Directory :  D:/tmp_aspnet/root/cae6aa2e/15328683/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : D:/tmp_aspnet/root/cae6aa2e/15328683/App_Code.vywp5zcy.52.cs
?#pragma checksum "D:\wwwroot\anlian2025\wwwroot\App_Code\ManagerPage.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E52B0575A8A9CE5F828F46D6546CAADFA142979E"

#line 1 "D:\wwwroot\anlian2025\wwwroot\App_Code\ManagerPage.cs"
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

namespace Basic
{
    public class ManagerPage : System.Web.UI.Page
    {
        public ManagerPage()
        {
            this.Load += new EventHandler(HuiyuanPage_Load);
        }

        private void HuiyuanPage_Load(object sender, EventArgs e)
        {
            //判断治理员是否登录
            if (!IsUserLogin())
            {
                System.Web.HttpContext.Current.Response.Write("<script>parent.location.href='login.aspx'</script>");
                Response.End();
            }
        }

        /// <summary>
        /// 判断会员是否登录
        /// </summary>
        public bool IsUserLogin()
        {
            bool bolSign = false;
            if (Session[Basic.Keys.SessonAdminModel] != null)
            {
                bolSign = true;
            }
            else
            {
                string objUserName = Basic.Engine.CookieDo.GetCookie("UserID", "KEY");
                string objRole = Basic.Engine.CookieDo.GetCookie("Role", "KEY");
                string objPassword = Basic.Engine.CookieDo.GetCookie("Password", "KEY");
                if (!string.IsNullOrEmpty(objUserName) && !string.IsNullOrEmpty(objRole) && !string.IsNullOrEmpty(objPassword))
                {
                    objPassword = Basic.Tools.DESEncrypt.Decrypt(objPassword);

                    if (objRole == "1" && objPassword == Basic.Keys.LoginPassword)
                    {
                        Basic.Model.ManagerInfo model = new Basic.Model.ManagerInfo();
                        model.UserID = "治理员";
                        model.Password = Basic.Tools.DESEncrypt.Encrypt(Basic.Keys.LoginPassword);
                        model.Role = "1";
                        Session[Basic.Keys.SessonAdminModel] = model;

                        bolSign = true;
                    }
                    else
                    {
                        WebApp.Components.Admin admin = new WebApp.Components.Admin();
                        SqlDataReader reader = admin.GetAdminLogin(objUserName, objPassword);
                        if (reader.Read())
                        {
                            Basic.Model.ManagerInfo model = new Basic.Model.ManagerInfo();
                            model.UserID = objUserName;
                            model.Password = Basic.Tools.DESEncrypt.Encrypt(objPassword);
                            model.Role = "1";
                            Session[Basic.Keys.SessonAdminModel] = model;
                            bolSign = true;
                        }
                        reader.Close();
                    }
                }

            }
            return bolSign;
        }


        /// <summary>
        /// 获得治理员信息
        /// </summary>
        public Model.ManagerInfo GetAdminInfo()
        {
            if (IsUserLogin())
            {
                Model.ManagerInfo model = Session[Keys.SessonAdminModel] as Model.ManagerInfo;
                if (model != null)
                {
                    return model;
                }
            }
            return null;
        }
    }
}

#line default
#line hidden