コード例 #1
0
    protected void Page_Load(object sender, System.EventArgs e)
    {
        Ektron.Cms.Content.EkContent objContentRef;
        objContentRef = _refContentApi.EkContentRef;

        RegisterResources();
        agentDisabled.Visible = false;
        ektronPageHeader.Visible = true;
        msgHelper = _refContentApi.EkMsgRef;

        this.ParseCurrentPageNumber();

        //Licensing Check
        if (!Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(_refContentApi.RequestInformationRef, Ektron.Cms.DataIO.LicenseManager.Feature.SocialNetworking, false))
        {
            Utilities.ShowError(_refContentApi.EkMsgRef.GetMessage("feature locked error"));
            return;
        }

        if (!(_refCommonApi.IsAdmin() || objContentRef.IsARoleMember((long)Ektron.Cms.Common.EkEnumeration.CmsRoleIds.CommunityAdmin, _refCommonApi.RequestInformationRef.UserId, false)))
        {
            Utilities.ShowError(_refContentApi.EkMsgRef.GetMessage("User not authorized"));
            return;
        }
        if (!String.IsNullOrEmpty(Request.QueryString["mode"]))
        {
            pageMode = Request.QueryString["mode"];
        }

        DisplayData();
    }
コード例 #2
0
ファイル: DeclineContent.aspx.cs プロジェクト: jaytem/minGit
    protected void btnDecline_Click(object sender, System.EventArgs e)
    {
        string comment = "";
        Ektron.Cms.UI.CommonUI.ApplicationAPI appUI = new Ektron.Cms.UI.CommonUI.ApplicationAPI();
        m_refMsg = appUI.EkMsgRef;

        RegExpValidator.ErrorMessage = m_refMsg.GetMessage("content size exceeded");
        //RegExpValidator.ValidationExpression = Utilities.BuildRegexToCheckMaxLength(65000)
        RegExpValidator.Validate();
        if (RegExpValidator.IsValid)
        {
            if (DeclineText.Content.Trim().Length > 0)
            {
                comment = (string)("&comment=" + EkFunctions.UrlEncode((string)(DeclineText.Content.Trim().Replace("<p>", "").Replace("</p>", ""))));
            }
            if(comment.Length>255)
            {
                RegExpValidator.IsValid=false;
         	            ViewToolBar();
            }
            else
            {
                Response.Redirect(content_api.ApplicationPath + "content.aspx?id=" + hdnContentId.Value + "&fldid=" + hdnFolderId.Value + "&action=declinecontent&LangType=" + hdnLangType.Value + comment);
            }
        }
        else
        {
            ViewToolBar();
        }
    }
コード例 #3
0
ファイル: Menu.aspx.cs プロジェクト: jaytem/minGit
 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();
         //TODO: Ross - Not sure which role to check
         if ((CurrentUserId == 0) || (Convert.ToBoolean(m_refCommon.RequestInformationRef.IsMembershipUser) && m_refContent.IsARoleMember((long)Ektron.Cms.Common.EkEnumeration.CmsRoleIds.TaxonomyAdministrator, CurrentUserId, false) == false))
         {
             Response.Redirect("login.aspx?fromLnkPg=1", false);
             return;
         }
         else
         {
             AppImgPath = m_refCommon.AppImgPath;
             EnableMultilingual = m_refCommon.EnableMultilingual;
             if ((Request.QueryString["action"] != null) && Request.QueryString["action"] != "")
             {
                 m_strPageAction = Request.QueryString["action"].ToLower();
             }
             Utilities.SetLanguage(m_refCommon);
             MenuLanguage = m_refCommon.ContentLanguage;
             switch (m_strPageAction)
             {
                 case "deleted":
                     Message.Text = m_refMsg.GetMessage("lbl menu") + " \'" + Request.QueryString["title"] + "\' " + m_refMsg.GetMessage("lbl deleted");
                     Message.Text = Message.Text + "<script language=\"javascript\">" + "\r\n";
                     Message.Text = Message.Text + "top.refreshMenuAccordion(" + MenuLanguage + ");" + "\r\n";
                     Message.Text = Message.Text + "</script>" + "\r\n";
                     break;
                 case "viewcontent":
                 case "removeitems":
                     Control m_vi;
                     m_vi = (Control)(LoadControl("controls/menu/viewitems.ascx"));
                     m_vi.ID = "menu";
                     DataHolder.Controls.Add(m_vi);
                     break;
                 case "viewmenu":
                     Control m_va;
                     m_va = (Control)(LoadControl("controls/menu/viewmenu.ascx"));
                     m_va.ID = "menuprops";
                     DataHolder.Controls.Add(m_va);
                     break;
             }
         }
     }
     catch (System.Threading.ThreadAbortException)
     {
         //Do nothing
     }
     catch (Exception ex)
     {
         Response.Redirect((string)("reterror.aspx?info=" + EkFunctions.UrlEncode(ex.Message + ".") + "&LangType=" + MenuLanguage), false);
     }
 }
