예제 #1
0
        private void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                if ((WebConfigSettings.UseSslForMemberList) || (siteSettings.UseSslOnAllPages))
                {
                    SiteUtils.ForceSsl();
                }
                else
                {
                    SiteUtils.ClearSsl();
                }
            }

            LoadSettings();
            PopulateLabels();

            if (!allowView)
            {
                WebUtils.SetupRedirect(this, SiteRoot + "/Default.aspx");
                return;
            }

            if (!IsPostBack)
            {
                PopulateControls();
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }

            LoadParams();

            if (!WebUser.IsAdmin)
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            if ((siteId > -1) && (!siteSettings.IsServerAdminSite))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            if (SiteUtils.IsFishyPost(this))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            LoadSettings();
            PopulateLabels();

            if (!IsPostBack)
            {
                PopulateControls();
            }
        }
예제 #3
0
        private void Page_Load(object sender, EventArgs e)
        {
            if (!Request.IsAuthenticated)
            {
                SiteUtils.RedirectToLoginPage(this);
                return;
            }


            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }
            SecurityHelper.DisableBrowserCache();

            if (!WebConfigSettings.AllowUserProfilePage)
            {
                SiteUtils.RedirectToAccessDeniedPage();
                return;
            }

            siteUser = SiteUtils.GetCurrentSiteUser();

            LoadSettings();
            PopulateProfileControls();
            PopulateLabels();

            if (!IsPostBack)
            {
                PopulateControls();
            }
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Request.IsAuthenticated)
            {
                SiteUtils.RedirectToLoginPage(this);
                return;
            }

            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }
            SecurityHelper.DisableBrowserCache();

            if (!(WebConfigSettings.EnableOpenIdAuthentication && siteSettings.AllowOpenIdAuth))
            {
                WebUtils.SetupRedirect(this, SiteRoot);
                return;
            }

            LoadSettings();

            siteUser = SiteUtils.GetCurrentSiteUser();

            PopulateLabels();
            PopulateControls();
        }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((!WebUser.IsAdmin) || (!siteSettings.IsServerAdminSite))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }

            SecurityHelper.DisableBrowserCache();

            LoadSettings();

            PopulateLabels();

            if (WebConfigSettings.UseSystemLogInsteadOfFileLog)
            {
                pnlFileLog.Visible = false;
                BindDbLog();
                if (WebConfigSettings.ShowFileLogInAdditionToSystemLog)
                {
                    pnlFileLog.Visible = true;
                    ShowFileLog();
                }
            }
            else
            {
                pnlDbLog.Visible = false;
                ShowFileLog();
            }
        }
예제 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }
            SecurityHelper.DisableBrowserCache();


            LoadSettings();

            if (!Request.IsAuthenticated)
            {
                WebUtils.SetupRedirect(this, redirectUrl);
                return;
            }

            // this page is only for user who must change password
            // the regular ChangePassword.aspx uses the ChangePassword Wizard which requires the user to enter the current password
            if ((siteUser == null) || (!siteUser.MustChangePwd))
            {
                WebUtils.SetupRedirect(this, redirectUrl);
                return;
            }

            PopulateLabels();
            PopulateControls();
        }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }
            if (!Request.IsAuthenticated)
            {
                SiteUtils.RedirectToLoginPage(this);
                return;
            }
            LoadSettings();
            if (
                (!WebUser.IsAdmin) &&
                (!isSiteEditor) &&
                (!isCommerceReportViewer)
                )
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            PopulateLabels();
            PopulateControls();
        }
예제 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }

            LoadParams();

            if (!UserCanEditModule(moduleId, Store.FeatureGuid))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            LoadSettings();
            if (store == null)
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            SetupCss();
            PopulateLabels();
            PopulateControls();
            AnalyticsSection = ConfigHelper.GetStringProperty("AnalyticsWebStoreSection", "store");
        }
