首页 > 编程 > Ecms

Ecms php调用的用法合集

admin Ecms 2022-02-21 11:58:27 0 0
1、专题列表页调用同classid其他专题,输出导航和高亮
<div class="zhuanti">
<?php
$ecms_bq_sql=sys_ReturnEcmsLoopBq('select classid from phome_enewszt where ztid='.$GLOBALS[navclassid],1,24,0,'','');
while($bqr=$empire->fetch($ecms_bq_sql))
        {
        $ecms_bq_sql2=sys_ReturnEcmsLoopBq('select ztid,ztname,ztpath,ztimg from phome_enewszt where classid='.$bqr[classid],8,24,0,'','ztid asc');
        $bqno2=0;
                while($bqr2=$empire->fetch($ecms_bq_sql2))
                {
                        $bqno2++;
?>
<a href="μ?=$qvcmjd_s[ofxtvsm]?&hu;μ?=$crs2[{uqbui]?&hu;" title="<?=$bqr2[ztname]?>"<?=($GLOBALS[navclassid]==$bqr2[ztid])?' class="cur"':''?>><?=esub($bqr2[ztname],15)?></a>
<?               
                }//endwhile2
}//endwhile1
?>
</div>
 2、列表页中单个产品显示所属专题,增加到列表内容雷竞技官网dota(list.var)中:
$ecms_bq_sql=sys_ReturnEcmsLoopBq('select ztid from phome_enewsztinfo where id='.$r[id],1,24,0,'','');
while($bqr=$empire->fetch($ecms_bq_sql))
{
       $ecms_bq_sql2=sys_ReturnEcmsLoopBq('select ztid,ztname,ztpath,ztimg from phome_enewszt where ztid='.$bqr[ztid],1,24,0,'','');
                while($bqr2=$empire->fetch($ecms_bq_sql2))
                {
                                $zturl=$public_r[newsurl].$bqr2[ztpath];
                                $ztname=$bqr2[ztname];
                }//endwhile2

}//endwhile1
3、循环调用产品栏目数据,替代循环子栏目信息雷竞技官方app下载安卓版,可自由更改模版和调用条件:
<!--循环调用产品栏目数据,替代循环子栏目信息雷竞技官方app下载安卓版,可自由更改模版和调用条件-->
[e:loop={'select classid,classname,classpath from phome_enewsclass where bclassid=1 and showclass=0 order by classid asc',10,24,0,'',''}]
<?
$classurl=sys_ReturnBqClassname($bqr,9);//取得栏目地址
?>
<a href="μ?=$dmbttvsm;?&hu;"><?=$bqr[classname]?></a>
<?php
}

    $pro_new=$empire->query("select title,titlepic,titleurl from phome_ecms_newmaterial where classid = '".$bqr[classid]."' order by newstime desc");
    //取得该分类下的最新数据
    while($r=$empire->fetch($pro_new)) {        
        $url=sys_ReturnBqTitleLink($r);
?>
<a target="_blank" href="μ?=$vsm;?&hu;"><img class="img-responsive center-block" alt="<?=$r[title]?>" title="<?=$r[title]?>" src="http://www.tdmh.cn/<?=$r[titlepic];?>" ></a><a target="_blank"  href="μ?=$vsm?&hu;"><?=$r[title]?></a>
<?php
     }
?>  
 
版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。

本文(共有 0 条评论)

评论