コード例 #4
0
ファイル: cmsform.aspx.cs プロジェクト: jaytem/minGit
    protected void Page_Init(object sender, System.EventArgs e)
    {
        // resource text string tokens
            m_refMsg = m_refContentApi.EkMsgRef;

            string closeDialogText = (string) (m_refMsg.GetMessage("close this dialog"));
            string cancelText = (string) (m_refMsg.GetMessage("btn cancel"));

            // assign resource text string values
            btnConfirmOk.Text = m_refMsg.GetMessage("lbl ok");
            btnConfirmOk.NavigateUrl = "#" + m_refMsg.GetMessage("lbl ok");
            btnConfirmCancel.Text = cancelText;
            btnConfirmCancel.NavigateUrl = "#" + cancelText;
            btnCloseSyncStatus.Text = m_refMsg.GetMessage("close title");
            btnCloseSyncStatus.NavigateUrl = "#" + m_refMsg.GetMessage("close title");
            btnStartSync.Text = m_refMsg.GetMessage("btn sync now");

            closeDialogLink.Text = "<span class=\"ui-icon ui-icon-closethick\">" + m_refMsg.GetMessage("close title") + "</span>";
            closeDialogLink.NavigateUrl = "#" + System.Text.RegularExpressions.Regex.Replace((string) (m_refMsg.GetMessage("close title")), "\\s+", "");
            closeDialogLink.ToolTip = closeDialogText;
            closeDialogLink2.Text = closeDialogLink.Text;
            closeDialogLink2.NavigateUrl = closeDialogLink.NavigateUrl;
            closeDialogLink2.ToolTip = closeDialogText;
            closeDialogLink3.Text = closeDialogLink.Text;
            closeDialogLink3.NavigateUrl = closeDialogLink.NavigateUrl;
            closeDialogLink3.ToolTip = closeDialogText;

            lblSyncStatus.Text = string.Format(m_refMsg.GetMessage("lbl sync status"), " <span class=\"statusHeaderProfileId\"></span>");

            m_jsResources = (SyncResources) (LoadControl("sync/SyncResources.ascx"));
            m_jsResources.ID = "jsResources";
            sync_jsResourcesPlaceholder.Controls.Add(m_jsResources);
    }
