组三聪明组合
×

您的手机?

你好,欢迎进入微快信科?#21152;?#38480;公司官方网站!

网络营销干货

您当前的位置:首页 > 新闻动态 > 网络营销干货

Phpmywind教程:关于广告位调用

更新时间:2018-07-05 14:00:34点击?#38382;?/small>4093次字号:T|T
/*
 * 函数说明:广告数据调用
 * person: 小夜
 * @access  public
 * @param   $id   int  广告ID 
 * @return  string     返回广告缩略图地址
 */
 function GetAd($id)
 {
    global $dosql, $cfg_isreurl;
    $str=”;
    if(!emptyempty($id)){
        $row=$dosql-> GetOne(“SELECT * FROM `pmw_admanage` WHERE id=$id AND checkinfo=true”);
        if($row!=“”)
            switch($row['admode']){
                case $row['admode']==’image’:
                    $str .= ‘<a href=“‘.$row['linkurl'].’”><img src=“‘.$row['picurl'].’”></a>’;
                    break;
                case $row['admode']==’flash’:
                    $str .= ‘<a href=“‘.$row['linkurl'].’”>
                    <object id=“video” width=“225〃 height=“185〃 border=“0〃 classid=“clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA”>
                    <param name=“ShowDisplay” value=“0〃>
                    <param name=“ShowControls” value=“1〃>
                    <param name=“AutoStart” value=“1〃>
                    <param name=“AutoRewind” value=“0〃>
                    <param name=“PlayCount” value=“0〃>
                    <param name=“Appearance value=”0 value=“”>
                    <param name=“BorderStyle value=”0 value=“”>
                    <param name=“MovieWindowHeight” value=“225〃>
                    <param name=“MovieWindowWidth” value=“185〃>
                    <param name=“FileName” value=“‘.$row['picurl'].’”>
                    <embed width=“225〃 height=“185〃 border=“0〃 showdisplay=“0〃 showcontrols=“1〃 autostart=“1〃 autorewind=“0〃 playcount=“0〃 moviewindowheight=“225〃 moviewindowwidth=“185〃 filename=“‘.$row['picurl'].’” src=“‘.$row['picurl'].’”></embed>
                    </object></a>’;
                    break;
                case $row['admode']==’video’:
                    $str .= ‘<a href=“‘.$row['linkurl'].’”>
                    <object id=“video” width=“225〃 height=“185〃 border=“0〃 classid=“clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA”>
                    <param name=“ShowDisplay” value=“0〃>
                    <param name=“ShowControls” value=“1〃>
                    <param name=“AutoStart” value=“1〃>
                    <param name=“AutoRewind” value=“0〃>
                    <param name=“PlayCount” value=“0〃>
                    <param name=“Appearance value=”0 value=“”>
                    <param name=“BorderStyle value=”0 value=“”>
                    <param name=“MovieWindowHeight” value=“225〃>
                    <param name=“MovieWindowWidth” value=“185〃>
                    <param name=“FileName” value=“‘.$row['picurl'].’”>
                    <embed width=“225〃 height=“185〃 border=“0〃 showdisplay=“0〃 showcontrols=“1〃 autostart=“1〃 autorewind=“0〃 playcount=“0〃 moviewindowheight=“225〃 moviewindowwidth=“185〃 filename=“‘.$row['picurl'].’” src=“‘.$row['picurl'].’”></embed>
                    </object></a>’;
                    break;
                default:
                    $str .= ‘<a href=“‘.$row['linkurl'].’”>’.$row['adtext'].’</a>’;
                    break;
        }
    }
    return $str;
 }
前台调用代码: 
<div class=“ad”>
    <?php echo GetAd(3)?>
</div>
(编辑:admin)
组三聪明组合 龙虎玩法规则 精准28码中特 西红柿计划旧版本 四肖八码长期大公开 广东11选5有什么诀窍 谁有澳洲赛车计划软件 pc蛋蛋彩票app下载 幸运飞艇免费计划软件手机版 时时彩后一100稳赚lm0 麻将规则教学