protected void Page_Load(object sender, EventArgs e)
        {
            string path = (this.Page.RouteData.Values["custpath"] != null) ? this.Page.RouteData.Values["custpath"].ToString() : "notfound";

            this.H_Page.CustomPagePath = path;
            CustomPage customDraftPageByPath = CustomPageHelp.GetCustomDraftPageByPath(path);

            if (customDraftPageByPath == null)
            {
                base.Response.Redirect("/default.aspx");
            }
            this.DraftIsShowMenu = customDraftPageByPath.DraftIsShowMenu;
            string text1 = base.Request.QueryString["ReferralId"];

            this.cssSrc        = this.cssSrc + customDraftPageByPath.TempIndexName + "/css/head.css";
            this.siteSettings  = SettingsManager.GetMasterSettings(true);
            this.htmlTitleName = customDraftPageByPath.DraftName;
            this.Desc          = customDraftPageByPath.DraftDetails;
            string userAgent = this.Page.Request.UserAgent;

            this.EnabeHomePageBottomLink       = this.siteSettings.EnabeHomePageBottomLink;
            this.EnableHomePageBottomCopyright = this.siteSettings.EnableHomePageBottomCopyright;
            this.EnableGuidePageSet            = this.siteSettings.EnableGuidePageSet;
            this.IsAutoGuide          = this.siteSettings.IsAutoGuide;
            this.IsMustConcern        = this.siteSettings.IsMustConcern;
            this.DistributionLinkName = this.siteSettings.DistributionLinkName;
            this.DistributionLink     = string.IsNullOrEmpty(this.siteSettings.DistributionLink) ? "javascript:void(0);" : this.siteSettings.DistributionLink;
            this.CopyrightLinkName    = this.siteSettings.CopyrightLinkName;
            this.CopyrightLink        = string.IsNullOrEmpty(this.siteSettings.CopyrightLink) ? "javascript:void(0);" : this.siteSettings.CopyrightLink;
            if (this.siteSettings.EnableAliPayFuwuGuidePageSet)
            {
                this.AlinfollowUrl = this.siteSettings.AliPayFuwuGuidePageSet;
            }
            if (this.siteSettings.EnableGuidePageSet)
            {
                this.WeixinfollowUrl = this.siteSettings.GuidePageSet;
            }
            if (!base.IsPostBack)
            {
                HiAffiliation.LoadPage();
                string getCurrentWXOpenId = Globals.GetCurrentWXOpenId;
                int    num = Globals.RequestQueryNum("go");
                if ((userAgent.ToLower().Contains("micromessenger") && string.IsNullOrEmpty(getCurrentWXOpenId)) && (this.siteSettings.IsValidationService && (num != 1)))
                {
                    this.Page.Response.Redirect("Follow.aspx?ReferralId=" + Globals.GetCurrentDistributorId());
                    this.Page.Response.End();
                }
                if (((Globals.GetCurrentMemberUserId(false) == 0) && this.siteSettings.IsAutoToLogin) && userAgent.ToLower().Contains("micromessenger"))
                {
                    Uri    url         = HttpContext.Current.Request.Url;
                    string urlToEncode = Globals.GetWebUrlStart() + "/default.aspx?ReferralId=" + Globals.RequestQueryNum("ReferralId").ToString();
                    base.Response.Redirect("/UserLogining.aspx?returnUrl=" + Globals.UrlEncode(urlToEncode));
                    base.Response.End();
                }
                this.showMenu = this.siteSettings.EnableShopMenu;
                this.BindWXInfo();
            }
        }