コード例 #5
0
ファイル: RuleEditor.ascx.cs プロジェクト: jaytem/minGit
    protected void Page_Init(object sender, EventArgs e)
    {
        Page.ClientScript.GetPostBackEventReference(this, string.Empty);

            CommonApi commonApi = new CommonApi();
            m_refMsg = commonApi.EkMsgRef;
            string sitepath = commonApi.SitePath;

            Package ruleEditorUI = new Package()
            {
                Components = new List<Ektron.Cms.Framework.UI.Component>
                {
                    // JS
                    Packages.Ektron.StringObject,
                    Packages.Ektron.JSON,
                    JavaScript.Create(Path.Combine(this.TemplateSourceDirectory, @"js\RuleEditor.js").Replace(@"\", "/")),
                    JavaScript.Create(Path.Combine(this.TemplateSourceDirectory, @"js\ektron.autogrow.js").Replace(@"\", "/")),
                    JavaScript.Create(Path.Combine(this.TemplateSourceDirectory, @"js\ektron.jeditable.js").Replace(@"\", "/")),
                    JavaScript.Create(Path.Combine(this.TemplateSourceDirectory, @"js\ektron.dropdown.js").Replace(@"\", "/")),

                    // Css
                    Packages.jQuery.jQueryUI.ThemeRoller,
                    Ektron.Cms.Framework.UI.Css.Create(Path.Combine(this.TemplateSourceDirectory, @"css\RuleEditor.css").Replace(@"\", "/"))
                }
            };
            ruleEditorUI.Register(this);

            JavaScript.RegisterJavaScriptBlock(this, string.Format("Ektron.RuleEditor.init('{0}', '{1}');", UniqueID, container.ClientID), false);
    }
コード例 #6
0
ファイル: MenuActions.aspx.cs プロジェクト: jaytem/minGit
 public Workarea_MenuActions()
 {
     m_CommonApi = new CommonApi();
     m_ContentApi = new ContentAPI();
     m_EkContent = m_ContentApi.EkContentRef;
     m_refMsg = m_ContentApi.EkMsgRef;
 }
コード例 #7
0
 protected CatalogEntry_PageFunctions_Js()
 {
     _ContentApi = new ContentAPI();
     _MessageHelper = _ContentApi.EkMsgRef;
     _JsLibrary = new workareajavascript();
     _ApplicationPath = _ContentApi.ApplicationPath.TrimEnd(new char[] { '/' });
 }
コード例 #8
0
ファイル: EmailHelper.cs プロジェクト: femiosinowo/sssadl
 public EmailHelper()
 {
     CommonApi objCommonApi = new CommonApi();
     gtMessEmail = objCommonApi.EkMsgRef;
     AppImgPath = objCommonApi.AppImgPath;
     AppPath = objCommonApi.AppPath;
 }
コード例 #9
0
ファイル: viewxslt.aspx.cs プロジェクト: jaytem/minGit
 private void Page_Load(System.Object sender, System.EventArgs e)
 {
     XmlConfigData xml_config_data;
         try
         {
             m_refMsg = m_refContentApi.EkMsgRef;
             Utilities.ValidateUserLogin();
             StyleSheetJS.Text = m_refStyle.GetClientScript();
             RegisterResources();
             if (Request.QueryString["id"] != null)
             {
                 m_intId = Convert.ToInt64(Request.QueryString["id"]);
             }
             AppImgPath = m_refContentApi.AppImgPath;
             ViewXsltToolBar();
             xml_config_data = m_refContentApi.GetXmlConfiguration(m_intId);
             if (!(xml_config_data == null))
             {
                 display_xslt.Value = xml_config_data.PackageDisplayXslt;
             }
         }
         catch (Exception ex)
         {
             Utilities.ShowError(ex.Message);
         }
 }
コード例 #10
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     msgHelper = _refContentApi.EkMsgRef;
         Ektron.Cms.Content.EkContent objContentRef;
         objContentRef = _refContentApi.EkContentRef;
         string pageMode;
         string strgroupId;
         long groupId;
         //Licensing Check
         if (! Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(_refContentApi.RequestInformationRef, Ektron.Cms.DataIO.LicenseManager.Feature.SocialNetworking, false))
         {
             Utilities.ShowError(_refContentApi.EkMsgRef.GetMessage("feature locked error"));
             return;
         }
         //Logged in user check
         if (!(_refCommonApi.IsAdmin() || objContentRef.IsARoleMember(Convert.ToInt64( Ektron.Cms.Common.EkEnumeration.CmsRoleIds.CommunityAdmin), _refCommonApi.RequestInformationRef.UserId, false) || _refCommonApi.RequestInformationRef.UserId > 0))
         {
             Utilities.ShowError(_refContentApi.EkMsgRef.GetMessage("User not authorized"));
             return;
         }
         //RegisterResources()
         agentDisabled.Visible = false;
         pageMode = Request.QueryString["mode"];
         strgroupId = Request.QueryString["id"];
         long.TryParse(strgroupId, out groupId);
         string ctrlname = Page.Request.Params["__EVENTTARGET"];
         if (Page.IsPostBack)
         {
             EditGroupsSettings(groupId);
         }
         else
         {
             DisplayGroupSettings(groupId);
         }
 }
コード例 #11
0
    protected void Page_Load(object sender, System.EventArgs e)
    {
        msgHelper = _refCommonApi.EkMsgRef;
        string pageAction;
        Ektron.Cms.Content.EkContent objContentRef;
        objContentRef = _refContentApi.EkContentRef;
        RegisterResources();
        SetServerJSVariables();
        //Licensing For 7.6
        if (!Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(_refContentApi.RequestInformationRef, Ektron.Cms.DataIO.LicenseManager.Feature.UrlAliasing, false))
        {
            Utilities.ShowError(_refContentApi.EkMsgRef.GetMessage("feature locked error"));
            return;
        }
        if (!(_refCommonApi.IsAdmin() || objContentRef.IsARoleMember((long)Ektron.Cms.Common.EkEnumeration.CmsRoleIds.UrlAliasingAdmin, _refCommonApi.RequestInformationRef.UserId, false)))
        {
            Utilities.ShowError(_refContentApi.EkMsgRef.GetMessage("User not authorized"));
            return;
        }

        _manualAliasAPI = new Ektron.Cms.UrlAliasing.UrlAliasManualApi();

        //Labels got from resource file
        lblaliasname.Text = msgHelper.GetMessage("lbl alias");
        lblContentBlk = msgHelper.GetMessage("content block label");
        lblTitle.Text = msgHelper.GetMessage("generic title");
        lblLink.Text = msgHelper.GetMessage("lbl quick link") + ":";
        lblTemplates.Text = msgHelper.GetMessage("lbl quick link") + ":";
        lblPrimary.Text = msgHelper.GetMessage("lbl primary");
        lblActive.Text = msgHelper.GetMessage("active label");
        lblAddVar.Text = msgHelper.GetMessage("lbl alias additional variables");
        lblQueryStringAction.Text = msgHelper.GetMessage("lbl querstringaction");
        lblaliasname.ToolTip = lblaliasname.Text;
        lblTitle.ToolTip = lblTitle.Text;
        lblLink.ToolTip = lblLink.Text;
        lblTemplates.ToolTip = lblTemplates.Text;
        lblPrimary.ToolTip = lblPrimary.Text;
        lblActive.ToolTip = lblActive.Text;
        lblAddVar.ToolTip = lblAddVar.Text;
        lblQueryStringAction.ToolTip = lblQueryStringAction.Text;
        pageAction = Request.QueryString["action"];
        siteid = Request.QueryString["fId"];
        workareaDir = _refContentApi.RequestInformationRef.WorkAreaDir;
        if ((string)(pageAction) == "addalias")
        {
            DisplayAdd();
        }
        else if ((string)(pageAction) == "view")
        {
            DisplayView();
        }
        else if ((string)(pageAction) == "editalias")
        {
            DisplayEdit();
        }
        System.Collections.Generic.List<string> ext_alias = null;
        ext_alias = _manualAliasAPI.GetFileExtensions();
        listAliasExtension.DataSource = ext_alias;
        listAliasExtension.DataBind();
    }
コード例 #12
0
    protected void Page_Init(object sender, EventArgs e)
    {
        var m_refMsg = new ContentAPI().EkMsgRef;

        BackLabel.Text = m_refMsg.GetMessage("btn back");
        DeleteLabel.Text = m_refMsg.GetMessage("btn delete");

        //Register CSS
        Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaCss);
        Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaIeCss);
        Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronFixedPositionToolbarCss);
        Ektron.Cms.API.JS.RegisterJS(this, Ektron.Cms.API.JS.ManagedScript.EktronJFunctJS);

        ltrlStyleSheetJS.Text = _styleHelper.GetClientScript();

        _msgHelper = new EkMessageHelper(_contentApi.RequestInformationRef);

        Utilities.ValidateUserLogin();
        if (_contentApi.RequestInformationRef.IsMembershipUser == 1 || !_contentApi.IsARoleMember(Ektron.Cms.Common.EkEnumeration.CmsRoleIds.AdminPersonalize)) {
            Response.Redirect(_contentApi.ApplicationPath + "reterror.aspx?info=" + _contentApi.EkMsgRef.GetMessage("msg login cms user"), true);
            return;
        }

        BindToolbars();
        this.image_link_100.Attributes.Add("onclick", string.Format("return validateList('{0}');", _msgHelper.GetMessage("select target content")));
    }
コード例 #13
0
ファイル: content.aspx.cs プロジェクト: jaytem/minGit
 public content()
 {
     char[] endSlash = new char[] { '/' };
     this.ApplicationPath = m_refContentApi.ApplicationPath.TrimEnd(endSlash.ToString().ToCharArray());
     this.SitePath = m_refContentApi.SitePath.TrimEnd(endSlash.ToString().ToCharArray());
     m_refMsg = m_refContentApi.EkMsgRef;
 }
コード例 #14
0
ファイル: checkboxfield.aspx.cs プロジェクト: jaytem/minGit
        private void Page_Load(object sender, System.EventArgs e)
        {
            _ContentApi = new ContentAPI();
            _MessageHelper = _ContentApi.EkMsgRef;
            if (EkFunctions.UrlDecode(Request.RawUrl).ToLower().Contains("<script") | EkFunctions.UrlDecode(Request.RawUrl).ToLower().Contains("</script"))
            {
                Utilities.ShowError(_MessageHelper.GetMessage("invalid querstring"));
                return;
            }
            this.RegisterWorkareaCssLink();
            this.RegisterDialogCssLink();
            Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronJS);
            Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronStringJS);
            Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronXmlJS);
            Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekxbrowser.js", "ekxbrowserJS");
            Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekutil.js", "ekutilJS");
            Ektron.Cms.API.JS.RegisterJSInclude(this, "../RadWindow.js", "RadWindowJS");
            Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekformfields.js", "ekformfieldsJS");
            this.ClientScript.RegisterClientScriptBlock(this.GetType(), "InitializeRadWindow", "InitializeRadWindow();", true);

            this.Title.Text = this.GetMessage("lbl checkbox field");
            this.RadTabStrip1.Tabs[0].Text = this.GetMessage("tab general"); ;
            this.RadTabStrip1.Tabs[0].ToolTip = this.GetMessage("tab general") + " Tab"; ;
            this.RadTabStrip1.Tabs[1].Text = this.GetMessage("tab validation"); ;
            this.RadTabStrip1.Tabs[1].ToolTip = this.GetMessage("tab validation") + " Tab"; ;
            this.RadTabStrip1.Tabs[2].Text = this.GetMessage("tab advanced"); ;
            this.RadTabStrip1.Tabs[2].ToolTip = this.GetMessage("tab advanced") + " Tab"; ;
            this.lblDefVal.InnerHtml = this.GetMessage("lbl default value");
            this.lblDefValT.InnerHtml = this.GetMessage("lbl def val true");
            this.lblDefValF.InnerHtml = this.GetMessage("lbl def val false");
            this.lblCaption.InnerHtml = this.GetMessage("lbl caption c");
        }
コード例 #15
0
ファイル: viewmenu.ascx.cs プロジェクト: jaytem/minGit
    protected void Page_Load(object sender, System.EventArgs e)
    {
        m_refMsg = m_refCommon.EkMsgRef;
            AppImgPath = m_refCommon.AppImgPath;
            AppPath = m_refCommon.AppPath;
            m_strPageAction = Request.QueryString["action"];
            Utilities.SetLanguage(m_refCommon);
            MenuLanguage = m_refCommon.ContentLanguage;
            MenuId = Convert.ToInt64(Request.QueryString["menuid"]);
            if (Request.QueryString["view"] != null)
            {
                m_strViewItem = Request.QueryString["view"];
            }
            m_refContent = m_refCommon.EkContentRef;
            m_refContentApi = new ContentAPI();
            Utilities.SetLanguage(m_refContentApi);
            sitePath = m_refCommon.SitePath;

            m_strBackPage = Request.QueryString.ToString();
            // strip off refresh indicator
            if (m_strBackPage.EndsWith("&rf=1"))
            {
                // refresh is needed after we edit a submenu, but we don't want to keep refreshing if we use the same URL
                m_strBackPage = m_strBackPage.Substring(0, m_strBackPage.Length - 5);
            }

            DisplayPage();
    }
コード例 #16
0
ファイル: groupbox.aspx.cs プロジェクト: jaytem/minGit
        private void Page_Load(object sender, System.EventArgs e)
        {
            _ContentApi = new ContentAPI();
            _MessageHelper = _ContentApi.EkMsgRef;
            if (Request.RawUrl.ToLower().Contains("<script"))
            {
                Utilities.ShowError(_MessageHelper.GetMessage("invalid querstring"));
                return;
            }
            this.RegisterWorkareaCssLink();
            this.RegisterDialogCssLink();
            Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronJS);
            Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronStringJS);
            Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronXmlJS);
            Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekxbrowser.js", "ekxbrowserJS");
            Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekutil.js", "ekutilJS");
            Ektron.Cms.API.JS.RegisterJSInclude(this, "../RadWindow.js", "RadWindowJS");
            Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekformfields.js", "ekformfieldsJS");
            this.ClientScript.RegisterClientScriptBlock(this.GetType(), "InitializeRadWindow", "InitializeRadWindow();", true);

            this.Title.Text = this.GetMessage("lbl group box");
            this.RadTabStrip1.Tabs[0].Text = this.GetMessage("tab general");
            this.RadTabStrip1.Tabs[0].ToolTip = this.RadTabStrip1.Tabs[0].Text + "Tab";
            this.RadTabStrip1.Tabs[1].Text = this.GetMessage("tab advanced");
            this.RadTabStrip1.Tabs[1].ToolTip = this.RadTabStrip1.Tabs[1].Text + "Tab";
            this.RadTabStrip1.Tabs[2].Text = this.GetMessage("tab relevance");
            this.RadTabStrip1.Tabs[2].ToolTip = this.RadTabStrip1.Tabs[2].Text + "Tab";
            this.lblAppearance.InnerHtml = this.GetMessage("lbl appearance");
            this.lblNoBorder.InnerHtml = this.GetMessage("lbl no border");
            this.lblShowBorder.InnerHtml = this.GetMessage("lbl show border");
            this.lblCaption.InnerHtml = this.GetMessage("lbl caption c");
            this.txtCaption.Value = this.GetMessage("lbl fields");
            this.sEnterCaption.Text = this.GetMessage("msg enter caption");
        }