예제 #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }

            LoadParams();

            if (!UserCanViewPage(moduleId, Store.FeatureGuid))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            //not using this yet. Not sure if there is a need for different billing from customer info
            pnlBillingInfo.Visible = false;

            //will be shown later if shippable products are in cart
            pnlShipping.Visible = false;

            LoadSettings();

            if ((store == null) || (store.IsClosed))
            {
                WebUtils.SetupRedirect(this, SiteUtils.GetCurrentPageUrl());
                return;
            }


            PopulateLabels();
            PopulateControls();
            AnalyticsSection = mojoPortal.Core.Configuration.ConfigHelper.GetStringProperty("AnalyticsWebStoreSection", "store");
        }
예제 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable() && (siteSettings.UseSslOnAllPages || CurrentPage.RequireSsl))
            {
                SiteUtils.ForceSsl();
            }
            else
            {
                SiteUtils.ClearSsl();
            }
            if (!Request.IsAuthenticated)
            {
                SiteUtils.RedirectToLoginPage(this);
                return;
            }

            SecurityHelper.DisableBrowserCache();

            LoadSettings();

            if (!UserCanEditModule(moduleId, Blog.FeatureGuid))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            PopulateLabels();
            PopulateControls();
        }
예제 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable()) { SiteUtils.ForceSsl(); }
            SecurityHelper.DisableBrowserCache();

            LoadParams();

            if (!UserCanViewPage(moduleId, Store.FeatureGuid))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            // populate labels first because some of them may be modifed by settings
            PopulateLabels();

            LoadSettings();

            if ((store == null) || (store.IsClosed))
            {
                WebUtils.SetupRedirect(this, SiteUtils.GetCurrentPageUrl());
                return;
            }

            if ((!canCheckoutWithoutAuthentication) && (!Request.IsAuthenticated))
            {
                WebUtils.SetupRedirect(this, SiteUtils.GetCurrentPageUrl());
                return;
            }

            PopulateControls();
            AnalyticsSection = ConfigHelper.GetStringProperty("AnalyticsWebStoreSection", "store");
        }
예제 #12
0
        override protected void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this.Load            += new EventHandler(this.Page_Load);
            this.btnUpdate.Click += new EventHandler(this.btnUpdate_Click);
            //this.btnCancel.Click += new EventHandler(this.btnCancel_Click);
            this.btnDelete.Click += new EventHandler(this.btnDelete_Click);

            SecurityHelper.DisableBrowserCache();


            if ((siteSettings != null) && (CurrentPage != null))
            {
                if ((SiteUtils.SslIsAvailable()) &&
                    ((siteSettings.UseSslOnAllPages) || (CurrentPage.RequireSsl))
                    )
                {
                    SiteUtils.ForceSsl();
                }
                else
                {
                    SiteUtils.ClearSsl();
                }
            }

            SiteUtils.SetupEditor(edMessage, AllowSkinOverride, this);
        }
예제 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }

            LoadParams();
            if (!UserCanViewPage(moduleId, Store.FeatureGuid))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }
            LoadSettings();

            if ((store == null) || (store.IsClosed))
            {
                WebUtils.SetupRedirect(this, SiteUtils.GetCurrentPageUrl());
                return;
            }


            PopulateLabels();
            ShowCart();

            AnalyticsSection = ConfigHelper.GetStringProperty("AnalyticsWebStoreSection", "store");
        }
예제 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadSettings();
            if (SiteUtils.SslIsAvailable() && (siteSettings.UseSslOnAllPages || CurrentPage.RequireSsl))
            {
                SiteUtils.ForceSsl();
            }
            else
            {
                SiteUtils.ClearSsl();
            }
            if (
                (!userCanEdit) ||
                (commentGuid == Guid.Empty) || (blog == null))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            PopulateLabels();

            if (!IsPostBack)
            {
                PopulateControls();
            }
        }
예제 #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadParams();

            if (!canEdit)
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }

            LoadSettings();
            if (store == null)
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }



            PopulateLabels();

            if (Page.IsPostBack)
            {
                return;
            }

            PopulateControls();
            AnalyticsSection = ConfigHelper.GetStringProperty("AnalyticsWebStoreSection", "store");
        }
