Sysnet.EDP.HSE-Commerce.Web.UI/ManagePage.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sysnet.EDP.HSE_Commerce.Common;
namespace Sysnet.EDP.HSE_Commerce.Web.UI
{
public class ManagePage : System.Web.UI.Page
{
protected internal Model.siteconfig siteConfig;
public ManagePage()
{
this.Load += new EventHandler(ManagePage_Load);
siteConfig = new BLL.siteconfig().loadConfig(Utils.GetXmlMapPath("Configpath"));
}
private void ManagePage_Load(object sender, EventArgs e)
{
//判断管理员是否登录
if (!IsAdminLogin())
{
Response.Write("<script>parent.location.href='" + siteConfig.webpath + siteConfig.webmanagepath + "/login.aspx'</script>");
Response.End();
}
}
#region 管理员============================================
/// <summary>
/// 判断管理员是否已经登录(解决Session超时问题)
/// </summary>
public bool IsAdminLogin()
{
//如果Session为Null
if (Session[DTKeys.SESSION_ADMIN_INFO] != null)
{
return true;
}
else
{
//检查Cookies
string adminname = Utils.GetCookie("AdminName", "Sysnet.EDP.HSE_Commerce"); //解密用户名
string adminpwd = Utils.GetCookie("AdminPwd", "Sysnet.EDP.HSE_Commerce");
if (adminname != "" && adminpwd != "")
{
BLL.manager bll = new BLL.manager();
Model.manager model = bll.GetModel(adminname, adminpwd);
if (model != null)
{
Session[DTKeys.SESSION_ADMIN_INFO] = model;
return true;
}
}
}
return false;
}
/// <summary>
/// 取得管理员信息
后面还有 98 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
