public Workarea_BrowseLibrary() { MsgHelper = AppUI.EkMsgRef; CurrentUserId = AppUI.UserId; AppImgPath = AppUI.AppImgPath; AppPath = AppUI.AppPath; sitePath = AppUI.SitePath; }
public librarylist() { MsgHelper = AppUI.EkMsgRef; CurrentUserId = AppUI.UserId; AppImgPath = AppUI.AppImgPath; AppPath = AppUI.AppPath; sitePath = AppUI.SitePath; }
protected void Page_Load(object sender, EventArgs e) { // initialize additional variables for later use m_refMsg = m_refSiteApi.EkMsgRef; AppImgPath = m_refSiteApi.AppImgPath; ContentLanguage = m_refSiteApi.ContentLanguage; // register necessary JS JS.RegisterJS(this, JS.ManagedScript.EktronJS); JS.RegisterJS(this, JS.ManagedScript.EktronXmlJS); JS.RegisterJS(this, JS.ManagedScript.EktronModalJS); JS.RegisterJS(this, JS.ManagedScript.EktronScrollToJS); JS.RegisterJS(this, m_refSiteApi.AppPath + "PageBuilder/Wizards/js/ektron.pagebuilder.wizards.addpage.js", "EktronPageBuilderWizardsAddPageJS"); JS.RegisterJS(this, m_refSiteApi.AppPath + "PageBuilder/Wizards/js/wizardResources.aspx", "EktronPageBuilderWizardResourcesJS"); JS.RegisterJS(this, m_refSiteApi.AppPath + "PageBuilder/Wizards/folderbrowser/ui.finder.js", "EktronPageBuilderUIFinderJS"); JS.RegisterJSBlock(this, "try{ parent.Ektron.PageBuilder.Wizards.Status.doneLoading(); } catch(junk) { }", System.Guid.NewGuid().ToString()); // register necessary CSS Css.RegisterCss(this, Css.ManagedStyleSheet.EktronWorkareaCss); Css.RegisterCss(this, Css.ManagedStyleSheet.EktronWorkareaIeCss, Css.BrowserTarget.AllIE); Css.RegisterCss(this, m_refSiteApi.AppPath + "PageBuilder/Wizards/css/ektron.pagebuilder.wizards.addpage.css", "EktronPageBuilderWizardsAddPageCSS"); Css.RegisterCss(this, m_refSiteApi.AppPath + "PageBuilder/Wizards/folderbrowser/ui.finder.css", "EktronPageBuilderUIFinderCSS"); Css.RegisterCss(this, m_refSiteApi.AppPath + "PageBuilder/Wizards/folderbrowser/ui.finder.ie.css", "EktronPageBuilderUIFinderIECSS", Css.BrowserTarget.AllIE); Css.RegisterCss(this, m_refSiteApi.AppPath + "PageBuilder/Wizards/folderbrowser/ui.theme.css", "EktronPageBuilderUIThemeCSS"); finder.InnerHtml = getchildfolders(0); // assign resource text as needed this.Title = m_refMsg.GetMessage("lbl pagebuilder add page"); btnFinish.Text = m_refMsg.GetMessage("btn finish"); btnFinish.ToolTip = btnFinish.Text; lblMetaDataTab.Text = m_refMsg.GetMessage("metadata text"); lblMetaDataTab.ToolTip = lblMetaDataTab.Text; lblSummaryTab.Text = m_refMsg.GetMessage("summary text"); lblSummaryTab.ToolTip = lblSummaryTab.Text; //ektronPageBuilderPageLayoutsLabel.Text = m_refMsg.GetMessage("lbl pagebuilder layouts"); //TODO ektronPageBuilderPageLayoutsLabel.Text = m_refMsg.GetMessage("lbl pagebuilder add master wizard"); ektronPageBuilderPageLayoutsLabel.ToolTip = ektronPageBuilderPageLayoutsLabel.Text; ektronPageBuilderPageLayoutsFolderLabel.Text = m_refMsg.GetMessage("generic folder")+":"; ektronPageBuilderPageLayoutsFolderLabel.ToolTip = ektronPageBuilderPageLayoutsFolderLabel.Text; ektronPageBuilderPleaseSelectLayout.Text = m_refMsg.GetMessage("lbl pagebuilder please select wireframe"); ektronPageBuilderPleaseSelectLayout.ToolTip = ektronPageBuilderPleaseSelectLayout.Text; pageBuilderWizardPageTitleLabel.Text = m_refMsg.GetMessage("lbl pagebuilder master page title"); pageBuilderWizardPageTitleLabel.ToolTip = pageBuilderWizardPageTitleLabel.Text; MetadataTaxonomyIntro.Text = m_refMsg.GetMessage("lbl required metadata"); pageCreationSuccess.Text = m_refMsg.GetMessage("lbl pagebuilder page creation success"); redirectPrompt.Text = m_refMsg.GetMessage("lbl pagebuilder redirect prompt"); redirectPrompt.ToolTip = redirectPrompt.Text; redirectMessage.Visible = false; // Initialize metadata and taxonomy user controls InitializeMetaTaxControls(); // Initialize Folder selector if (folderData != null) { ektronPageBuilderPageLayoutsSelectedFolderPath.Text = folderData.NameWithPath; ektronPageBuilderPageLayoutsSelectedFolderPath.ToolTip = ektronPageBuilderPageLayoutsSelectedFolderPath.Text; } // Populate the templates with the list of available wireframes PopulateTemplateList(); // initialize the Summary Editor InitializeEditor(); }
protected void Page_Load(object sender, System.EventArgs e) { CommonApi refCommonAPI = new CommonApi(); m_userId = refCommonAPI.RequestInformationRef.UserId; m_refMsg = (new CommonApi()).EkMsgRef; RegisterResources(); if (! (Request.QueryString["id"] == null)) { m_id = (string) (Request.QueryString["id"].ToLower()); } if (! (Request.QueryString["userid"] == null)) { m_msgUserId = (string) (Request.QueryString["userid"].ToLower().Trim()); } else { m_msgUserId = m_userId.ToString(); } if (! (Request.QueryString["mode"] == null)) { m_mode = (string) (Request.QueryString["mode"].ToLower()); } if ("prev" == m_mode) { m_prev = true; } else if ("next" == m_mode) { m_next = true; } if (("del" == m_mode) && (m_id.Trim().Length > 0) && Ektron.Cms.Common.EkFunctions.IsNumeric(m_id)) { long[] delList = new long[] {(Convert.ToInt64(m_id))}; PrivateMessage objPM = new PrivateMessage(refCommonAPI.RequestInformationRef); objPM.DeleteMessageList(delList, m_sentMode); refCommonAPI = null; objPM = null; Response.ClearContent(); Response.Redirect((string) ("CommunityMessaging.aspx?action=" + (SentMode ? "viewallsent" : "viewall")), false); } else { LoadMsg(); LoadToolBar(); } refCommonAPI = null; m_refMsg = null; }
private void Page_Load(System.Object sender, System.EventArgs e) { if ((_CommonApi.EkContentRef).IsAllowed(0, 0, "users", "IsLoggedIn",_CommonApi.UserId) == false) { Response.Redirect("login.aspx?fromLnkPg=1", true); return; } if ((_CommonApi.RequestInformationRef.IsMembershipUser == 1) || (_CommonApi.RequestInformationRef.UserId == 0)) { Literal literalError = new Literal(); literalError.Text = "<p>Please login as a cms user.<br/><a href=\"login.aspx\">Click here to login</a></p>"; form1.Controls.Add(literalError); mainDiv.Visible = false; return; } if (!(Request.QueryString["LangType"] == null)) { _ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]); _CommonApi.SetCookieValue("LastValidLanguageID", _ContentLanguage.ToString()); } else { _ContentLanguage = int.Parse(_CommonApi.GetCookieValue("LastValidLanguageID")); } if (_ContentLanguage == Ektron.Cms.Common.EkConstants.CONTENT_LANGUAGES_UNDEFINED) { _CommonApi.ContentLanguage = Ektron.Cms.Common.EkConstants.ALL_CONTENT_LANGUAGES; } else { _CommonApi.ContentLanguage = _ContentLanguage; } _CommonApi.ContentLanguage = Ektron.Cms.Common.EkConstants.ALL_CONTENT_LANGUAGES; try { Response.CacheControl = "no-cache"; Response.AddHeader("Pragma", "no-cache"); Response.Expires = -1; _MessageHelper = _CommonApi.EkMsgRef; SetTitlebarText(); SetHelpButtonText(); } catch (Exception ex) { Utilities.ShowError(ex.Message); } }
protected void Page_Init(object sender, EventArgs e) { Err_MostPopularWidget.Visible = false; CommonApi api = new CommonApi(); _sitepath = api.SitePath; _appPath = api.AppPath; _userLang = api.UserLanguage; SiteAPI refSiteApi = new SiteAPI(); _refMsg = refSiteApi.EkMsgRef; JS.RegisterJSInclude(this, JS.ManagedScript.EktronJS); JS.RegisterJSInclude(this, JS.ManagedScript.EktronModalJS); JS.RegisterJSInclude(this, JS.ManagedScript.EktronUICoreJS); JS.RegisterJSInclude(this, JS.ManagedScript.EktronUITabsJS); Ektron.Cms.Framework.UI.Packages.jQuery.jQueryUI.ThemeRoller.Register(this); Css.RegisterCss(this, Css.ManagedStyleSheet.EktronUITabsCss); Css.RegisterCss(this, Css.ManagedStyleSheet.EktronModalCss); JS.RegisterJSBlock(this, MakeClientScript(), this.ClientID + "_ClientScriptID"); _host = Ektron.Cms.Widget.WidgetHost.GetHost(this); _host.Title = "Most Popular Widget"; _host.Edit += new EditDelegate(EditEvent); _host.Maximize += new MaximizeDelegate(delegate() { Visible = true; }); _host.Minimize += new MinimizeDelegate(delegate() { Visible = false; }); _host.Create += new CreateDelegate(delegate() { EditEvent(""); }); PreRender += new EventHandler(delegate(object PreRenderSender, EventArgs Evt) { SetOutput(); }); //string myPath = string.Empty; //if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["ek_helpDomainPrefix"])) //{ // string helpDomain = ConfigurationManager.AppSettings["ek_helpDomainPrefix"]; // if ((helpDomain.IndexOf("[ek_cmsversion]") > 1)) // { // myPath = helpDomain.Replace("[ek_cmsversion]", new CommonApi().RequestInformationRef.Version.Replace(".", "0").Substring(0, 3)); // } // else // { // myPath = ConfigurationManager.AppSettings["ek_helpDomainPrefix"]; // } //} //else //{ // myPath = _appPath + "/help"; //} //_host.HelpFile = myPath + "/Main_Import_file/Most_Popular_Widget.htm"; LocalizeMarkup(); UpdateMarkup(); updateControl(); ViewSet.SetActiveView(View); }
public WidgetHostCtrl() { requestInformation = ObjectFactory.GetRequestInfoProvider().GetRequestInformation(); m_refMsg = new EkMessageHelper(requestInformation); appPath = requestInformation.ApplicationPath; }
protected void Page_Load(object sender, System.EventArgs e) { try { Response.CacheControl = "no-cache"; Response.AddHeader("Pragma", "no-cache"); Response.Expires = -1; CurrentUserId = m_refCommon.RequestInformationRef.UserId; m_refContent = m_refCommon.EkContentRef; m_refMsg = m_refCommon.EkMsgRef; RegisterResources(); Utilities.ValidateUserLogin(); if ((m_refContentApi.RequestInformationRef.IsMembershipUser == 1 || (!m_refContentApi.IsARoleMember(Ektron.Cms.Common.EkEnumeration.CmsRoleIds.AdminXliff))) && (!m_refContentApi.IsAdmin())) { Response.Redirect("../reterror.aspx?info=" + m_refContentApi.EkMsgRef.GetMessage("msg login xliff administrator"), false); return; } else { AppImgPath = m_refCommon.AppImgPath; AppPath = m_refCommon.AppPath; litAppPath.Text = AppPath; EnableMultilingual = m_refCommon.EnableMultilingual; displaystylesheet.Text = m_refStyle.GetClientScript(); if ((Request.QueryString["action"] != null && !string.IsNullOrEmpty(Request.QueryString["action"]))) { m_strPageAction = Request.QueryString["action"].ToLower(); } Utilities.SetLanguage(m_refCommon); TaxonomyLanguage = m_refCommon.ContentLanguage; if ((Page.IsPostBack)) { if (((Request.Form[submittedaction.UniqueID]) == "deleteSelected")) { TaxonomyRequest taxonomy_request_data = new TaxonomyRequest(); taxonomy_request_data.TaxonomyIdList = Request.Form["selected_taxonomy"]; taxonomy_request_data.TaxonomyLanguage = TaxonomyLanguage; m_refContent.DeleteTaxonomy(taxonomy_request_data); Response.Redirect("LocaleTaxonomy.aspx?rf=1", false); } } switch (m_strPageAction) { case "add": addLocaleTaxonomy m_at = default(addLocaleTaxonomy); m_at = (addLocaleTaxonomy)LoadControl("../controls/localetaxonomy/addLocaleTaxonomy.ascx"); m_at.ID = "taxonomy"; DataHolder.Controls.Add(m_at); break; case "edit": case "reorder": editLocaleTaxonomy m_et = default(editLocaleTaxonomy); m_et = (editLocaleTaxonomy)LoadControl("../controls/localetaxonomy/editLocaleTaxonomy.ascx"); m_et.ID = "taxonomy"; DataHolder.Controls.Add(m_et); break; case "view": viewLocaletaxonomy m_vt = default(viewLocaletaxonomy); m_vt = (viewLocaletaxonomy)LoadControl("../controls/localetaxonomy/viewLocaletaxonomy.ascx"); m_vt.ID = "taxonomy"; DataHolder.Controls.Add(m_vt); break; case "viewcontent": case "removeitems": Control m_vi = default(Control); m_vi = (Control)LoadControl("../controls/localetaxonomy/viewLocaleTaxonomyItems.ascx"); m_vi.ID = "taxonomy"; DataHolder.Controls.Add(m_vi); break; case "viewattributes": Control m_va = default(Control); m_va = (Control)LoadControl("../controls/localetaxonomy/viewLocaleTaxonomyAttributes.ascx"); m_va.ID = "taxonomy"; DataHolder.Controls.Add(m_va); break; case "additem": case "addfolder": if ((m_strPageAction == "addfolder")) { //body.Attributes.Add("onload", "Main.start();displayTreeFolderSelect();showSelectedFolderTree();setupClassNames();") body.Attributes.Add("onload", "Main.start();displayTreeFolderSelect();showSelectedFolderTree();setupClassNames();"); } assignLocaleTaxonomy m_asnt = default(assignLocaleTaxonomy); m_asnt = (assignLocaleTaxonomy)LoadControl("../controls/localetaxonomy/assignLocaleTaxonomy.ascx"); m_asnt.ID = "taxonomy"; DataHolder.Controls.Add(m_asnt); break; default: div_taxonomylist.Visible = true; if ((IsPostBack == false || (IsPostBack == true & !string.IsNullOrEmpty(Request.Form[isSearchPostData.UniqueID])))) { //ViewAllTaxonomy(); ViewAllToolBar(); } break; } //if ((Request.QueryString["rf"] == "1")) //{ // litRefreshAccordion.Text = "<script language=\"javascript\">" + "\n" + "top.refreshTaxonomyAccordion(" + TaxonomyLanguage + ");" + "\n" + "</script>" + "\n"; //} } SetJsServerVariables(); } catch (System.Threading.ThreadAbortException) { //Do nothing } catch (Exception ex) { Response.Redirect("../reterror.aspx?info=" + EkFunctions.UrlEncode(ex.Message + ".") + "&LangType=" + TaxonomyLanguage, false); } }
protected void Page_Load(object sender, System.EventArgs e) { try { CurrentUserId = m_refCommon.RequestInformationRef.UserId; m_refMsg = m_refCommon.EkMsgRef; Utilities.ValidateUserLogin(); if (m_refCommon.RequestInformationRef.IsMembershipUser > 0 || CurrentUserId == 0) { Response.Redirect(m_refCommon.ApplicationPath + "reterror.aspx?info=" + Server.UrlEncode(m_refMsg.GetMessage("msg login cms user")), false); return; } else { AppImgPath = (string)m_refCommon.AppImgPath; EnableMultilingual = System.Convert.ToInt32(m_refCommon.EnableMultilingual); displaystylesheet.Text = m_refStyle.GetClientScript(); if (!String.IsNullOrEmpty(Request.QueryString["action"])) { m_strPageAction = Request.QueryString["action"].ToLower(); } Utilities.SetLanguage(m_refCommon); m_refContent = m_refCommon.EkContentRef; TaxonomyLanguage = System.Convert.ToInt32(m_refCommon.ContentLanguage); RegisterResources(); SetJsServerVariables(); TaxonomyRequest taxonomy_request_data = null; if (Page.IsPostBack) { string xml = ""; string title = ""; title = (string)txttitle.Text; if (textimport.Text.Trim().Length > 0) { xml = (string)textimport.Text; } else { System.IO.Stream stream = fileimport.FileContent; stream.Flush(); stream.Position = 0; int FileLen = fileimport.PostedFile.ContentLength; byte[] byteArr = new byte[FileLen + 1]; //= stream.ToArray stream.Read(byteArr, 0, FileLen); xml = System.Convert.ToBase64String(byteArr, 0, byteArr.Length); UTF8Encoding utf8 = new UTF8Encoding(); xml = utf8.GetString(Convert.FromBase64String(xml)); } if (xml.Trim().Length > 0 && title.Trim().Length > 0) { if (xml.IndexOf("<ArrayOfTaxonomyData ") != -1) { m_intTaxonomyId = m_refContent.ImportTaxonomyCollection(xml.Trim(), title); } else { m_intTaxonomyId = m_refContent.ImportTaxonomy(xml.Trim(), title); } string strConfig = string.Empty; if (!string.IsNullOrEmpty(Request.Form[chkConfigContent.UniqueID])) { strConfig = "0"; } if (!string.IsNullOrEmpty(Request.Form[chkConfigUser.UniqueID])) { if (string.IsNullOrEmpty(strConfig)) { strConfig = "1"; } else { strConfig = strConfig + ",1"; } } if (!string.IsNullOrEmpty(Request.Form[chkConfigGroup.UniqueID])) { if (string.IsNullOrEmpty(strConfig)) { strConfig = "2"; } else { strConfig = strConfig + ",2"; } } if (!(string.IsNullOrEmpty(strConfig))) { m_refContent.UpdateTaxonomyConfig(m_intTaxonomyId, strConfig); } } if (m_intTaxonomyId > 0) { Response.Redirect("taxonomy.aspx?reloadtrees=tax", false); } else { textimport.Text = xml; textimport.Attributes.Add("onkeypress", "ClearErr();"); textimport.Focus(); } } else { if (m_strPageAction == "export") { Response.Clear(); Response.Charset = ""; Response.ContentType = "text/xml"; if (!String.IsNullOrEmpty(Request.QueryString["taxonomyid"])) { m_intTaxonomyId = Convert.ToInt64(Request.QueryString["taxonomyid"]); } TaxonomyDataCollection col = new TaxonomyDataCollection(); LanguageData[] langList = (new SiteAPI()).GetAllActiveLanguages(); foreach (LanguageData langitem in langList) { taxonomy_request_data = new TaxonomyRequest(); taxonomy_request_data.TaxonomyId = m_intTaxonomyId; taxonomy_request_data.TaxonomyLanguage = langitem.Id; taxonomy_request_data.Depth = -1; taxonomy_request_data.IncludeItems = false; taxonomy_request_data.ReadCount = false; TaxonomyData data = m_refContent.LoadTaxonomy(ref taxonomy_request_data); if (data != null) { col.Add(data); } } string returnXml = (string)(EkXml.Serialize(typeof(TaxonomyDataCollection), col)); XmlDocument doc; try { doc = new XmlDocument(); doc.LoadXml(returnXml); string[] removablenode = new string[] { "TaxonomyParentId", "TaxonomyLevel", "TaxonomyPath", "TaxonomyCreatedDate", "TaxonomyItemCount", "TaxonomyHasChildren", "TemplateId", "TemplateName", "TemplateInherited", "TemplateInheritedFrom", "TaxonomyType", "Visible", "TaxonomyImage", "TaxonomyItems", "CategoryUrl", "FolderId" }; XmlNodeList nodelist = doc.GetElementsByTagName("TaxonomyData"); for (int i = 0; i <= nodelist.Count - 1; i++) { XmlNode node = nodelist[i]; for (int j = 0; j <= removablenode.Length - 1; j++) { XmlNode n = node.SelectSingleNode(removablenode[j]); try { n.ParentNode.RemoveChild(n); } catch (Exception) { } } } returnXml = doc.InnerXml; } catch (Exception) { } Response.Write(returnXml); Response.AddHeader("content-disposition", "attachment; filename=taxonomy_" + m_intTaxonomyId + ".xml"); } ViewImportToolBar(); } } } catch (Exception ex) { Response.Redirect((string)("reterror.aspx?info=" + EkFunctions.UrlEncode(ex.Message + ".") + "&LangType=" + TaxonomyLanguage), false); } }
protected void Page_Load(object sender, EventArgs e) { RegisterResources(); // TODO: Ross - Not sure if this is the best place to put them string imagesPath = "images/"; // this.SkinControlsPath + "ImageTool/"; btnCropImage.ImageUrl = imagesPath + "cropImage.gif"; btnResizeImage.ImageUrl = imagesPath + "fileResize.gif"; btnTextImage.ImageUrl = imagesPath + "addText.gif"; btnRotateImage.ImageUrl = imagesPath + "rotateImage.gif"; btnBrightImage.ImageUrl = imagesPath + "brightnessChange.gif"; btnUndoImage.ImageUrl = imagesPath + "undo.gif"; btnRedoImage.ImageUrl = imagesPath + "redo.gif"; // no support for undo/redo in 7.x..only 8.0 btnUndoImage.Visible = false; btnRedoImage.Visible = false; // set captions m_refMsg = m_apiCommon.EkMsgRef; btnSave.Alt = m_refMsg.GetMessage("alt imagetool save"); btnCancel.ToolTip = m_refMsg.GetMessage("alt imagetool cancel"); btnCropImage.ToolTip = m_refMsg.GetMessage("alt imagetool crop"); btnResizeImage.ToolTip = m_refMsg.GetMessage("alt imagetool resize"); btnTextImage.ToolTip = m_refMsg.GetMessage("alt imagetool text"); btnRotateImage.ToolTip = m_refMsg.GetMessage("alt imagetool rotate"); btnBrightImage.ToolTip = m_refMsg.GetMessage("alt imagetool brightness"); btnUndoImage.ToolTip = m_refMsg.GetMessage("alt imagetool undo"); btnRedoImage.ToolTip = m_refMsg.GetMessage("alt imagetool redo"); // set resize labels lblImageDimensions.Text = m_refMsg.GetMessage("lbl imagetool dimensions"); lblImageDimensions.ToolTip = lblImageDimensions.Text; lblImageFileSize.Text = m_refMsg.GetMessage("lbl imagetool filesize"); lblImageFileSize.ToolTip = lblImageFileSize.Text; lblImageResizeWidth.Text = m_refMsg.GetMessage("lbl imagetool resize width"); lblImageResizeWidth.ToolTip = lblImageResizeWidth.Text; lblImageResizeHeight.Text = m_refMsg.GetMessage("lbl imagetool resize height"); lblImageResizeHeight.ToolTip = lblImageResizeHeight.Text; lblImageResizeAspect.Text = m_refMsg.GetMessage("lbl imagetool resize aspect"); lblImageResizeAspect.ToolTip = lblImageResizeAspect.Text; btnDoImageResize.Text = m_refMsg.GetMessage("lbl btn imagetool resize"); btnDoImageResize.ToolTip = btnDoImageResize.Text; // set crop labels litCropHelpTitle.Text = m_refMsg.GetMessage("lit imagetool crop help title"); litCropHelpDescription.Text = m_refMsg.GetMessage("lit imagetool crop help description"); btnDoImageCrop.Value = m_refMsg.GetMessage("lbl btn imagetool crop"); // set text labels litTextHelpTitle.Text = m_refMsg.GetMessage("lit imagetool text help title"); litTextHelpDescription.Text = m_refMsg.GetMessage("lit imagetool text help description"); btnDoImageText.Value = m_refMsg.GetMessage("lbl btn imagetool text"); // set rotate labels lblRotateHelp.Text = m_refMsg.GetMessage("lbl imagetool rotate help"); btnFinishImageRotate.Value = m_refMsg.GetMessage("lbl btn imagetool rotate"); // set brightness labels lblBrightnessHelp.Text = m_refMsg.GetMessage("lbl imagetool brightness help"); btnFinishImageBrightness.Value = m_refMsg.GetMessage("lbl btn imagetool brightness"); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Session["EkDavSessionVal"] = null; } jsMetaUrl.Text = ""; _messageHelper = contentAPI.EkMsgRef; if (!Ektron.Site.SiteData.Current.User.IsLoggedIn) { Response.Redirect(contentAPI.ApplicationPath + "reterror.aspx?info=" + Server.UrlEncode(_messageHelper.GetMessage("msg login cms user")), false); return; } RegisterResources(); //set help link aHelp.HRef = "#Help"; aHelp.Attributes.Add("onclick", "window.open('" + contentAPI.fetchhelpLink("add_assets") + "', '', 'width=800,height=500,resizable=yes,toolbar=no,scrollbars=yes,location=no,directories=no,status=no,menubar=no,copyhistory=no');return false;"); ExplorerDragDrop dropuploader = new ExplorerDragDrop(); if (Request.QueryString["mode"] == null || Request.QueryString["mode"] == "0") { if (Request.QueryString["addforlang"] == null || Request.QueryString["addforlang"] == "0") { if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { _folderID = Convert.ToInt64(Request.QueryString["id"]); dropuploader.FolderID = _folderID; } else { if (Request.QueryString["folder_id"] != null && Request.QueryString["folder_id"] != "") _folderID = Convert.ToInt64(Request.QueryString["folder_id"]); else _folderID = Convert.ToInt64(Request.QueryString["mode_id"]); dropuploader.FolderID = _folderID; } } else { if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") dropuploader.AssetID = Request.QueryString["id"]; else dropuploader.AssetID = Request.QueryString["mode_id"]; if (((Request.QueryString["lang_id"] != null) && Microsoft.VisualBasic.Information.IsNumeric(Request.QueryString["lang_id"]) && (0 < Convert.ToInt32(Request.QueryString["lang_id"])))) { _contentLanguage = Convert.ToInt32(Request.QueryString["lang_id"]); dropuploader.ContentLanguage = _contentLanguage; } _folderID = Convert.ToInt64(Request.QueryString["folder_id"]); dropuploader.FolderID = _folderID; } } else { if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { dropuploader.AssetID = Request.QueryString["id"]; } else { dropuploader.AssetID = Request.QueryString["mode_id"]; } _folderID = Convert.ToInt64(Request.QueryString["folder_id"]); dropuploader.FolderID = _folderID; } if (Request.QueryString["lang_id"] != null && Request.QueryString["lang_id"] != "") { _contentLanguage = Convert.ToInt32(Request.QueryString["lang_id"]); dropuploader.ContentLanguage = _contentLanguage; } if (Request.QueryString["TaxonomyId"] != null && Request.QueryString["TaxonomyId"] != "") { dropuploader.TaxonomyId = Convert.ToInt64(Request.QueryString["TaxonomyId"]); _taxonomyIdList = Request.QueryString["TaxonomyId"].ToString(); } this.isImage.Value = "0"; if (Request.QueryString["isimage"] != null && Request.QueryString["isimage"] != "") { dropuploader.IsImage = Convert.ToInt32(Request.QueryString["isimage"]); if (dropuploader.IsImage == 1) this.isImage.Value = "1"; } if (Request.QueryString["overrideextension"] != null && Request.QueryString["overrideextension"] != "") { dropuploader.OverrideExtension = Request.QueryString["overrideextension"]; } if (Request.QueryString["hidecancel"] != null && Request.QueryString["hidecancel"] == "true") { btnCancel.Visible = false; } if (Request.QueryString["isimagegallery"] != null && Request.QueryString["isimagegallery"] == "true") { _isImageGallery = true; } if (contentAPI.EkContentRef.DoesFolderRequireMetadataOrTaxonomy(_folderID, _contentLanguage)) { isMetadataOrTaxonomyRequired = true; } isUrlAliasRequired = false; fdTmp = this.contentAPI.EkContentRef.GetFolderById(_folderID); Ektron.Cms.UrlAliasing.UrlAliasSettingsApi m_urlAliasSettings = new Ektron.Cms.UrlAliasing.UrlAliasSettingsApi(); if (m_urlAliasSettings.IsManualAliasEnabled) { if (fdTmp.AliasRequired) { isUrlAliasRequired = true; } } //Hide Multiple and Dragdrop if (Request.QueryString["hideMultiple"] != null && Request.QueryString["hideMultiple"] == "true") { hideMultiple = true; } //Force the extension to be same if (Request.QueryString["forceExtension"] != null && Request.QueryString["forceExtension"] == "true") { forceExtension.Value = "true"; oldfilename.Value = GetOldFileName(Convert.ToInt64(Request.QueryString["AssetID"])); //AssetID= ContentID } //If the browser if firefox, showing the drag drop tab if (Request.Browser.Type.IndexOf("Firefox") != -1) { //If updatemode of assetcontrol, do not display drag and drop tab. if ((Request.QueryString["mode"] == null || (Request.QueryString["mode"] != null && Request.QueryString["mode"] != "1")) && !hideMultiple) { liDragDrop.Visible = true; tabDragDrop.Visible = true; tabDragDrop.Controls.Add(dropuploader); } } assetcontrolupdate.Value = ""; //If updatemode, doesn't make sense to display multiple dms as one can only select one file. if ((Request.QueryString["mode"] != null && Request.QueryString["mode"] == "1") ) { liMultipleDMS.Visible = false; tabMultipleDMS.Visible = false; assetcontrolupdate.Value = "update"; long id = 0; Int64.TryParse(dropuploader.AssetID, out id); oldfilename.Value = GetOldFileName(id); } else if(hideMultiple) { liMultipleDMS.Visible = false; tabMultipleDMS.Visible = false; } bool _useSSL = Ektron.Cms.Common.EkFunctions.GetConfigBoolean("ek_UseOffloadingSSL", false); string _scheme = string.Empty; if (_useSSL) _scheme = "https"; else _scheme = Page.Request.Url.Scheme; NextUsing.Value = _scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + contentAPI.ApplicationPath + "content.aspx"; content_id.Value = "-1"; content_folder.Value = _folderID.ToString(); content_language.Value = _contentLanguage.ToString(); content_teaser.Value = FillImageGalleryDescription(); requireMetaTaxonomy.Value = isMetadataOrTaxonomyRequired.ToString(); taxonomyselectedtree.Value = _taxonomyIdList.ToString(); string filetypes = ""; if (this.isImage.Value == "1") { string[] AllowedFileTypes = null; if (DocumentManagerData.Instance.FileTypes.Length > 0) { AllowedFileTypes = DocumentManagerData.Instance.FileTypes.Split(','); if (AllowedFileTypes != null && AllowedFileTypes.Length > 0) { foreach (string filetype in AllowedFileTypes) { if (EkFunctions.IsImage(filetype.Trim().Replace("*", ""))) { if (filetypes.Length > 0) filetypes += "," + filetype; else filetypes = filetype; } } } } } else filetypes = DocumentManagerData.Instance.FileTypes; HtmlGenericControl linebreak = new HtmlGenericControl("div"); linebreak.InnerHtml += "<div id='divFileTypes'> " + _messageHelper.GetMessage("lbl valid file types") + "<p class='dmsSupportedFileTypes'>" + filetypes + "</p></div>"; linebreak.InnerHtml += "<div id=idMultipleView style='display:inline'>"; linebreak.InnerHtml += "<script type=\"text/javascript\">" + Environment.NewLine; linebreak.InnerHtml += " AC_AX_RunContent('id','idUploadCtl','name','idUploadCtl','classid','CLSID:07B06095-5687-4d13-9E32-12B4259C9813','width','100%','height','350px');" + Environment.NewLine; linebreak.InnerHtml += Environment.NewLine + " </script> </div> " + Environment.NewLine; //Checkif ManualAlias is required by this folder if (isUrlAliasRequired) { jsfolderRequireManualAlias.Text = "true"; jsManualAliasAlert.Text = _messageHelper.GetMessage("js:url aliasing is required dms mupload");// "Url aliasing is required for this folder. Non-image assets will be uploaded but unpublished."; } if (Request.Cookies[DMSCookieName]!=null && !string.IsNullOrEmpty(Request.Cookies[DMSCookieName].Value)) { pnl_versionToggle.Visible = pnl_DMSMultiUpload.Visible = true; pnl_OfficeVerSelector.Visible = false; if (Request.Cookies[DMSCookieName].Value == "2010") { ExplorerDragDrop edd = new ExplorerDragDrop(); if (Request.QueryString["TaxonomyId"] != null && Request.QueryString["TaxonomyId"] != "") { edd.TaxonomyId = Convert.ToInt64(Request.QueryString["TaxonomyId"]); } edd.ContentLanguage = this._contentLanguage; destination.Value = edd.GetFolderPath(_folderID).Replace(Page.Request.Url.GetLeftPart(UriPartial.Authority), ""); putopts.Value = "false"; btnMUpload.OnClientClick = "return MultipleDocumentUpload(0);"; lbtn_toggleVersion.Attributes.Add("onclick", string.Format(_messageHelper.GetMessage("js office version toggle confirm format"), _messageHelper.GetMessage("li text office 2010 name"))); lbtn_toggleVersion.Text = _messageHelper.GetMessage("lbtn dms switch office version")+"(Office 2010 selected)"; } else { if (this.isImage.Value == "1") { destination.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + contentAPI.ApplicationPath + "processMultiupload.aspx?close=true&isimage=" + this.isImage.Value+"&searc="+fdTmp.IscontentSearchable; PostURL.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + contentAPI.ApplicationPath + "processMultiupload.aspx?close=true&isimage=" + this.isImage.Value + "&searc=" + fdTmp.IscontentSearchable; } else { destination.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + contentAPI.ApplicationPath + "processMultiupload.aspx?close=true&searc="+fdTmp.IscontentSearchable; PostURL.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + contentAPI.ApplicationPath + "processMultiupload.aspx?close=true&searc=" + fdTmp.IscontentSearchable; } putopts.Value = "true"; btnMUpload.OnClientClick = "MultipleDocumentUpload(1);"; lbtn_toggleVersion.Attributes.Add("onclick", string.Format(_messageHelper.GetMessage("js office version toggle confirm format"), _messageHelper.GetMessage("li text other office ver name"))); lbtn_toggleVersion.Text = _messageHelper.GetMessage("lbtn dms switch office version")+"(Office 2003/2007 selected)"; } tabMultipleDMS.Controls.Add(linebreak); } else { pnl_versionToggle.Visible = pnl_DMSMultiUpload.Visible = false; pnl_OfficeVerSelector.Visible = true; } GenerateStrings(); if (Request.QueryString["showtab"] != null && Request.QueryString["showtab"] == "multiple") { ltrNoUpload.Text = _messageHelper.GetMessage("lbl upload file"); ClientScript.RegisterStartupScript(this.GetType(), "selectTab", "var ddTabs = $ektron('#DMStabs').tabs({select: function(event, ui){ReSizeContainer(ui);}}); ddTabs.tabs('select', 1);", true); } }
protected void Page_Init(object sender, EventArgs e) { requestInformation = ObjectFactory.GetRequestInfoProvider().GetRequestInformation(); m_refMsg = new EkMessageHelper(requestInformation); appPath = requestInformation.ApplicationPath; columnDisplay.ItemDataBound += new RepeaterItemEventHandler(columnDisplay_ItemDataBound); (Page as PageBuilder).PageUpdated += new EventHandler(Page_Updated); }
protected void Page_Load(object sender, System.EventArgs e) { m_refMsg = m_refContentApi.EkMsgRef; AppImgPath = m_refContentApi.AppImgPath; ltr_Title.Text = m_refMsg.GetMessage("lbl cms business rulesets"); RegisterResources(); try { Utilities.ValidateUserLogin(); if (m_refContentApi.RequestInformationRef.IsMembershipUser == 1 || m_refContentApi.RequestInformationRef.UserId == 0) { Response.Redirect((string)("../reterror.aspx?info=" + m_refMsg.GetMessage("msg login cms user")), false); return; } if (!string.IsNullOrEmpty(Request.QueryString["action"])) { m_sPageAction = (string)(Request.QueryString["action"].ToLower()); } else { m_sPageAction = ""; } if (!string.IsNullOrEmpty(Request.QueryString["id"])) { m_iRuleID = Convert.ToInt64(Request.QueryString["id"]); } if (!string.IsNullOrEmpty(Request.QueryString["rulesetid"])) { m_iID = Convert.ToInt64(Request.QueryString["rulesetid"].ToString()); } m_rulesUI = new Ektron.Cms.RulesEngine.UI(m_refContentApi.RequestInformationRef); m_acontem = m_rulesUI.GetAllConditionTemplates(); m_aacttem = m_rulesUI.GetAllActionTemplates(); m_tpacondition = m_rulesUI.GetAllConditionTemplateParams(); m_tpaaction = m_rulesUI.GetAllActionTemplateParams(); OutputJS(); ShowHidden(); if (m_sPageAction == "edit") { m_aruleparam = m_rulesUI.GetRuleParams(m_iRuleID); m_rulesengineRule = new Ektron.Cms.RulesEngine.Rule(m_refContentApi.RequestInformationRef); m_rulesengineRule.load(m_iRuleID); ruleNameText.Value = m_rulesengineRule.RuleName; cmswizard ucWizard; ucWizard = (cmswizard)(LoadControl("../controls/wizard/wizard.ascx")); ucWizard.AllowSelect = true; ucWizard.ID = "ProgressSteps"; pnlwizard.Controls.Add(ucWizard); BuildTemplateJS("edit"); ShowRuleToolBar(); } else if (m_sPageAction == "view") { m_aruleparam = m_rulesUI.GetRuleParams(m_iRuleID); m_rulesengineRule = new Ektron.Cms.RulesEngine.Rule(m_refContentApi.RequestInformationRef); m_rulesengineRule.load(m_iRuleID); ruleNameText.Value = m_rulesengineRule.RuleName; BuildTemplateJS("view"); ShowRuleToolBar(); } else if (m_sPageAction == "add") { BuildTemplateJS("add"); cmswizard ucWizard; ucWizard = (cmswizard)(LoadControl("../controls/wizard/wizard.ascx")); ucWizard.AllowSelect = false; // do not allow skip for add ucWizard.ID = "ProgressSteps"; pnlwizard.Controls.Add(ucWizard); ShowRuleToolBar(); } else if (m_sPageAction == "process") { BuildTemplateJS("add"); ProcessHandler(); } } catch (Exception ex) { //Response.Write(ex.Message & ex.StackTrace) Utilities.ShowError(ex.Message); } }
protected void Page_Init(object sender, EventArgs e) { CommonApi api = new CommonApi(); _sitepath = api.SitePath; _appPath = api.AppPath; _userLang = api.UserLanguage.ToString(); SiteAPI refSiteApi = new SiteAPI(); _refMsg = refSiteApi.EkMsgRef; _host = Ektron.Cms.Widget.WidgetHost.GetHost(this); _host.Title = "Trends Widget"; _host.Edit += new EditDelegate(EditEvent); _host.Maximize += new MaximizeDelegate(delegate() { Visible = true; }); _host.Minimize += new MinimizeDelegate(delegate() { Visible = false; }); _host.Create += new CreateDelegate(delegate() { EditEvent(""); }); PreRender += new EventHandler(delegate(object PreRenderSender, EventArgs Evt) { SetOutput(); }); string myPath = string.Empty; if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["ek_helpDomainPrefix"])) { string helpDomain = ConfigurationManager.AppSettings["ek_helpDomainPrefix"]; if ((helpDomain.IndexOf("[ek_cmsversion]") > 1)) { myPath = helpDomain.Replace("[ek_cmsversion]", new CommonApi().RequestInformationRef.Version); } else { myPath = ConfigurationManager.AppSettings["ek_helpDomainPrefix"]; } } else { myPath = _appPath + "/help"; } _host.HelpFile = myPath + "/Main_Import_file/Trends_Widget.htm"; LocalizeMarkup(); UpdateMarkup(); ViewSet.SetActiveView(View); }
protected void Page_Load(object sender, EventArgs e) { _msgRef = new Ektron.Cms.Common.EkMessageHelper(_ContentAPI.RequestInformationRef); _refContentObject = _ContentAPI.EkContentRef; if (!(_CommonApi.IsAdmin() || (_refContentObject.IsARoleMember((long)Ektron.Cms.Common.EkEnumeration.CmsRoleIds.MessageBoardAdmin, _CommonApi.RequestInformationRef.UserId, false)))) { Utilities.ShowError(_msgRef.GetMessage("User not authorized")); } try { imagePath = _ContentAPI.AppPath + "images/ui/icons/"; RegisterResources(); SetServerSizeJSVariables(); if (!Utilities.ValidateUserLogin()) return; if (Request.QueryString["action"] != null || Request.QueryString["action"] != String.Empty) { _PageAction = Request.QueryString["action"]; } if(Request.Form[isPostData.UniqueID] != "") { switch (_PageAction) { case "viewmessage": msgId = Convert.ToInt64(Request.QueryString["messageid"]); objectType = Request.QueryString["objecttype"]; objectId = Convert.ToInt64(Request.QueryString["objectId"]); DisplayUnApprovedMessage(msgId, objectId, objectType); break; case "approvemessage": ApproveSelectedMessages(); break; case "deletemessage": DeleteSelectedMessages(); break; default: Display_ViewAllUnApprovedMessages(selVal.Value); ViewMessageBoardToolBar(); break; } } isPostData.Value = "true"; } catch (Exception ex) { Response.Redirect("../reterror.aspx?info=" + EkFunctions.UrlEncode(ex.Message), false); } }