예제 #16
0
        private void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }
            SecurityHelper.DisableBrowserCache();


            if (!siteSettings.AllowNewRegistration)
            {
                Response.Redirect(SiteRoot, false);
            }

            LoadSettings();
            PopulateLabels();

            if (Request.IsAuthenticated)
            {
                pnlRegisterWrapper.Visible = false;
                pnlAuthenticated.Visible   = true;
                return;
            }

            PopulateRequiredProfileControls();
            if (!IsPostBack)
            {
                SetInitialFocus();
            }
        }
예제 #17
0
        private void EnforceSecuritySettings()
        {
            if (CurrentPage.PageId == -1)
            {
                return;
            }

            if (!CurrentPage.AllowBrowserCache)
            {
                SecurityHelper.DisableBrowserCache();
            }

            bool useSsl = false;

            if (SiteUtils.SslIsAvailable())
            {
                if (WebConfigSettings.ForceSslOnAllPages || siteSettings.UseSslOnAllPages || CurrentPage.RequireSsl)
                {
                    useSsl = true;
                }
            }

            if (useSsl)
            {
                SiteUtils.ForceSsl();
            }
            else
            {
                SiteUtils.ClearSsl();
            }
        }
예제 #18
0
        private void Page_Load(object sender, EventArgs e)
        {
            LoadSettings();

            if (!allowView)
            {
                if (!Request.IsAuthenticated)
                {
                    SiteUtils.RedirectToLoginPage(this);
                    return;
                }
                else
                {
                    WebUtils.SetupRedirect(this, SiteRoot);
                    return;
                }
            }

            if (SiteUtils.SslIsAvailable() && WebConfigSettings.ForceSslOnProfileView)
            {
                SiteUtils.ForceSsl();
            }



            PopulateControls();
        }
예제 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SiteUtils.ForceSsl();

            LoadSettings();
            if (!Request.IsAuthenticated)
            {
                SiteUtils.RedirectToLoginPage(this);
                return;
            }
            if ((!isAdminOrContentAdmin) && (!isSiteEditor))
            {
                SiteUtils.RedirectToAccessDeniedPage();
                return;
            }

            if (SiteUtils.IsFishyPost(this))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            PopulateLabels();
            PopulateControls();
        }
예제 #20
0
        private void Page_Load(object sender, EventArgs e)
        {
            if ((siteSettings != null) && (CurrentPage != null))
            {
                if ((SiteUtils.SslIsAvailable()) &&
                    ((siteSettings.UseSslOnAllPages) || (CurrentPage.RequireSsl))
                    )
                {
                    SiteUtils.ForceSsl();
                }
                else
                {
                    SiteUtils.ClearSsl();
                }
            }

            isSiteEditor = SiteUtils.UserIsSiteEditor();


            if (WebUser.IsAdminOrContentAdmin || isSiteEditor || WebUser.IsInRoles(CurrentPage.EditRoles))
            {
                UserCanEdit = true;
            }

            LoadParams();
            showUserRevenue = (WebConfigSettings.ShowRevenueInGroups && isCommerceReportViewer);

            if (!UserCanViewPage(moduleId))
            {
                if (!Request.IsAuthenticated)
                {
                    SiteUtils.RedirectToLoginPage(this);
                }
                else
                {
                    SiteUtils.RedirectToAccessDeniedPage(this);
                }
                return;
            }

            if (Page.IsPostBack)
            {
                return;
            }

            PopulateLabels();

            if ((Request.IsAuthenticated) && (currentUser == null))
            {
                currentUser = SiteUtils.GetCurrentSiteUser();
            }

            AddConnoicalUrl();
            SetupCss();

            //EditAltText = Resource.EditImageAltText;

            PopulateControls();
        }
