Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AssertInternalReferrer();
        //<data name="id" xml:space="preserve">
        //    <value>text</value>
        //</data>

        string strResourceName = Request.QueryString.Get("name");
        if (strResourceName != null)
        {
            string strResourceKey = Request.QueryString.Get("id");
            string strResourcesPath = Server.MapPath("Resources/");
            string xsltFile = Server.MapPath("resxdata.xslt");
            string strLang = System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
            string xmlFile = strResourcesPath + strResourceName + "." + strLang + ".resx";
            if (!System.IO.File.Exists(xmlFile))
            {
                strLang = System.Threading.Thread.CurrentThread.CurrentUICulture.Parent.Name;
                xmlFile = strResourcesPath + strResourceName + "." + strLang + ".resx";
                if (!System.IO.File.Exists(xmlFile))
                {
                    xmlFile = strResourcesPath + strResourceName + ".resx";
                }
            }
            Ektron.Cms.Xslt.ArgumentList args = null;
            if (!String.IsNullOrEmpty(strResourceKey))
            {
                args = new Ektron.Cms.Xslt.ArgumentList();
                args.AddParam("resourceKey", "", strResourceKey);
            }
            _api = new Ektron.Cms.CommonApi();
            string strXml = Ektron.Cms.EkXml.XSLTransform(xmlFile, xsltFile, true, true, args, true, null, _api.RequestInformationRef.ApplicationPath, false);
            litOutput.Text = strXml;
        }
    }
Exemplo n.º 2
0
 protected Ektron.Cms.CommonApi GetCommonApi()
 {
     if (null == m_api)
     {
         m_api = new Ektron.Cms.CommonApi();
     }
     return m_api;
 }
Exemplo n.º 3
0
 private string AJAXcheck(string sResponse, string sURLQuery)
 {
     Ektron.Cms.CommonApi m_refcommonApi = new Ektron.Cms.CommonApi();
     workareaajax waAjax = new workareaajax(m_refcommonApi.AppPath);
     waAjax.ResponseJS = sResponse;
     waAjax.URLQuery = sURLQuery;
     waAjax.FunctionName = "checkRule";
     return waAjax.Render();
 }
    protected void Page_Load(object sender, System.EventArgs e)
    {
        StringBuilder sbMoment = new StringBuilder();
            string sURL = "";
            Ektron.Cms.CommonApi api = new Ektron.Cms.CommonApi();
            if (! Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(api.RequestInformationRef, Ektron.Cms.DataIO.LicenseManager.Feature.SocialNetworking))
            {
                Utilities.ShowError(api.EkMsgRef.GetMessage("feature locked error"));
            }
            tlang = api.DefaultContentLanguage;
            try
            {
                if ((!string.IsNullOrEmpty(Request.QueryString["tlang"])) && Information.IsNumeric(Request.QueryString["tlang"]) && Convert.ToInt32(Request.QueryString["tlang"].ToString()) > 0)
                {
                    tlang = Convert.ToInt32(Request.QueryString["tlang"].ToString());
                }
                if (tlang == Ektron.Cms.Common.EkConstants.CONTENT_LANGUAGES_UNDEFINED || tlang == Ektron.Cms.Common.EkConstants.ALL_CONTENT_LANGUAGES)
                {
                    tlang = api.DefaultContentLanguage;
                }
                if ((!string.IsNullOrEmpty(Request.QueryString["tid"])) && Information.IsNumeric(Request.QueryString["tid"]) && Convert.ToInt64(Request.QueryString["tid"].ToString()) > 0)
                {
                    tid = Convert.ToInt64(Request.QueryString["tid"].ToString());
                }
                if ((!string.IsNullOrEmpty(Request.QueryString["profileTaxonomyId"])) && Information.IsNumeric(Request.QueryString["profileTaxonomyId"]) && Convert.ToInt64(Request.QueryString["profileTaxonomyId"].ToString()) > 0)
                {
                    profileTaxonomyId = Convert.ToInt64(Request.QueryString["profileTaxonomyId"].ToString());
                }
                sURL = (string) ("communitygroupaddedit.aspx?thickbox=true" + (tid > 0 ? ("&tid=" + tid.ToString()) : "") + (tlang > 0 ? ("&LangType=" + tlang.ToString()) : "") + (profileTaxonomyId > 0 ? ("&profileTaxonomyId=" + profileTaxonomyId.ToString()) : ""));
                sbMoment.Append("One Moment Please...").Append(Environment.NewLine);
                sbMoment.Append("<script type=\"text/javascript\" language=\"Javascript\">").Append(Environment.NewLine);
                sbMoment.Append("   setTimeout(\"location.href=\'").Append(sURL).Append("\'\",1000); ").Append(Environment.NewLine);
                sbMoment.Append("</script>").Append(Environment.NewLine);

                ltr_go.Text = sbMoment.ToString();
            }
            catch (Exception)
            {

            }
            finally
            {
                sbMoment = null;
            }
    }
