Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            projectUpdateFeedLocation = ConfigurationManager.AppSettings["projectUpdatesFeedLocation"];

            Page.Header.Controls.Add(ControlGenerator.GetRssFeedControl(projectUpdateFeedLocation,
                                                                        ConfigurationManager.AppSettings["projectUpdatesRssTitle"]));

            debugMode            = DebugUtility.IsDebugMode(Response, Request);
            debugModeDiv.Visible = debugMode;
            if (debugMode)
            {
                Page.Title = "***DEBUG MODE*** " + Page.Title;
            }

            if (!this.IsPostBack)
            {
                PopulateContributorsList();
                PopulateLanguageList();
                DisplayAlertMessage();
            }

            if (pageType == PageType.Content)
            {
                nowOnlineDiv.Visible = true;
                Stats stats = this.GetStats();
                titlesOnlineCount         = stats.TitleCount;
                titlesOnlineLiteral.Text  = stats.TitleCount.ToString("0,0");
                volumesOnlineLiteral.Text = stats.VolumeCount.ToString("0,0");
                pagesOnlineLiteral.Text   = stats.PageCount.ToString("0,0");
                //protologuesOnlineLiteral.Text = stats.ProtologueCount.ToString("0,0");
                //ControlGenerator.AddScriptControl(Master.Page.Header.Controls, "/Scripts/ResizeContentPanelUtils.js");
                ControlGenerator.AddAttributesAndPreserveExisting(Body, "onload", "ResizeContentPanelHeight('newsDiv', 262);");
                ControlGenerator.AddAttributesAndPreserveExisting(Body, "onresize", "ResizeContentPanelHeight('newsDiv', 262);");
                rssFeed.FeedLocation = projectUpdateFeedLocation;
            }
        }