コード例 #17
0
ファイル: signature.aspx.cs プロジェクト: jaytem/minGit
    protected void Page_Load(object sender, System.EventArgs e)
    {
        m_refMsg = m_refContApi.EkMsgRef;
            Utilities.ValidateUserLogin();
            if (m_refContApi.RequestInformationRef.UserId == 0)
            {
                Response.Redirect(m_refContApi.ApplicationPath + "reterror.aspx?info=" + Server.UrlEncode(m_refMsg.GetMessage("msg login cms user")), false);
                return;
            }
            Ektron.Cms.API.JS.RegisterJS(this, Ektron.Cms.API.JS.ManagedScript.EktronJS);
            Ektron.Cms.API.JS.RegisterJS(this, Ektron.Cms.API.JS.ManagedScript.EktronStringJS);
            Ektron.Cms.API.JS.RegisterJS(this, Ektron.Cms.API.JS.ManagedScript.EktronXmlJS);

            //Setting Content Designer properties
            cdSignature.AllowScripts = true;
            cdSignature.Height = 300;
            cdSignature.Visible = true;
            cdSignature.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.Minimal;
            cdSignature.ShowHtmlMode = false;

            // Localization
            cmdOk.Value = m_refMsg.GetMessage("btn save");
            close.Value = m_refMsg.GetMessage("btn cancel");
            sSignatureTooLong.Text = m_refMsg.GetMessage("js:Please choose a shorter signature");
    }
