⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 previewad.aspx.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.WebSite.Admin.AD
{
    using PowerEasy.AccessManage;
    using PowerEasy.AD;
    using PowerEasy.Common;
    using PowerEasy.Components;
    using PowerEasy.Controls;
    using PowerEasy.Enumerations;
    using PowerEasy.Model.AD;
    using PowerEasy.Web.UI;
    using System;
    using System.Web;
    using System.Web.UI.HtmlControls;

    public class PreviewAD : AdminPage
    {
        protected HtmlGenericControl ShowJS;
        protected ExtendedSiteMapPath SmpNavigator;

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            RolePermissions.BusinessAccessCheck(OperateCode.AdManage);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            int zoneId = BasePage.RequestInt32("ZoneId");
            if (string.Compare(BasePage.RequestString("Type"), "Zone", true) == 0)
            {
                if (Advertisement.GetADList(zoneId).Count == 0)
                {
                    this.ShowJS.InnerHtml = "版位中暂时还未添加广告,请添加后再进行预览!";
                }
                else
                {
                    ADZoneInfo adZoneById = ADZone.GetAdZoneById(zoneId);
                    if (adZoneById != null)
                    {
                        this.ShowJS.InnerHtml = "<script  type=\"text/javascript\" src='" + base.ResolveUrl("~/" + VirtualPathUtility.AppendTrailingSlash(SiteConfig.SiteOption.AdvertisementDir) + adZoneById.ZoneJSName) + "?temp=" + DataSecurity.RandomNum() + "'></script>";
                    }
                }
            }
            else
            {
                this.ShowAd();
            }
        }

        private void ShowAd()
        {
            AdvertisementInfo advertisementById = Advertisement.GetAdvertisementById(BasePage.RequestInt32("AdId"));
            this.ShowJS.InnerHtml = Advertisement.GetAdContent(advertisementById);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -