示例#1
0
 protected VshopTemplatedWebControl()
 {
     if (HttpContext.Current.Request.Form.Keys.Count == 0)
     {
         HiAffiliation.LoadPage();
     }
 }
示例#2
0
        protected override void CreateChildControls()
        {
            this.Controls.Clear();
            //
            HiAffiliation.LoadPage();

            this.LoadHtmlThemedControl();
        }
        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();
            }
        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.siteSettings  = SettingsManager.GetMasterSettings(true);
            this.htmlTitleName = this.siteSettings.SiteName;
            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;
            this.guideConcernType             = this.siteSettings.GuideConcernType;
            this.guidePageSet                 = this.siteSettings.GuidePageSet;
            this.concernMsg                   = this.siteSettings.ConcernMsg;
            this.EnableAliPayFuwuGuidePageSet = this.siteSettings.EnableAliPayFuwuGuidePageSet;
            if (this.siteSettings.EnableAliPayFuwuGuidePageSet)
            {
                this.AlinfollowUrl = this.siteSettings.AliPayFuwuGuidePageSet;
            }
            if (this.siteSettings.EnableGuidePageSet)
            {
                this.WeixinfollowUrl = this.siteSettings.GuidePageSet;
            }
            this.IsHomeShowFloatMenu = this.siteSettings.IsHomeShowFloatMenu;
            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();
                }
                int currentMemberUserId = Globals.GetCurrentMemberUserId(false);
                if (((currentMemberUserId == 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();
                }
                MemberInfo member = MemberHelper.GetMember(currentMemberUserId);
                if (member != null)
                {
                    this.IsFollowWeiXin  = member.IsFollowWeixin;
                    this.IsFollowAliFuwu = member.IsFollowAlipay;
                }
                this.showMenu = this.siteSettings.EnableShopMenu;
                this.cssSrc   = this.cssSrc + this.siteSettings.VTheme + "/css/head.css";
                this.BindInfo();
            }
        }
示例#5
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string text = (this.Page.RouteData.Values["custpath"] != null) ? this.Page.RouteData.Values["custpath"].ToString() : "notfound";

            this.H_Page.CustomPagePath = text;
            CustomPage customPageByPath = CustomPageHelp.GetCustomPageByPath(text);

            if (customPageByPath == null)
            {
                base.Response.Redirect("/default.aspx");
            }
            this.IsShowMenu = customPageByPath.IsShowMenu;
            string value = base.Request.QueryString["ReferralId"];

            if (!string.IsNullOrEmpty(value))
            {
                customPageByPath.PV++;
                CustomPageHelp.Update(customPageByPath);
            }
            if (!string.IsNullOrEmpty(customPageByPath.TempIndexName))
            {
                this.cssSrc     = this.cssSrc + customPageByPath.TempIndexName + "/css/head.css";
                this.cssLinkStr = "<link rel=\"stylesheet\" href=\"" + this.cssSrc + "\">";
            }
            this.siteSettings  = SettingsManager.GetMasterSettings(true);
            this.htmlTitleName = customPageByPath.Name;
            this.Desc          = customPageByPath.Details;
            string userAgent = this.Page.Request.UserAgent;

            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"))
                {
                    System.Uri arg_1DF_0   = System.Web.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();
            }
        }
示例#6
0
 protected override void AttachChildControls()
 {
     if (HttpContext.Current.Request.Cookies.Get("Vshop-Member") != null)
     {
         HiAffiliation.ClearUserCookie("", false);
     }
     if (HttpContext.Current.Request.Cookies.Get("Vshop-ReferralId") != null)
     {
         HiAffiliation.ClearReferralIdCookie();
     }
     if (HttpContext.Current.Request.Cookies.Get("Vshop-Wid") != null)
     {
         HiAffiliation.ClearWidCookie("", false);
     }
     this.Page.Response.Redirect(Globals.ApplicationPath + "/Default.aspx");
 }
示例#7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         HiAffiliation.LoadPage();
         wid = Globals.GetCurrentWid();
         //wid = Globals.RequestQueryStr("wid");
         if (string.IsNullOrEmpty(this.wid))
         {
             return;
         }
         this.siteSettings = SettingsManager.GetMasterSettings(false, wid);
         this.showMenu     = this.siteSettings.EnableShopMenu;
         this.cssSrc       = this.cssSrc + this.wid + "/" + this.siteSettings.VTheme + "/css/head.css";
         this.BindWXInfo();
         this.BindUser();
     }
 }