예제 #21
0
        private void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }
            SecurityHelper.DisableBrowserCache();

            LoadSettings();

            this.query = string.Empty;

            if (siteSettings == null)
            {
                siteSettings = CacheHelper.GetCurrentSiteSettings();
            }

            PopulateLabels();

            string primarySearchProvider = SiteUtils.GetPrimarySearchProvider();

            switch (primarySearchProvider)
            {
            case "google":
                pnlInternalSearch.Visible = false;
                pnlBingSearch.Visible     = false;
                pnlGoogleSearch.Visible   = true;
                gcs.Visible = true;

                break;

            case "bing":
                pnlInternalSearch.Visible = false;
                pnlBingSearch.Visible     = true;
                pnlGoogleSearch.Visible   = false;
                bingSearch.Visible        = true;
                break;

            case "internal":
            default:

                if (WebConfigSettings.DisableSearchIndex)
                {
                    WebUtils.SetupRedirect(this, SiteUtils.GetNavigationSiteRoot());
                    return;
                }

                pnlInternalSearch.Visible = true;
                pnlBingSearch.Visible     = false;
                pnlGoogleSearch.Visible   = false;
                SetupInternalSearch();
                break;
            }

            SetupViewModeControls(false, false);
            LoadAltContent(displaySettings.IncludeTopContent, displaySettings.IncludeBottomContent, displaySettings.PageId);
            LoadSideContent(displaySettings.IncludeLeftContent, displaySettings.IncludeRightContent, displaySettings.PageId);
        }
예제 #22
0
        private void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }

            LoadSettings();



            this.query = string.Empty;

            if (siteSettings == null)
            {
                siteSettings = CacheHelper.GetCurrentSiteSettings();
            }

            PopulateLabels();

            string primarySearchProvider = SiteUtils.GetPrimarySearchProvider();


            switch (primarySearchProvider)
            {
            case "google":
                pnlInternalSearch.Visible = false;
                pnlBingSearch.Visible     = false;
                pnlGoogleSearch.Visible   = true;
                gcs.Visible = true;

                break;

            case "bing":
                pnlInternalSearch.Visible = false;
                pnlBingSearch.Visible     = true;
                pnlGoogleSearch.Visible   = false;
                bingSearch.Visible        = true;
                break;

            case "internal":
            default:

                if (WebConfigSettings.DisableSearchIndex)
                {
                    WebUtils.SetupRedirect(this, SiteUtils.GetNavigationSiteRoot());
                    return;
                }

                pnlInternalSearch.Visible = true;
                pnlBingSearch.Visible     = false;
                pnlGoogleSearch.Visible   = false;
                SetupInternalSearch();
                break;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }

            LoadParams();

            if (!Request.IsAuthenticated)
            {
                SiteUtils.RedirectToLoginPage(this);
                return;
            }

            if (!UserCanViewPage(moduleId, Store.FeatureGuid))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            LoadSettings();

            if (store == null)
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            if (order == null)
            {
                WebUtils.SetupRedirect(this, SiteUtils.GetCurrentPageUrl());
                return;
            }

            if ((siteUser != null) && ((order.UserGuid != Guid.Empty) && (order.UserGuid != siteUser.UserGuid)))
            {
                if (canEdit)
                {
                    string adminView = SiteRoot + "/WebStore/AdminOrderDetail.aspx?pageid=" + pageId.ToInvariantString()
                                       + "&mid=" + moduleId.ToInvariantString()
                                       + "&order=" + orderGuid.ToString();

                    WebUtils.SetupRedirect(this, adminView);
                    return;
                }

                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }


            PopulateLabels();
            PopulateControls();
            AnalyticsSection = ConfigHelper.GetStringProperty("AnalyticsWebStoreSection", "store");
        }