コード例 #18
0
    protected void Page_Load(object sender, System.EventArgs e)
    {
        msgHelper = _refCommonApi.EkMsgRef;
        string pageAction;
        Ektron.Cms.Content.EkContent objContentRef;
        objContentRef = _refContentApi.EkContentRef;
        RegisterResources();
        SetServerJSVariables();

        //Licensing For 7.6
        if (!Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(_refContentApi.RequestInformationRef, Ektron.Cms.DataIO.LicenseManager.Feature.UrlAliasing, false))
        {
            Utilities.ShowError(_refContentApi.EkMsgRef.GetMessage("feature locked error"));
            return;
        }
        if (!(_refCommonApi.IsAdmin() || objContentRef.IsARoleMember((long)Ektron.Cms.Common.EkEnumeration.CmsRoleIds.UrlAliasingAdmin, _refCommonApi.RequestInformationRef.UserId, false)))
        {
            Utilities.ShowError(_refContentApi.EkMsgRef.GetMessage("User not authorized"));
            return;
        }

        _communityAliasAPI = new Ektron.Cms.UrlAliasing.UrlAliasCommunityApi();
        _manualAliasAPI = new Ektron.Cms.UrlAliasing.UrlAliasManualApi();

        pageAction = Request.QueryString["action"];
        langType = Request.QueryString["Langtype"];
        siteID = Request.QueryString["fId"];
        ddltype.Attributes.Add("onchange", "ToggleExamplePath(this);");
        lblPrimary.Text = msgHelper.GetMessage("lbl primary");
        lblActive.Text = msgHelper.GetMessage("active label");
        lblType.Text = msgHelper.GetMessage("lbl source") + " " + msgHelper.GetMessage("generic type");
        lblAliasPath.Text = msgHelper.GetMessage("lbl alias path");
        lblExt.Text = msgHelper.GetMessage("lbl extension");
        lblReplaceChar.Text = msgHelper.GetMessage("lbl rpl char");
        lblExample.Text = msgHelper.GetMessage("lbl link ex preview");
        lblQueryStringParam.Text = msgHelper.GetMessage("lbl querystringparam");
        lblPrimary.ToolTip = lblPrimary.Text;
        lblActive.ToolTip = lblActive.Text;
        lblType.ToolTip = lblType.Text;
        lblAliasPath.ToolTip = lblAliasPath.Text;
        lblExt.ToolTip = lblExt.Text;
        lblReplaceChar.ToolTip = lblReplaceChar.Text;
        lblExample.ToolTip = lblExample.Text;
        lblQueryStringParam.ToolTip = lblQueryStringParam.Text;
        primaryChkBox.Attributes.Add("onclick", "$ektron(\'#activeChkBox\')[0].checked = true;");
        _communityType = _communityAliasAPI.GetCommunityAliasTypes();
        int.TryParse(langType, out langId);
        switch (pageAction)
        {
            case "addalias":
                DisplayAdd();
                break;
            case "view":
                DisplayView();
                break;
            case "editalias":
                DisplayEdit();
                break;
        }
    }
