Example #1
0
        /// <summary>
        /// Used to process the current request.
        /// </summary>
        public override void ProcessRequest()
        {
            //Assemble page parts.
            RootElement.RemoveAll();
            if (InputContext.ViewingUser.IsSuperUser == false && InputContext.ViewingUser.IsEditor == false)
            {
                SerialiseAndAppend(new Error { Type = "Access Denied", ErrorMessage = "Access denied" }, "");
                return;
            }

            _siteConfig = SiteConfig.GetPreviewSiteConfig(InputContext.CurrentSite.SiteID, AppContext.ReaderCreator);
            _topicPage = new TopicPage { Page = "PREVIEW" };
            _topicPage.TopicElementList = TopicElementList.GetTopicListFromDatabase(AppContext.ReaderCreator,
                                                                         InputContext.CurrentSite.SiteID,
                                                                         TopicStatus.Preview, false);


            GetQueryParameters();
            var result = ProcessCommand();
            if(result != null)
            {
                SerialiseAndAppend(result, "");
            }

            
            var previewElement = AddElementTag(RootElement, "SITECONFIGPREVIEW");
            var editKeyElement = AddElementTag(previewElement, "EDITKEY");
            editKeyElement.InnerText = _siteConfig.EditKey.ToString();
            SerialiseAndAppend(_siteConfig, "/DNAROOT/SITECONFIGPREVIEW");


            SerialiseAndAppend(_topicPage, "");

           
        }
Example #2
0
 public MessageBoardBackup()
 {
     TopicPage = new TopicPage();
     SiteConfig = new SiteConfig();
     Date = DateTime.Now;
 }