예제 #24
0
        override protected void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this.Load            += new EventHandler(this.Page_Load);
            this.btnUpdate.Click += new EventHandler(this.btnUpdate_Click);
            //this.btnCancel.Click += new EventHandler(this.btnCancel_Click);
            this.btnDelete.Click += new EventHandler(this.btnDelete_Click);

            SecurityHelper.DisableBrowserCache();
            isSiteEditor = SiteUtils.UserIsSiteEditor();

            if ((siteSettings != null) && (CurrentPage != null))
            {
                if ((SiteUtils.SslIsAvailable()) &&
                    ((siteSettings.UseSslOnAllPages) || (CurrentPage.RequireSsl))
                    )
                {
                    SiteUtils.ForceSsl();
                }
                else
                {
                    SiteUtils.ClearSsl();
                }
            }

            LoadSettings();

            if (groupId > -1)
            {
                group    = new Group(groupId);
                moduleId = group.ModuleId;
                if (group.ItemId == -1)
                {
                    Response.Redirect(siteSettings.SiteRoot);
                }
                if (!group.AllowAnonymousPosts)
                {
                    if (!Request.IsAuthenticated)
                    {
                        SiteUtils.RedirectToLoginPage(this);
                        return;
                    }

                    pnlAntiSpam.Visible = false;
                    pnlEdit.Controls.Remove(pnlAntiSpam);
                }
                else
                {
                    if ((!useSpamBlockingForAnonymous) || (Request.IsAuthenticated))
                    {
                        pnlAntiSpam.Visible = false;
                        pnlEdit.Controls.Remove(pnlAntiSpam);
                    }
                }
            }
        }
예제 #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SiteUtils.ForceSsl();

            if (!Request.IsAuthenticated)
            {
                SiteUtils.RedirectToLoginPage(this);
                return;
            }
            LoadSettings();

            if (!WebUser.IsAdminOrContentAdmin || !SiteUtils.UserIsSiteEditor() || (WebConfigSettings.DisableLoginInfo))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            if (SiteUtils.IsFishyPost(this))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            PopulateLabels();

            if (!IsPostBack)
            {
                try
                {
                    BindIndex();
                    lblMessage.Text = string.Empty;
                    BindFeatureList();

                    ddFeatureList.Items.Insert(0, new ListItem(Resource.SearchAllContentItem, Guid.Empty.ToString()));
                    if (ddFeatureList.Items.Count > 0)
                    {
                        ListItem item = ddFeatureList.Items.FindByValue(featureGuid.ToString());
                        if (item != null)
                        {
                            ddFeatureList.ClearSelection();
                            item.Selected = true;
                        }
                    }
                    else
                    {
                        ddFeatureList.Visible = false;
                    }
                }
                catch (IOException ex)
                {
                    lblMessage.Text = $"{Resource.AdminIndexBrowserExceptionDescription}\r\n{ex.Message}\r\n{ex.StackTrace}";
                }
            }
        }
예제 #26
0
        private void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable() && (siteSettings.UseSslOnAllPages || CurrentPage.RequireSsl))
            {
                SiteUtils.ForceSsl();
            }
            else
            {
                SiteUtils.ClearSsl();
            }
            AnalyticsSection = ConfigHelper.GetStringProperty("AnalyticsBlogSection", "blog");

            LoadParams();



            if (!UserCanViewPage(moduleId, Blog.FeatureGuid))
            {
                if (!Request.IsAuthenticated)
                {
                    SiteUtils.RedirectToLoginPage(this, Request.RawUrl);
                    return;
                }

                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            LoadSettings();

            DateTime selectedMonth = new DateTime(Year, Month, 1, CultureInfo.CurrentCulture.Calendar);

            try
            {
                selectedMonth = new DateTime(Year, Month, 1, CultureInfo.CurrentCulture.Calendar);
            }
            catch (Exception)
            { }

            heading.Text = Page.Server.HtmlEncode(BlogResources.BlogArchivesPrefixLabel
                                                  + selectedMonth.ToString("MMMM, yyyy"));

            if (blogModule != null)
            {
                Title = SiteUtils.FormatPageTitle(SiteInfo, blogModule.ModuleTitle + " - " + BlogResources.BlogArchivesPrefixLabel
                                                  + selectedMonth.ToString("MMMM, yyyy"));

                MetaDescription = string.Format(CultureInfo.InvariantCulture,
                                                BlogResources.ArchiveMetaDescriptionFormat,
                                                blogModule.ModuleTitle,
                                                selectedMonth.ToString("MMMM, yyyy"));
            }
        }
