public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } Page.Response.Cache.SetCacheability(HttpCacheability.NoCache); if (Body.IsQueryExists("Gather") && Body.IsQueryExists("GatherRuleNameCollection")) { var userKeyPrefix = StringUtils.Guid(); var parameters = AjaxGatherService.GetGatherParameters(PublishmentSystemId, Body.GetQueryString("GatherRuleNameCollection"), userKeyPrefix); RegisterScripts.Text = AjaxManager.RegisterProgressTaskScript(AjaxGatherService.GetGatherUrl(), parameters, userKeyPrefix, AjaxGatherService.GetCountArrayUrl()); } else if (Body.IsQueryExists("GatherDatabase") && Body.IsQueryExists("GatherRuleNameCollection")) { var userKeyPrefix = StringUtils.Guid(); var parameters = AjaxGatherService.GetGatherDatabaseParameters(PublishmentSystemId, Body.GetQueryString("GatherRuleNameCollection"), userKeyPrefix); RegisterScripts.Text = AjaxManager.RegisterProgressTaskScript(AjaxGatherService.GetGatherDatabaseUrl(), parameters, userKeyPrefix, AjaxGatherService.GetCountArrayUrl()); } else if (Body.IsQueryExists("GatherFile") && Body.IsQueryExists("GatherRuleNameCollection")) { var userKeyPrefix = StringUtils.Guid(); var parameters = AjaxGatherService.GetGatherFileParameters(PublishmentSystemId, Body.GetQueryString("GatherRuleNameCollection"), userKeyPrefix); RegisterScripts.Text = AjaxManager.RegisterProgressTaskScript(AjaxGatherService.GetGatherFileUrl(), parameters, userKeyPrefix, AjaxGatherService.GetCountArrayUrl()); } //----------------------------------------------------------------------------------------// else if (Body.IsQueryExists("CreateChannelsOneByOne") && Body.IsQueryExists("ChannelIDCollection")) { foreach (var channelId in TranslateUtils.StringCollectionToIntList(Body.GetQueryString("ChannelIDCollection"))) { CreateManager.CreateChannel(PublishmentSystemId, channelId); } PageUtils.Redirect(ModalTipMessage.GetRedirectUrlString("已成功将栏目放入生成队列")); } else if (Body.IsQueryExists("CreateContentsOneByOne") && Body.IsQueryExists("NodeID") && Body.IsQueryExists("ContentIDCollection")) { foreach (var contentId in TranslateUtils.StringCollectionToIntList(Body.GetQueryString("ContentIDCollection"))) { CreateManager.CreateContent(PublishmentSystemId, Body.GetQueryInt("NodeID"), contentId); } PageUtils.Redirect(ModalTipMessage.GetRedirectUrlString("已成功将内容放入生成队列")); } else if (Body.IsQueryExists("CreateByTemplate") && Body.IsQueryExists("templateID")) { CreateManager.CreateFile(PublishmentSystemId, Body.GetQueryInt("templateID")); PageUtils.Redirect(ModalTipMessage.GetRedirectUrlString("已成功将文件放入生成队列")); } else if (Body.IsQueryExists("CreateByIDsCollection") && Body.IsQueryExists("IDsCollection")) { foreach (var nodeIdContentId in TranslateUtils.StringCollectionToStringCollection(Body.GetQueryString("IDsCollection"))) { var pair = nodeIdContentId.Split('_'); CreateManager.CreateContent(PublishmentSystemId, TranslateUtils.ToInt(pair[0]), TranslateUtils.ToInt(pair[1])); } PageUtils.Redirect(ModalTipMessage.GetRedirectUrlString("已成功将文件放入生成队列")); } //---------------------------------------------------------------------------------------// else if (Body.IsQueryExists("SiteTemplateDownload")) { var userKeyPrefix = StringUtils.Guid(); var parameters = AjaxOtherService.GetSiteTemplateDownloadParameters(Body.GetQueryString("DownloadUrl"), Body.GetQueryString("DirectoryName"), userKeyPrefix); RegisterScripts.Text = AjaxManager.RegisterProgressTaskScript(AjaxOtherService.GetSiteTemplateDownloadUrl(), parameters, userKeyPrefix, AjaxOtherService.GetCountArrayUrl()); } else if (Body.IsQueryExists("SiteTemplateZip")) { var userKeyPrefix = StringUtils.Guid(); var parameters = AjaxOtherService.GetSiteTemplateZipParameters(Body.GetQueryString("DirectoryName"), userKeyPrefix); RegisterScripts.Text = AjaxManager.RegisterProgressTaskScript(AjaxOtherService.GetSiteTemplateZipUrl(), parameters, userKeyPrefix, AjaxOtherService.GetCountArrayUrl()); } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } Page.Response.Cache.SetCacheability(HttpCacheability.NoCache); if (Body.IsQueryExists("CreateChannelsOneByOne") && Body.IsQueryExists("ChannelIDCollection")) { foreach (var channelId in TranslateUtils.StringCollectionToIntList(Body.GetQueryString("ChannelIDCollection"))) { CreateManager.CreateChannel(SiteId, channelId); } LayerUtils.CloseAndOpenPageCreateStatus(Page); //PageUtils.Redirect(ModalTipMessage.GetRedirectUrlString(SiteId, "已成功将栏目放入生成队列")); } else if (Body.IsQueryExists("CreateContentsOneByOne") && Body.IsQueryExists("channelId") && Body.IsQueryExists("contentIdCollection")) { foreach (var contentId in TranslateUtils.StringCollectionToIntList(Body.GetQueryString("contentIdCollection"))) { CreateManager.CreateContent(SiteId, Body.GetQueryInt("channelId"), contentId); } LayerUtils.CloseAndOpenPageCreateStatus(Page); //PageUtils.Redirect(ModalTipMessage.GetRedirectUrlString(SiteId, "已成功将内容放入生成队列")); } else if (Body.IsQueryExists("CreateByTemplate") && Body.IsQueryExists("templateID")) { CreateManager.CreateFile(SiteId, Body.GetQueryInt("templateID")); PageUtils.Redirect(ModalTipMessage.GetRedirectUrlString(SiteId, "已成功将文件放入生成队列")); } else if (Body.IsQueryExists("CreateByIDsCollection") && Body.IsQueryExists("IDsCollection")) { foreach (var channelIdContentId in TranslateUtils.StringCollectionToStringCollection(Body.GetQueryString("IDsCollection"))) { var pair = channelIdContentId.Split('_'); CreateManager.CreateContent(SiteId, TranslateUtils.ToInt(pair[0]), TranslateUtils.ToInt(pair[1])); } LayerUtils.CloseAndOpenPageCreateStatus(Page); //PageUtils.Redirect(ModalTipMessage.GetRedirectUrlString(SiteId, "已成功将文件放入生成队列")); } //---------------------------------------------------------------------------------------// else if (Body.IsQueryExists("SiteTemplateDownload")) { var userKeyPrefix = StringUtils.Guid(); var downloadUrl = TranslateUtils.DecryptStringBySecretKey(Body.GetQueryString("DownloadUrl")); var directoryName = PathUtils.GetFileNameWithoutExtension(downloadUrl); var parameters = AjaxOtherService.GetSiteTemplateDownloadParameters(downloadUrl, directoryName, userKeyPrefix); LtlScripts.Text = AjaxManager.RegisterProgressTaskScript(AjaxOtherService.GetSiteTemplateDownloadUrl(), parameters, userKeyPrefix, AjaxOtherService.GetCountArrayUrl()); } else if (Body.IsQueryExists("SiteTemplateZip")) { var userKeyPrefix = StringUtils.Guid(); var parameters = AjaxOtherService.GetSiteTemplateZipParameters(Body.GetQueryString("DirectoryName"), userKeyPrefix); LtlScripts.Text = AjaxManager.RegisterProgressTaskScript(AjaxOtherService.GetSiteTemplateZipUrl(), parameters, userKeyPrefix, AjaxOtherService.GetCountArrayUrl()); } else if (Body.IsQueryExists("SiteTemplateUnZip")) { var userKeyPrefix = StringUtils.Guid(); var parameters = AjaxOtherService.GetSiteTemplateUnZipParameters(Body.GetQueryString("FileName"), userKeyPrefix); LtlScripts.Text = AjaxManager.RegisterProgressTaskScript(AjaxOtherService.GetSiteTemplateUnZipUrl(), parameters, userKeyPrefix, AjaxOtherService.GetCountArrayUrl()); } //---------------------------------------------------------------------------------------// else if (Body.IsQueryExists("PluginDownload")) { var userKeyPrefix = StringUtils.Guid(); var parameters = AjaxOtherService.GetPluginDownloadParameters(Body.GetQueryString("DownloadUrl"), userKeyPrefix); LtlScripts.Text = AjaxManager.RegisterProgressTaskScript(AjaxOtherService.GetPluginDownloadUrl(), parameters, userKeyPrefix, AjaxOtherService.GetCountArrayUrl()); } }