Пример #1
0
        protected void CancelFeed(object sender, EventArgs e)
        {
            if ((FeedId != 0))
            {
                CommonControlsConfigurer.FCKEditingCancel("news", FeedId.ToString());
            }
            else
            {
                CommonControlsConfigurer.FCKEditingCancel("news");
            }

            Response.Redirect(FeedUrls.MainPageUrl, true);
        }
Пример #2
0
        public string CancelPost(Guid settingsID, string itemID)
        {
            var _settings = ForumManager.GetSettings(settingsID);

            if (String.IsNullOrEmpty(itemID) == false)
            {
                CommonControlsConfigurer.FCKEditingCancel(_settings.FileStoreModuleID, itemID);
            }
            else
            {
                CommonControlsConfigurer.FCKEditingCancel(_settings.FileStoreModuleID);
            }

            if (httpContext != null && httpContext.Request != null &&
                httpContext.Request.UrlReferrer != null &&
                !string.IsNullOrEmpty(httpContext.Request.UrlReferrer.Query))
            {
                var q     = httpContext.Request.UrlReferrer.Query;
                var start = q.IndexOf("t=");

                if (start == -1)
                {
                    start = q.IndexOf("f=");
                }

                start += 2;


                var end = q.IndexOf("&", start, StringComparison.CurrentCultureIgnoreCase);
                if (end == -1)
                {
                    end = q.Length;
                }

                var t = q.Substring(start, end - start);

                return((q.IndexOf("t=") > 0 ? _settings.PostPageAbsolutePath + "t=" : _settings.TopicPageAbsolutePath + "f=") + t);
            }
            else
            {
                return(_settings.StartPageAbsolutePath);
            }
        }
        public object CancelCommentComplete(string commentid, string domain, bool isedit)
        {
            try
            {
                if (isedit)
                {
                    CommonControlsConfigurer.FCKEditingCancel(domain, commentid);
                }
                else
                {
                    CommonControlsConfigurer.FCKEditingCancel(domain);
                }

                return(1);
            }
            catch
            {
                return(0);
            }
        }
Пример #4
0
 protected void lbCancel_Click(object sender, EventArgs e)
 {
     CommonControlsConfigurer.FCKEditingCancel("blogs", BlogId);
     Response.Redirect(Constants.DefaultPageUrl);
 }