Exemplo n.º 5
0
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        this.commonApi = GetCommonApi();
        this.localeMgrBO = new Ektron.Cms.BusinessObjects.Localization.LocaleManager(this.commonApi.RequestInformationRef);
        this.appImgPath = this.commonApi.AppImgPath;

        this.msgNone = GetMessage("none w prths");

        LanguageGrid.RowDataBound += new GridViewRowEventHandler(this.Grid_RowDataBound);
        LanguageGrid.Sorting += new GridViewSortEventHandler(this.Grid_Sorting);
        EditableGrid.RowDataBound += new GridViewRowEventHandler(this.Grid_RowDataBound);
        EditableGrid.Sorting += new GridViewSortEventHandler(this.Grid_Sorting);
        EditableGrid.RowCommand += new GridViewCommandEventHandler(this.EditableGrid_RowCommand);
        EditableGrid.RowEditing += new GridViewEditEventHandler(this.EditableGrid_RowEditing);
        EditableGrid.RowCancelingEdit += new GridViewCancelEditEventHandler(this.EditableGrid_RowCancelingEdit);
        EditableGrid.RowUpdating += new GridViewUpdateEventHandler(this.EditableGrid_RowUpdating);
    }
Exemplo n.º 6
0
        protected void Page_Load(Object src, EventArgs e)
        {
            _api = new Ektron.Cms.CommonApi();

            Ektron.Cms.API.JS.RegisterJS(this, "ucFieldValidation.js", "FieldValidationJS");
            Ektron.Cms.Common.EkMessageHelper refMsg = _api.EkMsgRef;
            this.lblCondition.InnerHtml = refMsg.GetMessage("lbl condition");
            this.lblCustomValidation.InnerHtml = refMsg.GetMessage("lbl custom validation");
            this.lblDataType.InnerHtml = refMsg.GetMessage("lbl data type");
            this.lblDataType.Attributes["for"] = cboDataType.ClientID;
            this.lblExamples.InnerHtml = refMsg.GetMessage("lbl examples c");
            this.lblExamples.Attributes["for"] = cboValEx.ClientID;
            this.lblMessage.InnerHtml = refMsg.GetMessage("lbl message");
            this.lblValidation.InnerHtml = refMsg.GetMessage("lbl validation");
            this.lblValidation.Attributes["for"] = cboV8n.ClientID;

            if (!Page.ClientScript.IsClientScriptBlockRegistered("EkFieldValidationScript"))
            {
                string ScriptText = EkFieldValidationScript.InnerText;
                ScriptText = ScriptText.Replace("<%=this.ClientID%>", this.ClientID);
                ScriptText = ScriptText.Replace("<%=cboV8n.ClientID%>", cboV8n.ClientID);
                ScriptText = ScriptText.Replace("<%=cboDataType.ClientID%>", cboDataType.ClientID);
                ScriptText = ScriptText.Replace("<%=cboValEx.ClientID%>", cboValEx.ClientID);
                ScriptText = ScriptText.Replace("<%=validationTree.fsTree.ClientID%>", validationTreeControl.fsTree.ClientID);
                ScriptText = ScriptText.Replace("<%=validationTree.ClientID%>", validationTreeControl.ClientID);

                StringBuilder sbScript = new StringBuilder();
                sbScript.AppendLine();
                sbScript.AppendLine(@"var EkFieldValidationResourceText = ");
                sbScript.AppendLine(@"{");
                sbScript.Append(@"	sExprContainsVars: """);
                sbScript.Append(refMsg.GetMessage("msg val expr contains vars"));
                sbScript.AppendLine(@"""");
                sbScript.Append(@",	sCondition: """);
                sbScript.Append(refMsg.GetMessage("lbl condition nc"));
                sbScript.AppendLine(@"""");
                sbScript.AppendLine(@"};");
                sbScript.AppendLine(ScriptText);

                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "EkFieldValidationScript", sbScript.ToString(), true);
            }
            EkFieldValidationScript.Visible = false;
        }
Exemplo n.º 7
0
 protected void submit_Click(object sender, EventArgs e)
 {
     Ektron.Cms.CommonApi commonApi = new Ektron.Cms.CommonApi();
     Ektron.Cms.Common.EkMailService mailService = new Ektron.Cms.Common.EkMailService(commonApi.RequestInformationRef);
     try
     {
         mailService.MailServer = "EmailServerIP".GetAppKeyString();
         mailService.ServerPort = "EmailServerPort".GetAppKeyInt();
         mailService.MailFrom = "*****@*****.**";
         mailService.MailTo = email.Text;
         mailService.MailBodyText = "This is the body of the mail";
         mailService.SendMail();
         result.Text = "Mail Sent";
         email.Text = string.Empty;
     }
     catch (Exception ex)
     {
         ExceptionUtils.WriteError(ex);
     }
 }
Exemplo n.º 8
0
 public CloudParamWrapper()
 {
     _commonApi = new Ektron.Cms.CommonApi();
 }
Exemplo n.º 9
0
        /// <summary>
        /// Common API object for frequently called methods
        /// </summary>
        /// <returns>Reference to Common API object for frequently called methods</returns>
        protected Ektron.Cms.CommonApi GetCommonApi()
        {
            if (null == this.api)
            {
                this.api = new Ektron.Cms.CommonApi();
            }

            return this.api;
        }
Exemplo n.º 10
0
    /// <summary>
    /// Page OnLoad event override
    /// </summary>
    /// <param name="e"><see cref="EventArgs" /> object</param>
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);

        this.commonApi = GetCommonApi();
        this.requestInfoRef = this.commonApi.RequestInformationRef;
        this.appImgPath = this.commonApi.AppImgPath;

        this.RegisterResources();

        StyleSheetJS.Text = this.refStyle.GetClientScript();

        if (!Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(
            this.requestInfoRef,
            Ektron.Cms.DataIO.LicenseManager.Feature.Xliff,
            false))
        {
            Utilities.ShowError(GetMessage("feature locked error"));
        }
    }
Exemplo n.º 11
0
 private void Email(string emailId, string subject, string bodyText, string ccemail)
 {
     Ektron.Cms.CommonApi commonApi = new Ektron.Cms.CommonApi();
     Ektron.Cms.Common.EkMailService mailService = new Ektron.Cms.Common.EkMailService(commonApi.RequestInformationRef);
     mailService.MailServer = "EmailServerIP".GetAppKeyString();
     mailService.ServerPort = "EmailServerPort".GetAppKeyInt();
     mailService.MailFrom = "PaymentEmailFrom".GetAppKeyString();
     mailService.MailTo = emailId;
     if (ccemail != "")
     {
         mailService.MailCC = ccemail;
     }
     mailService.MailSubject = subject;
     mailService.MailBodyText = bodyText;
     mailService.SendMail();
 }
Exemplo n.º 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Ektron.Cms.CommonApi capi = new Ektron.Cms.CommonApi();
     //this.AppPath.Text = capi.AppPath;
 }