using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using iNethinkCMS.BLL;
using iNethinkCMS.Command;
namespace iNethinkCMS.Web
{
public class Global : System.Web.HttpApplication
{
private static string _MobilePath = "Mobile/";
///
/// 移动手机端模版路径
///
public static string MobilePath
{
get { return Global._MobilePath; }
set { Global._MobilePath = value; }
}
protected void Application_Start(object sender, EventArgs e)
{
}
protected void Session_Start(object sender, EventArgs e)
{
}
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (bool.Parse(new BLL_Config().GetModel_SysConfig().StopSQL))
{
string s = "
您提交的信息中含有非法代码!
如需继续操作,请与系统管理员联系!
";
if (base.Request.Cookies != null && Command_Security.CookieData())
{
base.Response.Write(s);
base.Response.End();
}
if (base.Request.UrlReferrer != null && Command_Security.referer())
{
base.Response.Write(s);
base.Response.End();
}
if (base.Request.RequestType.ToUpper() == "POST" && Command_Security.PostData())
{
base.Response.Write(s);
base.Response.End();
}
if (base.Request.RequestType.ToUpper() == "GET" && Command_Security.GetData())
{
base.Response.Write(s);
base.Response.End();
}
}
}
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
}
protected void Application_Error(object sender, EventArgs e)
{
}
protected void Session_End(object sender, EventArgs e)
{
}
protected void Application_End(object sender, EventArgs e)
{
}
}
}