예제 #27
0
		private void Page_Load(object sender, EventArgs e)
		{
			if (SiteUtils.SslIsAvailable())
				SiteUtils.ForceSsl();
			SecurityHelper.DisableBrowserCache();

			if (Request.IsAuthenticated)
			{
				string returnUrlParam = Page.Request.Params.Get("returnurl");

				if (!String.IsNullOrEmpty(returnUrlParam) && !returnUrlParam.ToLower().Contains("/accessdenied.aspx"))
				{
					returnUrlParam = SecurityHelper.RemoveMarkup(Page.Server.UrlDecode(returnUrlParam));


					string redirectUrl = Page.ResolveUrl(returnUrlParam);
					if (
						((redirectUrl.StartsWith("/")) && (!(redirectUrl.StartsWith("//"))))
						|| (redirectUrl.StartsWith(SiteRoot))
						|| (redirectUrl.StartsWith(SiteRoot.Replace("https://", "http://"))))
					{
						WebUtils.SetupRedirect(this, returnUrlParam);
						return;
					}
				}

				// user is logged in
				WebUtils.SetupRedirect(this, SiteRoot + "/Default.aspx");
				return;
			}

			PopulateLabels();

			login1.SetFocus = true;

			if (siteSettings.LoginInfoTop.Length > 0)
			{
				pnlTopContent.Visible = true;
				litTopContent.Text = siteSettings.LoginInfoTop;
			}

			if (siteSettings.LoginInfoBottom.Length > 0)
			{
				pnlBottomContent.Visible = true;
				litBottomContent.Text = siteSettings.LoginInfoBottom;
			}

			SetupReturnUrlCookie();

			if (siteSettings.DisableDbAuth)
			{ pnlStandardLogin.Visible = false; }
		}
        protected void Page_Load(object sender, EventArgs e)
        {
            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }
            if (!siteSettings.AllowPasswordRetrieval)
            {
                SiteUtils.RedirectToAccessDeniedPage();
                return;
            }

            PopulateLabels();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (
                (!WebConfigSettings.EnableWindowsLiveAuthentication) ||
                (!siteSettings.AllowWindowsLiveAuth) ||
                (!siteSettings.AllowNewRegistration)
                )
            {
                WebUtils.SetupRedirect(this, SiteRoot);
                return;
            }

            if (SiteUtils.SslIsAvailable())
            {
                SiteUtils.ForceSsl();
            }
            SecurityHelper.DisableBrowserCache();

            // overriding base page default here
            this.EnableViewState = true;
            LoadSettings();

            if (windowsLive == null)
            {
                WebUtils.SetupRedirect(this, SiteRoot);
                return;
            }

            PopulateLabels();

            if (Request.IsAuthenticated)
            {
                pnlRegisterWrapper.Visible = false;
                pnlAuthenticated.Visible   = true;
                return;
            }

            PopulateRequiredProfileControls();
            if (liveUser != null)
            {
                pnlWindowsLiveLogin.Visible    = false;
                pnlWindowsLiveRegister.Visible = true;
            }
            else
            {
                pnlWindowsLiveLogin.Visible    = true;
                pnlWindowsLiveRegister.Visible = false;
            }
        }
예제 #30
0
        private void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack)
            {
                return;
            }

            if ((siteSettings != null) && (CurrentPage != null))
            {
                if ((SiteUtils.SslIsAvailable()) &&
                    ((siteSettings.UseSslOnAllPages) || (CurrentPage.RequireSsl))
                    )
                {
                    SiteUtils.ForceSsl();
                }
                else
                {
                    SiteUtils.ClearSsl();
                }
            }

            LoadParams();

            if (!UserCanViewPage(ModuleId))
            {
                if (!Request.IsAuthenticated)
                {
                    SiteUtils.RedirectToLoginPage(this);
                    return;
                }
                else
                {
                    SiteUtils.RedirectToAccessDeniedPage(this);
                    return;
                }
            }

            SetupCss();
            PopulateLabels();

            GetModuleSettings();
#if MONO
            this.rptGroups.DataBind();
#else
            this.DataBind();
#endif
            PopulateControls();
        }