protected void Page_Load(object sender, System.EventArgs e) { _MessageHelper = _Common.EkMsgRef; AppImgPath = _Common.AppImgPath; AppPath = _Common.AppPath; _PageAction = Request.QueryString["action"]; if (!string.IsNullOrEmpty(Request.QueryString["reloadtrees"])) { reloadTree = true; } object refCommon = _Common as object; Utilities.SetLanguage(_Common); //Utilities.SetLanguage(_Common); RegisterResources(); TaxonomyLanguage = _Common.ContentLanguage; TaxonomyId = Convert.ToInt64(Request.QueryString["taxonomyid"]); if (Request.QueryString["view"] != null) { _ViewItem = AntiXss.HtmlEncode(Request.QueryString["view"]); } taxonomy_request = new TaxonomyRequest(); taxonomy_request.TaxonomyId = TaxonomyId; taxonomy_request.TaxonomyLanguage = TaxonomyLanguage; _Content = _Common.EkContentRef; taxonomy_request.PageSize = 99999999; // pagesize of 0 used to mean "all" TaxonomyBaseData[] taxcats; taxcats = _Content.ReadAllSubCategories(taxonomy_request); if (taxcats != null) { TaxonomyCategoryCount = taxcats.Length; } if (Page.IsPostBack && Request.Form[isPostData.UniqueID] != "") { if (Request.Form["submittedaction"] == "delete") { _Content.DeleteTaxonomy(taxonomy_request); //Response.Write("<script type=""text/javascript"">parent.CloseChildPage();</script>") Response.Redirect("taxonomy.aspx?action=reload&rf=1&reloadtrees=Tax", true); } else if (Request.Form["submittedaction"] == "deleteitem") { if (_ViewItem != "folder") { taxonomy_request.TaxonomyIdList = Request.Form["selected_items"]; if (_ViewItem.ToLower() == "cgroup") { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.Group; } else if (_ViewItem.ToLower() == "user") { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.User; } else { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.Content; } _Content.RemoveTaxonomyItem(taxonomy_request); } else { TaxonomySyncRequest tax_folder = new TaxonomySyncRequest(); tax_folder.TaxonomyId = TaxonomyId; tax_folder.TaxonomyLanguage = TaxonomyLanguage; tax_folder.SyncIdList = Request.Form["selected_items"]; _Content.RemoveTaxonomyFolder(tax_folder); } if (Request.Params["ccp"] == null) { Response.Redirect("taxonomy.aspx?" + Request.ServerVariables["query_string"] + "&ccp=true", true); } else { Response.Redirect((string) ("taxonomy.aspx?" + Request.ServerVariables["query_string"]), true); } } } else if (IsPostBack == false) { DisplayPage(); } AssignTextStrings(); isPostData.Value = "true"; hdnSourceId.Value = TaxonomyId.ToString(); }
protected void Page_Load(object sender, System.EventArgs e) { m_refMsg = m_refCommon.EkMsgRef; AppImgPath = m_refCommon.AppImgPath; m_strPageAction = Request.QueryString["action"]; object refAPI = m_refCommon as object; Utilities.SetLanguage(m_refCommon); //Utilities.SetLanguage(m_refCommon); TaxonomyLanguage = m_refCommon.ContentLanguage; TaxonomyId = Convert.ToInt64(Request.QueryString["taxonomyid"]); if (Request.QueryString["view"] != null) { m_strViewItem = AntiXss.HtmlEncode(Request.QueryString["view"]); } PageLabel.Text = PageLabel.ToolTip = m_refMsg.GetMessage("lbl pagecontrol page"); OfLabel.Text = OfLabel.ToolTip = m_refMsg.GetMessage("lbl pagecontrol of"); FirstPage.ToolTip = m_refMsg.GetMessage("lbl first page"); PreviousPage.ToolTip = m_refMsg.GetMessage("lbl previous page"); NextPage.ToolTip = m_refMsg.GetMessage("lbl next page"); LastPage.ToolTip = m_refMsg.GetMessage("lbl last page"); FirstPage.Text = "[" + m_refMsg.GetMessage("lbl first page") + "]"; PreviousPage.Text = "[" + m_refMsg.GetMessage("lbl previous page") + "]"; NextPage.Text = "[" + m_refMsg.GetMessage("lbl next page") + "]"; LastPage.Text = "[" + m_refMsg.GetMessage("lbl last page") + "]"; taxonomy_request = new TaxonomyRequest(); taxonomy_request.TaxonomyId = TaxonomyId; taxonomy_request.TaxonomyLanguage = TaxonomyLanguage; m_refContent = m_refCommon.EkContentRef; if (Page.IsPostBack && Request.Form[isPostData.UniqueID] != "") { if (Request.Form["submittedaction"] == "delete") { m_refContent.DeleteTaxonomy(taxonomy_request); Response.Write("<script type=\"text/javascript\">parent.CloseChildPage();</script>"); } else if (Request.Form["submittedaction"] == "deleteitem") { if (m_strViewItem != "folder") { taxonomy_request.TaxonomyIdList = Request.Form["selected_items"]; if (m_strViewItem.ToLower() == "cgroup") { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.Group; } else if (m_strViewItem.ToLower() == "user") { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.User; } else { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.Content; } m_refContent.RemoveTaxonomyItem(taxonomy_request); } else { TaxonomySyncRequest tax_folder = new TaxonomySyncRequest(); tax_folder.TaxonomyId = TaxonomyId; tax_folder.TaxonomyLanguage = TaxonomyLanguage; tax_folder.SyncIdList = Request.Form["selected_items"]; m_refContent.RemoveTaxonomyFolder(tax_folder); } if (Request.Params["ccp"] == null) { Response.Redirect("taxonomy.aspx?" + Request.ServerVariables["query_string"] + "&ccp=true", true); } else { Response.Redirect((string) ("taxonomy.aspx?" + Request.ServerVariables["query_string"]), true); } } } else if (IsPostBack == false) { DisplayPage(); } isPostData.Value = "true"; }
protected void Page_Load(object sender, System.EventArgs e) { m_refMsg = m_refCommon.EkMsgRef; AppImgPath = m_refCommon.AppImgPath; m_strPageAction = Request.QueryString["action"]; //object refCommon = m_refCommon as object; Utilities.SetLanguage(m_refCommon); TaxonomyLanguage = m_refCommon.ContentLanguage; TaxonomyId = Convert.ToInt64(Request.QueryString["taxonomyid"]); if ((Request.QueryString["view"] != null)) { m_strViewItem = Request.QueryString["view"]; } taxonomy_request = new TaxonomyRequest(); taxonomy_request.TaxonomyId = TaxonomyId; taxonomy_request.TaxonomyLanguage = TaxonomyLanguage; m_refContent = m_refCommon.EkContentRef; if ((Page.IsPostBack)) { if ((Request.Form["submittedaction"] == "delete")) { m_refContent.DeleteTaxonomy(taxonomy_request); Response.Write("<script type=\"text/javascript\">parent.CloseChildPage();</script>"); } else if ((Request.Form["submittedaction"] == "deleteitem")) { if ((m_strViewItem != "folder")) { taxonomy_request.TaxonomyIdList = Request.Form["selected_items"]; if ((m_strViewItem.ToLower() == "cgroup")) { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.Group; } else if ((m_strViewItem.ToLower() == "user")) { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.User; } else { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.Content; } m_refContent.RemoveTaxonomyItem(taxonomy_request); } else { TaxonomySyncRequest tax_folder = new TaxonomySyncRequest(); tax_folder.TaxonomyId = TaxonomyId; tax_folder.TaxonomyLanguage = TaxonomyLanguage; tax_folder.SyncIdList = Request.Form["selected_items"]; m_refContent.RemoveTaxonomyFolder(tax_folder); } if ((Request.Params["ccp"] == null)) { Response.Redirect("LocaleTaxonomy.aspx?" + Request.ServerVariables["query_string"] + "&ccp=true", true); } else { Response.Redirect("LocaleTaxonomy.aspx?" + Request.ServerVariables["query_string"], true); } } } else if ((IsPostBack == false)) { DisplayPage(); } }
protected void Page_Load(object sender, System.EventArgs e) { m_refMsg = m_refContentApi.EkMsgRef; AppImgPath = m_refContentApi.AppImgPath; AppPath = m_refContentApi.AppPath; m_strPageAction = Request.QueryString["action"]; object refApi = m_refContentApi as object; Utilities.SetLanguage(m_refContentApi); //Utilities.SetLanguage(m_refContentApi); TaxonomyLanguage = m_refContentApi.ContentLanguage; if (TaxonomyLanguage == -1) { TaxonomyLanguage = m_refContentApi.DefaultContentLanguage; } if (Request.QueryString["taxonomyid"] != null) { TaxonomyId = Convert.ToInt64(Request.QueryString["taxonomyid"]); } if (Request.QueryString["parentid"] != null) { TaxonomyParentId = Convert.ToInt64(Request.QueryString["parentid"]); } if ((Request.QueryString["type"] != null) && Request.QueryString["type"].ToLower() == "author") { m_ObjectType = Ektron.Cms.Common.EkEnumeration.CMSObjectTypes.User; m_UserType = Ektron.Cms.Common.EkEnumeration.UserTypes.AuthorType; } else if ((Request.QueryString["type"] != null) && Request.QueryString["type"].ToLower() == "member") { m_ObjectType = Ektron.Cms.Common.EkEnumeration.CMSObjectTypes.User; m_UserType = Ektron.Cms.Common.EkEnumeration.UserTypes.MemberShipType; } else if ((Request.QueryString["type"] != null) && Request.QueryString["type"].ToLower() == "cgroup") { m_ObjectType = Ektron.Cms.Common.EkEnumeration.CMSObjectTypes.CommunityGroup; } if ((Request.QueryString["contFetchType"] != null) && Request.QueryString["contFetchType"].ToLower() != "") { contentFetchType = Request.QueryString["contFetchType"]; } m_refContent = m_refContentApi.EkContentRef; CalendarIcon = "<img src=\"" + m_refContentApi.AppPath + "images/UI/Icons/calendar.png\" alt=\"Calendar Event\">"; FormsIcon = "<img src=\"" + m_refContentApi.AppPath + "images/UI/Icons/contentForm.png\" alt=\"Form\">"; ContentIcon = "<img src=\"" + m_refContentApi.AppPath + "images/UI/Icons/contentHtml.png\" alt=\"Content\">"; pageIcon = "<img src=\"" + m_refContentApi.AppPath + "images/ui/icons/layout.png\" alt=\"Page\">"; //-HC- if (this.m_UserType == Ektron.Cms.Common.EkEnumeration.UserTypes.AuthorType) { UserIcon = "<img src=\"" + m_refContentApi.AppPath + "Images/ui/icons/user.png\" alt=\"Content\">"; } else { UserIcon = "<img src=\"" + m_refContentApi.AppPath + "Images/ui/icons/userMembership.png\" alt=\"Content\">"; } if ((Page.IsPostBack && (!string.IsNullOrEmpty(Request.Form[isPostData.UniqueID])) && (m_ObjectType == EkEnumeration.CMSObjectTypes.Content | (m_ObjectType == EkEnumeration.CMSObjectTypes.User & !string.IsNullOrEmpty(Request.Form["itemlist"])) | (m_ObjectType == EkEnumeration.CMSObjectTypes.CommunityGroup & !string.IsNullOrEmpty(Request.Form["itemlist"]) | (m_ObjectType == EkEnumeration.CMSObjectTypes.Folder & !string.IsNullOrEmpty(Request.Form["itemlist"])))))) //if (Page.IsPostBack && (Request.Form[isPostData.UniqueID] != "") && (m_ObjectType == Ektron.Cms.Common.EkEnumeration.CMSObjectTypes.Content || (m_ObjectType == Ektron.Cms.Common.EkEnumeration.CMSObjectTypes.User && Request.Form["itemlist"] != "") || (m_ObjectType == Ektron.Cms.Common.EkEnumeration.CMSObjectTypes.CommunityGroup && Request.Form["itemlist"] != ""))) { if (m_strPageAction == "additem") { TaxonomyRequest item_request = new TaxonomyRequest(); item_request.TaxonomyId = TaxonomyId; item_request.TaxonomyIdList = Validate(Request.Form["itemlist"]); if (m_ObjectType == Ektron.Cms.Common.EkEnumeration.CMSObjectTypes.User) { item_request.TaxonomyItemType = Ektron.Cms.Common.EkEnumeration.TaxonomyItemType.User; } else if (m_ObjectType == Ektron.Cms.Common.EkEnumeration.CMSObjectTypes.CommunityGroup) { item_request.TaxonomyItemType = Ektron.Cms.Common.EkEnumeration.TaxonomyItemType.Group; } item_request.TaxonomyLanguage = TaxonomyLanguage; m_refContent.AddTaxonomyItem(item_request); } else if (m_strPageAction == "addfolder") { TaxonomySyncRequest sync_request = new TaxonomySyncRequest(); sync_request.TaxonomyId = TaxonomyId; sync_request.SyncIdList = Validate(Request.Form["selectedfolder"]); //Validate(Request.Form("itemlist")) //sync_request.SyncRecursiveIdList = Validate(Request.Form("recursiveidlist")) sync_request.TaxonomyLanguage = TaxonomyLanguage; m_refContent.AddTaxonomySyncFolder(sync_request); } if (Request.QueryString["iframe"] == "true") { Response.Write("<script type=\"text/javascript\">parent.CloseChildPage();</script>"); } else { Response.Redirect((string) ("taxonomy.aspx?action=view&taxonomyid=" + TaxonomyId)); } } else { FolderId = Convert.ToInt64(Request.QueryString["folderid"]); folder_data_col = m_refContent.GetFolderInfoWithPath(FolderId); FolderName = folder_data_col["FolderName"].ToString(); FolderParentId = Convert.ToInt64(folder_data_col["ParentID"].ToString()); FolderPath = folder_data_col["Path"].ToString(); folder_request_col = new Collection(); folder_request_col.Add(FolderId, "ParentID", null, null); folder_request_col.Add("name", "OrderBy", null, null); folder_data_col = m_refContent.GetAllViewableChildFoldersv2_0(folder_request_col); if (m_strPageAction != "additem") { if (Request.QueryString[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam] != "") { if (Information.IsNumeric(Request.QueryString[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam])) { SelectedContentType = System.Convert.ToInt32(Request.QueryString[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]); m_refContentApi.SetCookieValue(Ektron.Cms.Common.EkConstants.ContentTypeUrlParam, SelectedContentType.ToString()); } } else if (Ektron.Cms.CommonApi.GetEcmCookie()[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam] != "") { if (Information.IsNumeric(Ektron.Cms.CommonApi.GetEcmCookie()[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam])) { SelectedContentType = System.Convert.ToInt32(Ektron.Cms.CommonApi.GetEcmCookie()[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]); } } asset_data = m_refContent.GetAssetSuperTypes(); } RegisterResources(); TaxonomyToolBar(); if (! Page.IsPostBack || m_ObjectType == Ektron.Cms.Common.EkEnumeration.CMSObjectTypes.User || m_ObjectType == Ektron.Cms.Common.EkEnumeration.CMSObjectTypes.CommunityGroup) { // avoid redisplay when clicking next/prev buttons DisplayPage(); } } }