Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int siteID = appxCMS.Util.CMSSettings.GetSiteId();

        appxCMS.Site siteObj = appxCMS.SiteDataSource.GetSite(siteID);

        string output      = "";
        string iconHtml    = "";
        string phoneNumber = "";
        string callUs      = "";

        if (siteObj != null)
        {
            if (!String.IsNullOrEmpty(siteObj.TollFreeNumber))
            {
                phoneNumber = FormatPhoneNumber(siteObj.TollFreeNumber);
            }

            else if (!String.IsNullOrEmpty(siteObj.PhoneNumber))
            {
                phoneNumber = FormatPhoneNumber(siteObj.PhoneNumber);
            }

            else
            {
                phoneNumber = "0000000000";
            }


            if (useIcon.ToLower() == "true")
            {
                iconHtml = "<span class=\"fa fa-phone\"></span>&nbsp;";
            }

            if (addCallUs.ToLower() == "true")
            {
                callUs = "Call Us ";
            }


            output = iconHtml + callUs + phoneNumber;

            // Make hyperlink if needed...
            if (makeHyperLink.ToLower() == "true")
            {
                output = "<a href=\"tel:" + phoneNumber + "\">" + output + "</a>";
            }

            litSitePhoneNumber.Text = output;
        }
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int siteID = appxCMS.Util.CMSSettings.GetSiteId();

        appxCMS.Site siteObj = appxCMS.SiteDataSource.GetSite(siteID);

        string iconHtml    = "";
        string displayHtml = "";


        if (siteObj != null)
        {
            if (!String.IsNullOrEmpty(siteObj.EmailAddress))
            {
                hypEmail.NavigateUrl = "mailto:" + siteObj.EmailAddress;
                hypEmail.Visible     = true;



                //else
                //{ hypEmail.Text = siteObj.EmailAddress; }



                if (useIcon.ToLower() == "true")
                {
                    iconHtml = "<span class=\"fa fa-envelope\"></span>&nbsp;";
                }

                if (showEmailUs.ToLower() == "true")
                {
                    displayHtml = "Email Us";
                }
                else
                {
                    displayHtml = siteObj.EmailAddress;
                }



                hypEmail.Text = iconHtml + displayHtml;
            }
        }
    }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int    siteID      = appxCMS.Util.CMSSettings.GetSiteId();
        string phoneNumber = "";

        //Addtional Site data.  This will be used to determine if we show chat and/or if we show FAQ/Support link.
        SiteUtility.SiteDetails siteDetails = new SiteUtility.SiteDetails();
        siteDetails = SiteUtility.RetrieveSiteSettings(siteID);


        //Create appX oSite obj to get phone number for site.
        appxCMS.Site oSite = appxCMS.SiteDataSource.GetSite(siteID);


        if (oSite != null)
        {
            if (!String.IsNullOrEmpty(oSite.TollFreeNumber))
            {
                phoneNumber = ReformatPhoneNumber(oSite.TollFreeNumber);
            }
            else if (!String.IsNullOrEmpty(oSite.PhoneNumber))
            {
                phoneNumber = ReformatPhoneNumber(oSite.PhoneNumber);
            }
            else
            {
                phoneNumber = "unknown";
            }
        }


        //Set phone number labels
        litPhone.Text  = phoneNumber;
        litPhone2.Text = phoneNumber;
        litPhone3.Text = phoneNumber;


        //if Chat not allowed, remove it
        if (siteDetails.ShowChat)
        {
            //show everything
            if (siteDetails.ShowFaq)
            {
                pnlWithChat.Visible = true;
            }
        }

        //hide chat option
        else
        {
            //don't show chat or FAQ links
            if (!siteDetails.ShowFaq)
            {
                pnlWithoutChatFaq.Visible = true;
            }

            //show FAQs but not chat
            else
            {
                pnlWithoutChat.Visible = true;
            }
        }


        //slight hack. If other sites require this then make it configurable.
        //Staples Act Mgr
        if (siteID == 95)
        {
            litSupport.Text        = "Support/FAQs";
            hypSupport.Text        = "See FAQs Here";
            hypSupport.NavigateUrl = "/FAQ";
        }

        else
        {
            litSupport.Text        = "Support";
            hypSupport.Text        = "Get Answers Here";
            hypSupport.NavigateUrl = "/Support";
        }
    }