Exemple #1
0
        //protected SouEi.CommonBase.RegularMatch rm = new SouEi.CommonBase.RegularMatch();

        protected virtual void Page_Load(object sender, EventArgs e)
        {            /*
                      * //Check role
                      * if (Session["UserName"] == null || String.IsNullOrEmpty(Session["UserName"].ToString()))
                      * {
                      * Application["error"] = "<font color=#ff0000 style='font-size: 12px'>访问被拒绝!请先登录!</font><br>";
                      * Server.Transfer("~/admin/errorpage.aspx");
                      * return;
                      * }
                      *
                      * if (Request.UrlReferrer == null)
                      * {
                      * Application["error"] = "<font color=#ff0000 style='font-size: 12px'>请从页面正常点击访问!</font><br>";
                      * Server.Transfer("~/admin/errorpage.aspx");
                      * return;
                      * }
                      *
                      * string currentPage = GetCurrentPageName();
                      * if (currentPage != "index.aspx")
                      * {
                      * if (!CheckPermission(currentPage))
                      * {
                      * Application["error"] = "<font color=#ff0000 style='font-size: 12px'>您没有足够的权限访问当前页面!请联系管理员。</font><br>";
                      * Server.Transfer("~/admin/errorpage.aspx");
                      * return;
                      * }
                      * }*/
            if (!this.IsPostBack)
            {
                Johnny.CMS.Common.SysParameter sp = new Johnny.CMS.Common.SysParameter();
                strAdminPageTitle = sp.WebSettings.WebsiteName;
            }
        }
Exemple #2
0
        //protected SouEi.CommonBase.RegularMatch rm = new SouEi.CommonBase.RegularMatch();

        protected virtual void Page_Load(object sender, EventArgs e)
        {            /*
            //Check role
            if (Session["UserName"] == null || String.IsNullOrEmpty(Session["UserName"].ToString()))
            {
                Application["error"] = "<font color=#ff0000 style='font-size: 12px'>访问被拒绝!请先登录!</font><br>";
                Server.Transfer("~/admin/errorpage.aspx");
                return;
            }

            if (Request.UrlReferrer == null)
            {
                Application["error"] = "<font color=#ff0000 style='font-size: 12px'>请从页面正常点击访问!</font><br>";
                Server.Transfer("~/admin/errorpage.aspx");
                return;
            }

            string currentPage = GetCurrentPageName();
            if (currentPage != "index.aspx")
            {
                if (!CheckPermission(currentPage))
                {
                    Application["error"] = "<font color=#ff0000 style='font-size: 12px'>您没有足够的权限访问当前页面!请联系管理员。</font><br>";
                    Server.Transfer("~/admin/errorpage.aspx");
                    return;
                }
            }*/
            if (!this.IsPostBack)
            {
                Johnny.CMS.Common.SysParameter sp = new Johnny.CMS.Common.SysParameter();
                strAdminPageTitle = sp.WebSettings.WebsiteName;
            }
        }