using System;

namespace Stat.web.v
{
    /// <summary>
    /// 
    /// </summary>
    public partial class UsersAddEdit : 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 (Request.Url.ToString().ToLower().IndexOf("/statcode.aspx") > 0)
                return;

            if (!security.IsUserLogin() || !security.IsUser())
            {
                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();
            }
            int webid = Plugin.Common.Rq_Int("wid");
            if (webid > 0)
            {
                if (!security.IsOperateWebSite(webid))
                {
                    Plugin.Common.Alert("您的操作权限不足！");
                    Plugin.Common.HistoryGo(-1);
                    Response.End();
                }
            }
        }
    }
}
