简单调用:
[e:loop={"select * from phome_enewszt where ztimg<>'' order by onclick desc limit 5",10,24,0}]
<li>
<a href="/<?=$bqr['ztpath']?>/" rel="external nofollow" rel="external nofollow" title="<?=$bqr['ztname']?>">
<img src="<?=$bqr['ztimg']?>" alt="<?=$bqr['ztname']?>">
<p><?=$bqr['ztname']?></p>
</a>
</a></li>
[/e:loop]
高级玩法循环调用代码如下:
<?php
$ecms_bq_sql=sys_ReturnEcmsLoopBq("select ztid,ztpath,ztname from [!db.pre!]enewszt limit 100",0,24,0);
$bqno=0;
while($bqr=$empire->fetch($ecms_bq_sql))
{
$ztid=($bqr[ztid]);
$bqno++;
?>
模板代码内容 <a href="<?=$public_r[newsurl]?><?=$bqr['ztpath']?>/" rel="external nofollow" ><?=$bqr['ztname']?></a>
<?php
$ecms_bq_sql2=sys_ReturnEcmsLoopBq("select id,ztid,classid from [!db.pre!]enewsztinfo where ztid='$ztid' limit 10",0,24,0);
$bqno2=0;
while($bqr2=$empire->fetch($ecms_bq_sql2))
{
$id=($bqr2[id]);
$bqno2++;
?>
<?php
$ecms_bq_sql3=sys_ReturnEcmsLoopBq("select titleurl,title,classid,titlepic from {$dbtbpre}ecms_{$class_r[$bqr2[classid]][tbname]} where id={$bqr2[id]}",0,24,0);
$bqno3=0;
while($bqr3=$empire->fetch($ecms_bq_sql3))
{
$bqsr3=sys_ReturnEcmsLoopStext($bqr3);
$bqno3++;
?>
<li><a href="<?=$bqsr3[titleurl]?>" rel="external nofollow" target="_blank"><?=$bqr3[title]?></a></li>
<?php
}
?>
<?php
}
?>
<?php
}
?>
应用示例:标识码:333ttt
<?php
$ecms_bq_sql=sys_ReturnEcmsLoopBq("select ztid,ztpath,ztname from [!db.pre!]enewszt limit 4",0,24,0);
$bqno=0;
while($bqr=$empire->fetch($ecms_bq_sql))
{
$ztid=($bqr[ztid]);
$bqno++;
?>
<li>
<a href="/<?=$bqr['ztpath']?>/" rel="external nofollow" rel="external nofollow" >
<div class="img">
<?php
$ecms_bq_sql2=sys_ReturnEcmsLoopBq("select id,ztid,classid from [!db.pre!]enewsztinfo where ztid='$ztid' limit 4",0,24,0);
$bqno2=0;
while($bqr2=$empire->fetch($ecms_bq_sql2))
{
$id=($bqr2[id]);
$bqno2++;
?>
<?php
$ecms_bq_sql3=sys_ReturnEcmsLoopBq("select titleurl,title,classid,titlepic from {$dbtbpre}ecms_{$class_r[$bqr2[classid]][tbname]} where id={$bqr2[id]}",0,24,0);
$bqno3=0;
while($bqr3=$empire->fetch($ecms_bq_sql3))
{
$bqsr3=sys_ReturnEcmsLoopStext($bqr3);
$bqno3++;
?>
<img src="<?=$bqr3[titlepic]?>" alt="">
<?php
}
?>
<?php
}
?>
</div>
<p><?=$bqr['ztname']?></p>
</a>
</li>
<?php
}
?>
需要显示专题更新时间,就添加查询addtime,然后输出变量<?=date(“Y-m-d H:i:s”,$bqr[addtime])?>即可
1.本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:115904045@qq.com,我们将第一时间处理!
2.资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持
3.所有资源仅限于参考和学习,版权归原作者所有,更多请阅读网站声明。