详情页

帝国CMS灵动标签SQL调用指定类型的最新广告

时间:2023年12月29日

编辑:佚名

帝国CMS灵动标签SQL调用指定类型的最新广告(不实用,不如js灵活,适合有特殊需求的帝国CMS模板开发者)
1、现在我想调用广告中分类为3,有图片的广告
①、调用图片广告(and t=0 可不用加)
[e:loop={select * from phome_enewsad where classid=3 and t=0 order by adid desc limit 3,0,24}]
<a href=<?=$bqr[url]?> target=_blank title=<?=$bqr[title]?>><img src=<?=$bqr[picurl]?>></a><br>
[/e:loop]
②、调用文字广告(and t=1 可不用加)
[e:loop={select * from phome_enewsad where classid=3 and t=1 order by adid desc limit 3,0,24}]
<a href=<?=$bqr[url]?> target=_blank title=<?=$bqr[title]?>><?=$bqr[title]?></a><br>
[/e:loop]
>phome_enewsad 数据表字段解释(广告表)
------------------------------------------------------------
>    字段名            解释                  附加说明
>    adid            广告ID    
>    picurl            文字内容或图片地址    
>    url            链接地址    
>    pic_width         图片宽度    
>    pic_height            图片高度    
>    onclick        点击数    
>    classid        分类ID    
>    adtype        广告类型    
>    title            广告名称    
>    target        新窗口打开    
>    alt        提示文字    
>    starttime        广告开始时间    
>    endtime        广告过期时间    
>    adsay        广告注释    
>    titlefont        文字加粗    
>    titlecolor        文字颜色    
>    htmlcode            HTML广告内容    
>    t                广告模式           0为图片广告,1为文字广告,2为HTML广告,3为弹出广告
>    ylink        显示原链接    
>    reptext        广告过期后显示内容    
相关文章
猜你需要