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(); } } }