コード例 #19
0
ファイル: xml_config.aspx.cs プロジェクト: jaytem/minGit
 private void Page_Load(System.Object sender, System.EventArgs e)
 {
     RegisterResources();
         Response.CacheControl = "no-cache";
         Response.AddHeader("Pragma", "no-cache");
         Response.Expires = -1;
         m_refContent = m_refContentApi.EkContentRef;
         m_refMsg = m_refContentApi.EkMsgRef;
         if (m_refContent.IsAllowed(0, 0, "users", "IsLoggedIn", 0) == false || m_refContent.IsAllowed(0, 0, "users", "IsAdmin", 0) == false)
         {
             if (!m_refContent.IsARoleMember(Convert.ToInt64(EkEnumeration.CmsRoleIds.AdminXmlConfig), m_refContent.RequestInformation.UserId, false))
             {
                 Utilities.ShowError(m_refMsg.GetMessage("com: user does not have permission"));
             }
         }
         if (!String.IsNullOrEmpty(Request.QueryString["action"]))
         {
             m_strPageAction = Request.QueryString["action"].ToLower();
         }
         if (!String.IsNullOrEmpty(Request.QueryString["LangType"]))
         {
             ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
             m_refApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
         }
         else
         {
             if (m_refApi.GetCookieValue("LastValidLanguageID") != "")
             {
                 ContentLanguage = int.Parse(m_refApi.GetCookieValue("LastValidLanguageID"));
             }
         }
         m_refApi.ContentLanguage = ContentLanguage;
         StyleSheetJS.Text = m_refStyle.GetClientScript();
 }
コード例 #20
0
ファイル: viewsynonym.ascx.cs プロジェクト: jaytem/minGit
    protected void Page_Load(object sender, System.EventArgs e)
    {
        m_refMsg = (new CommonApi()).EkMsgRef;
            m_refMsg = m_refSiteApi.EkMsgRef;
            AppImgPath = m_refSiteApi.AppImgPath;
            // get and apply the Content Language value
            if (!(Request.QueryString["LangType"] == null))
            {
                if (Request.QueryString["LangType"] != "")
                {
                    ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
                    m_refContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
                }
                else
                {
                    if (m_refContentApi.GetCookieValue("LastValidLanguageID") != "")
                    {
                        ContentLanguage = Convert.ToInt32(m_refContentApi.GetCookieValue("LastValidLanguageID"));
                    }
                }
            }
            else
            {
                if (m_refContentApi.GetCookieValue("LastValidLanguageID") != "")
                {
                    ContentLanguage = Convert.ToInt32(m_refContentApi.GetCookieValue("LastValidLanguageID"));
                }
            }
            m_refContentApi.RequestInformationRef.ContentLanguage = ContentLanguage;
            // get the specific Synonym ID
            if (Strings.Trim(Request.QueryString["id"]).Length > 0)
            {
                if (! (Request.QueryString["id"].ToString() == Guid.Empty.ToString()))
                {
                    synonymID = new Guid(Strings.Trim(Request.QueryString["id"]));
                }
                else
                {
                    synonymID = Guid.Empty ;
                }
            }
            else
            {
                synonymID = Guid.Empty;
            }

            Ektron.Cms.CommonApi api = new Ektron.Cms.CommonApi();
            try
            {
                SynonymData synonymSetData = GetSynonym(synonymID, ContentLanguage);

                ViewToolBar(synonymSetData);
                OutputSynonymSetsForID(synonymSetData);
            }
            catch (Exception ex)
            {
                Utilities.ShowError(ex.Message);
            }
    }
コード例 #21
0
ファイル: Attributes.ascx.cs プロジェクト: jaytem/minGit
 protected Attributes()
 {
     _contentApi = new ContentAPI();
     _siteApi = new SiteAPI();
     _MessageHelper = _contentApi.EkMsgRef;
     this.SitePath = _contentApi.SitePath.TrimEnd(new char[] { '/' });
     this.ApplicationPath = _siteApi.ApplicationPath.TrimEnd(new char[] { '/' });
 }
