帝国cms根据扩展变量里面的参数来调取指定栏目
[e:loop={"select sonclass,classid,classname,classimg from `[!db.pre!]enewsclass` where classid in($public_r[add_home_classid1]) order by myorder,myorder desc",7,24,0}]
<div class="item">
<?php
$sonClassId = trim($bqr[sonclass],"|");
$sonClassId = str_replace("|",",",$sonClassId);
$sql=$empire->query("select title,titlepic,titleurl from {$dbtbpre}ecms_news where classid in ($sonClassId) limit 20");
$n=1;
$img="";
$li='';
while($rsn=$empire->fetch($sql))
{
if($n==1){
$img = '<a href="'.$rsn[titleurl].'" target="_blank"><img src="'.$bqr[classimg].'" width="298" height="120"></a>';
$n=2;
}else{
$li.= '<li><a href="'.$rsn[titleurl].'" title="'.$rsn[title].'">'.$rsn[title].'></a></li>';
}
$n++;
}
?>
<div class="title">
<a href="<?=$bqsr[classurl]?>"><?=$bqsr[classname]?></a>
</div>
<div class="screenshot">
<?=$img?>
</div>
<ul>
<?=$li?>
</ul>
</div>
[/e:loop]
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容