示例#8
0
        protected void lbtnExit_Click(object sender, EventArgs e)
        {
            if (HttpContext.Current.Request.Cookies.Get("Vshop-Member") != null)
            {
                HiAffiliation.ClearUserCookie("", false);
            }
            if (HttpContext.Current.Request.Cookies.Get("Vshop-ReferralId") != null)
            {
                HiAffiliation.ClearReferralIdCookie();
            }
            if (HttpContext.Current.Request.Cookies.Get("Vshop-Wid") != null)
            {
                HiAffiliation.ClearWidCookie("", false);
            }
            Response.Redirect("/admin/login.aspx");

            Session[DTKeys.SESSION_WEB_ID]     = null;
            Session[DTKeys.SESSION_ADMIN_INFO] = null;
            //SFUtils.WriteCookie("BusnieseName", "Busniese", -14400);
            //Utils.WriteCookie("BusniesePwd", "Busniese", -14400);
        }
示例#9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.siteSettings  = SettingsManager.GetMasterSettings(true);
            this.ShowCopyRight = this.siteSettings.ShowCopyRight;
            this.htmlTitleName = this.siteSettings.SiteName;
            string userAgent = this.Page.Request.UserAgent;

            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() == 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.cssSrc   = this.cssSrc + this.siteSettings.VTheme + "/css/head.css";
                this.BindWXInfo();
            }
        }
 protected VshopTemplatedWebControl()
 {
     HiAffiliation.LoadPage();
     this.wid = Globals.GetCurrentWid();
 }
示例#11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string custPath = Page.RouteData.Values["custpath"] != null ? Page.RouteData.Values["custpath"].ToString() : "notfound";

            H_Page.CustomPagePath = custPath;
            var model = CustomPageHelp.GetCustomPageByPath(custPath);

            if (model == null)
            {
                Response.Redirect("/default.aspx");
            }

            IsShowMenu = model.IsShowMenu;
            string reId = Request.QueryString["ReferralId"];

            if (!string.IsNullOrEmpty(reId))
            {
                model.PV += 1;
                CustomPageHelp.Update(model);
            }
            if (!string.IsNullOrEmpty(model.TempIndexName))
            {
                cssSrc    += model.TempIndexName + "/css/head.css";
                cssLinkStr = "<link rel=\"stylesheet\" href=\"" + cssSrc + "\">";
            }
            siteSettings = SettingsManager.GetMasterSettings(true);
            //ShowCopyRight = siteSettings.ShowCopyRight;
            htmlTitleName = model.Name;
            Desc          = model.Details;
            string userAgent = Page.Request.UserAgent;//获取浏览器信息

            //EnabeHomePageBottomLink = siteSettings.EnabeHomePageBottomLink;//控制底部菜单是否显示
            //EnableHomePageBottomCopyright = siteSettings.EnableHomePageBottomCopyright;//控制是否显示版权信息
            //EnableGuidePageSet = siteSettings.EnableGuidePageSet;
            //IsAutoGuide = siteSettings.IsAutoGuide;
            //IsMustConcern = siteSettings.IsMustConcern;
            //DistributionLinkName = siteSettings.DistributionLinkName;//分销申请栏目名称
            //DistributionLink = string.IsNullOrEmpty(siteSettings.DistributionLink) ? "javascript:void(0);" : siteSettings.DistributionLink; //分销申请链接
            //CopyrightLinkName = siteSettings.CopyrightLinkName;//版本信息文字
            //CopyrightLink = string.IsNullOrEmpty(siteSettings.CopyrightLink) ? "javascript:void(0);" : siteSettings.CopyrightLink; //文字对应跳转链接

            //if (siteSettings.EnableAliPayFuwuGuidePageSet)
            //{
            //    AlinfollowUrl = siteSettings.AliPayFuwuGuidePageSet;//服务窗口关注连接
            //}
            //if (siteSettings.EnableGuidePageSet)
            //{
            //    WeixinfollowUrl = siteSettings.GuidePageSet; //微信关注连接
            //}

            if (!IsPostBack)
            {
                HiAffiliation.LoadPage();//放在前面,防止参数丢失

                string weiXinOpenID = Globals.GetCurrentWXOpenId;
                int    goId         = Globals.RequestQueryNum("go");
                if (userAgent.ToLower().Contains("micromessenger") && string.IsNullOrEmpty(weiXinOpenID) && siteSettings.IsValidationService && goId != 1)   //判断是否是在微信中打开
                {
                    Page.Response.Redirect("Follow.aspx?ReferralId=" + Globals.GetCurrentDistributorId());
                    Page.Response.End();
                }
                int memberID = Globals.GetCurrentMemberUserId();
                if (memberID == 0 && siteSettings.IsAutoToLogin && userAgent.ToLower().Contains("micromessenger"))//判断是否是在微信中打开
                {
                    Uri    linkUri = HttpContext.Current.Request.Url;
                    string toUrl   = Globals.GetWebUrlStart() + "/default.aspx?ReferralId=" + Globals.RequestQueryNum("ReferralId").ToString();
                    Response.Redirect("/UserLogining.aspx?returnUrl=" + Globals.UrlEncode(toUrl));
                    Response.End();
                }


                showMenu = siteSettings.EnableShopMenu;

                BindWXInfo();
            }
        }