コード例 #22
0
ファイル: productsearch.aspx.cs プロジェクト: jaytem/minGit
    protected void Page_Load(object sender, System.EventArgs e)
    {
        try
            {
                m_refContentApi = new ContentAPI();
                AppImgPath = m_refContentApi.AppImgPath;
                m_refMsg = m_refContentApi.EkMsgRef;
                Utilities.ValidateUserLogin();
                RegisterResources();
                if (!(Request.QueryString["folderid"] == null))
                {
                    if (Request.QueryString["folderid"] != "")
                    {
                        m_intFolderId = Convert.ToInt64(Request.QueryString["folderid"]);
                    }
                }
                if (Request.QueryString["LangType"] != "")
                {
                    ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
                    m_refContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
                }
                else
                {
                    if (m_refContentApi.GetCookieValue("LastValidLanguageID") != "")
                    {
                        ContentLanguage = int.Parse(m_refContentApi.GetCookieValue("LastValidLanguageID"));
                    }
                }
                m_refContentApi.ContentLanguage = ContentLanguage;

                SearchStyleSheet = "<link rel=\'stylesheet\' type=\'text/css\' href=\'csslib/worksearch.css\'>" + "\r\n";
                StyleSheetJS = m_refStyle.GetClientScript();

                if (ProductSearch1 != null)
                {
                    ProductSearch1.CatalogId = m_intFolderId;
                    ProductSearch1.LanguageID = ContentLanguage;
                    ProductSearch1.IsInWorkArea = true;
                    ProductSearch1.DisplayXslt = "Xslt/WA_ProductSearch.xsl";
                    //ProductSearch1.TemplateProduct = "ProductView.aspx"
                }
                if (Page.IsPostBack == false)
                {
                    Display_ToolBar();
                }
            }
            catch (Exception ex)
            {
                if (ex.Message.ToLower().IndexOf("service is not running") != -1)
                {
                    Utilities.ShowError("Error: Index service is not running.  You cannot search on Products.  Restart the service.");
                }
                else
                {
                    Utilities.ShowError(ex.Message);
                }
            }
    }
コード例 #23
0
ファイル: translate.aspx.cs プロジェクト: jaytem/minGit
    private void Page_Load(System.Object sender, System.EventArgs e)
    {
        _messageHelper = contentAPI.EkMsgRef;
        if (contentAPI.RequestInformationRef.IsMembershipUser == 1 || contentAPI.RequestInformationRef.UserId == 0)
        {
            Response.Redirect(contentAPI.ApplicationPath + "reterror.aspx?info=" + Server.UrlEncode(_messageHelper.GetMessage("msg login cms user")), false);
            return;
        }
        //Put user code to initialize the page here
        this.pageTitle.Text = (new ApplicationAPI()).EkMsgRef.GetMessage("ektron translation");
        htmleditor = this.Request.Form["htmleditor"];
        htmcontent = this.Request.Form["mycontent"];

        // also run Tidy on the text
        TidyNet.Tidy objTidy = new TidyNet.Tidy();
        objTidy.Options.BreakBeforeBR = true;
        objTidy.Options.CharEncoding = TidyNet.CharEncoding.UTF8;
        objTidy.Options.DocType = TidyNet.DocType.Omit;
        objTidy.Options.DropEmptyParas = false;
        objTidy.Options.MakeClean = true;
        objTidy.Options.NumEntities = true;
        objTidy.Options.QuoteAmpersand = true;
        objTidy.Options.QuoteMarks = false;
        objTidy.Options.QuoteNbsp = true;
        objTidy.Options.RawOut = false;
        objTidy.Options.TidyMark = false;
        objTidy.Options.Word2000 = true;
        objTidy.Options.XmlOut = true;
        TidyNet.TidyMessageCollection messageCollection = new TidyNet.TidyMessageCollection();
        System.IO.MemoryStream streamIn = new System.IO.MemoryStream();
        System.IO.MemoryStream streamOut = new System.IO.MemoryStream();
        byte[] byteArray = Encoding.UTF8.GetBytes(htmcontent);
        streamIn.Write(byteArray, 0, byteArray.Length);
        streamIn.Position = 0;
        objTidy.Parse(streamIn, streamOut, messageCollection);
        streamOut.Position = 0;
        string strTidyResult = Encoding.UTF8.GetString(streamOut.ToArray());
        streamOut.Close();
        streamIn.Close();
        if ((strTidyResult == "") && (messageCollection.Errors > 0))
        {
            foreach (TidyNet.TidyMessage msg in messageCollection)
            {
                if (msg.Level == TidyNet.MessageLevel.Error)
                {
                    strTidyResult = strTidyResult + msg.ToString() + "<br />";
                }
            }

            htmcontent = strTidyResult;
            content.Value = htmcontent;
        }
        else
        {
            strTidyResult = (string)(System.Text.RegularExpressions.Regex.Replace(strTidyResult, "[\\w\\W]*?<body>", "").Replace("</body>" + "\r\n" + "</html>", ""));
            content.Value = strTidyResult;
        }
    }
コード例 #24
0
ファイル: setcookie.aspx.cs プロジェクト: jaytem/minGit
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            MsgHelper = AppUI.EkMsgRef;
            if (Utilities.ValidateUserLogin() != false)
            {
                if (AppUI.RequestInformationRef.IsMembershipUser == 1 || AppUI.RequestInformationRef.UserId == 0)
                {
                    Response.Redirect("reterror.aspx?info=" + Server.UrlEncode(MsgHelper.GetMessage("msg login cms user")), false);
                    return;
                }

                if (!string.IsNullOrEmpty(Request.QueryString["LangType"]))
                {
                    ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
                    AppUI.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
                }
                else
                {
                    if (!string.IsNullOrEmpty(Convert.ToString(AppUI.GetCookieValue("LastValidLanguageID"))))
                    {
                        ContentLanguage = Convert.ToInt32(AppUI.GetCookieValue("LastValidLanguageID"));
                    }
                }

                AppUI.ContentLanguage = ContentLanguage;
                string path = "";
                string qstring = "";

                path = Request.QueryString["path"];
                qstring = Strings.Replace(Request.ServerVariables["query_string"], "path=" + path, "", 1, -1, CompareMethod.Text);
                if (qstring.IndexOf("&LangType=") > 0)
                {
                    qstring = Strings.Replace(qstring, "&LangType=" + Request.QueryString["LangType"], "", 1, -1, CompareMethod.Text);
                }
                else
                {
                    qstring = Strings.Replace(qstring, "LangType=" + Request.QueryString["LangType"], "", 1, -1, CompareMethod.Text);
                }
                qstring = Strings.Replace(qstring, "&&", "&", 1, -1, CompareMethod.Text);

                path = path + qstring;
                path = Strings.Replace(path, "&", "?", 1, 1, CompareMethod.Text);
                if (Strings.Mid(path, path.Length, 1) == "?")
                {
                    path = Strings.Mid(path, 1, (path.Length - 1));
                }

                Response.Redirect(path);
            }
        }
        catch(Exception)
        {

        }
    }
