using System;
using System.Web;

namespace Stat.web.Manerger
{
    /// <summary>
    /// 
    /// </summary>
    public partial class Manger : System.Web.UI.MasterPage
    {


        Stat.Security.ISecurity security = Stat.Security.DataFatory.CreateSecurity();
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!security.IsMasterLogin())
            {
                Response.Write("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head><body>");
                Response.Write("您还没有登录，请先登录！");
                Response.Write("</body></html>");
                Response.End();
            }
            string strPage = HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath;
            if (!security.CheckMasterPower(strPage.Substring(strPage.LastIndexOf("/") + 1)))
            {
                Plugin.Common.Alert("Sorry! 您没有此项【操作权限】！");
                Plugin.Common.HistoryGo(-1);
                Response.End();
            }
        }
    }

}

