Beispiel #1
0
        public void Admin()
        {
            String ids = ctx.PostIdList("choice");
            String cmd = ctx.Post("action");

            if (strUtil.IsNullOrEmpty(cmd))
            {
                echoText(lang("exCmd"));
                return;
            }

            if (strUtil.IsNullOrEmpty(ids))
            {
                echoText(lang("plsSelect"));
                return;
            }

            if ("pick".Equals(cmd))
            {
                pickedService.PickPost(ids);
                log(SiteLogString.PickBlogPost(), ids);
                echoAjaxOk();
            }
            else if ("unpick".Equals(cmd))
            {
                pickedService.UnPickPost(ids);
                log(SiteLogString.UnPickBlogPost(), ids);
                echoAjaxOk();
            }
            else if ("delete".Equals(cmd))
            {
                sysblogService.Delete(ids);
                log(SiteLogString.DeleteBlogPost(), ids);
                echoAjaxOk();
            }
            else if ("undelete".Equals(cmd))
            {
                sysblogService.UnDelete(ids);
                log(SiteLogString.UnDeleteBlogPost(), ids);
                echoAjaxOk();
            }
            else if ("deletetrue".Equals(cmd))
            {
                sysblogService.DeleteTrue(ids);
                log(SiteLogString.DeleteBlogPostTrue(), ids);
                echoAjaxOk();
            }
            else
            {
                echoText(lang("exUnknowCmd"));
            }
        }
Beispiel #2
0
        public virtual void Admin()
        {
            String ids        = ctx.PostIdList("choice");
            String cmd        = ctx.Post("action");
            long   categoryId = ctx.PostLong("categoryId");

            String condition = string.Format("Id in ({0}) ", ids);

            if (strUtil.IsNullOrEmpty(cmd))
            {
                echoText(lang("exCmd"));
                return;
            }

            if (strUtil.IsNullOrEmpty(ids))
            {
                echoText(lang("plsSelect"));
                return;
            }


            if ("undelete".Equals(cmd))
            {
                sysblogService.UnDelete(ids);
                log(SiteLogString.UnDeleteBlogPost(), ids);
                echoAjaxOk();
            }
            else if ("deletetrue".Equals(cmd))
            {
                sysblogService.DeleteTrue(ids);
                log(SiteLogString.DeleteBlogPostTrue(), ids);
                echoAjaxOk();
            }

            else
            {
                echoText(lang("exUnknowCmd"));
            }
        }