コード例 #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        m_refMsg = cApi.EkMsgRef;

        jsEditorClosed.Text = m_refMsg.GetMessage("js: alert editor closed");
        jsScope.Text = Ektron.Cms.Common.EkFunctions.HtmlEncode(Request.QueryString["scope"]);
        jsEditorName.Text = Ektron.Cms.Common.EkFunctions.HtmlEncode(Request.QueryString["EditorName"]);
        jsDEntrylink.Text = Ektron.Cms.Common.EkFunctions.HtmlEncode(Request.QueryString["dentrylink"]);
    }
コード例 #26
0
 private void Page_PreInit(System.Object sender, System.EventArgs e)
 {
     m_refMsg = content_api.EkMsgRef;
     if (content_api.RequestInformationRef.IsMembershipUser == 1 || content_api.RequestInformationRef.UserId == 0)
     {
         Response.Redirect(content_api.ApplicationPath + "reterror.aspx?info=" + Server.UrlEncode(m_refMsg.GetMessage("msg login cms user")), false);
         return;
     }
 }
コード例 #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        contentAPI = new ContentAPI();
        messageHelper = contentAPI.EkMsgRef;

        RegisterStylesheets();

        if (ParseCommunityParameters())
        {
            Community_DistributionWizard_DistributionWizard masterPage = (Community_DistributionWizard_DistributionWizard)Page.Master;

            long originalContentID = (long)Session[DistributionWizardConstants.SESSION_PARAM_ORIG_CONTENT_ID];

            long destinationContentID = GetDestinationContentID(originalContentID);
            if (destinationContentID > 0)
            {
                // This content is already in a distribution relationship.
                // Display UI for redistribution mode.

                masterPage.WizardStepHeader = "Step 1";
                masterPage.WizardStepTitle = "This item has a distribution relationship:";

                // Display redistribution details
                try
                {
                    ltrRedistributionDetails.Text = GetRedistributionDetails(destinationContentID);
                }
                catch
                {
                    DisplayErrorMessage(messageHelper.GetMessage("distribution wizard required parameters"));
                }

                divRedistributionOptions.Visible = true;
                divDistributionOptions.Visible = false;

                Session[DistributionWizardConstants.SESSION_PARAM_DEST_CONTENT_ID] = destinationContentID;
            }
            else
            {
                // This content is not yet in a distribution relationship.
                // Display the UI for distribution mode.

                masterPage.WizardStepHeader = "Step 1";
                masterPage.WizardStepTitle = "Choose one:";

                divDistributionOptions.Visible = true;
                divRedistributionOptions.Visible = false;
            }
        }
        else
        {
            DisplayErrorMessage(messageHelper.GetMessage("distribution wizard required parameters"));
        }
    }
コード例 #28
0
ファイル: reterror.aspx.cs プロジェクト: jaytem/minGit
 private void Page_Load(System.Object sender, System.EventArgs e)
 {
     //Put user code to initialize the page here
     m_refMsg = m_refApi.EkMsgRef;
     Page.Title = m_refMsg.GetMessage("generic error information msg");
     StyleSheetJS.Text = m_refStyle.GetClientScript();
     AppImgPath = m_refApi.AppImgPath;
     RegisterResources();
     DisplayErrorToolBar();
     td_error.InnerHtml = EkFunctions.HtmlEncode(Server.UrlDecode(Request.QueryString["info"]));
 }
コード例 #29
0
    protected void Page_Load(object sender, EventArgs e)
    {
        _MessageHelper = _ContentApi.EkMsgRef;
        _StyleHelper = new StyleHelper();

        if (!String.IsNullOrEmpty(Request.QueryString["id"]))
        {
            _Id = Convert.ToInt64(Request.QueryString["id"]);
        }
        ViewDeviceToolBar();
        BindData();
    }
コード例 #30
0
ファイル: workarea.aspx.cs プロジェクト: jaytem/minGit
    private void Page_Init(System.Object sender, System.EventArgs e)
    {
        EkContent _EkContent = new EkContent(m_refApi.RequestInformationRef);
        EkMessageHelper m_refMsg = new EkMessageHelper(m_refApi.RequestInformationRef);
        if (!_EkContent.IsAllowed(m_refApi.RequestInformationRef.CallerId, m_refApi.RequestInformationRef.UserCulture, "users", "IsLoggedIn"))
            Response.Redirect(m_refApi.RequestInformationRef.SitePath + "workarea/login.aspx");

        //Register Page Components
        this.RegisterPackages();

        //set javascript strings
        this.SetJavascriptStrings();
    }