直接上完整代码,自己按照自己的需要样式修改即可

<div class="detailCont_left5">
<p class="csTlt_1 csTlt_2"><span>相关专题</span><a href="/zt/" class="more" target="_blank" title=""><em>更多</em><i class="icon"></i></a></p>
<div class="tabBar">
[e:loop={'select * from phome_enewszt where ztname LIKE "%'.$classname.'%" order by addtime limit 4',4,24,1}]
<?php //加入php代码
if ($bqno==1){ //指定第一条信息
$class = "current"; //第一条信息的样式
}
else{ //其它信息
$class = "tabs__item"; //其它信息的样式
}
?>
<span class="<?=$class?>"> <?=$bqr['ztname']?></span>
[/e:loop]
</div>
<?php
$classname1 = $class_r[$navinfor['classid']]['classname'];
?>
<div class="ulBox">
<?php
$ecms_bq_sql=sys_ReturnEcmsLoopBq("select addtime,ztid,ztnum,ztimg,ztpath,ztname,intro from [!db.pre!]enewszt where ztname like '%$classname1%' limit 4",0,24,0);
$bqno=0;
while($bqr=$empire->fetch($ecms_bq_sql))
{
$ztid=($bqr[ztid]);
$bqno++;
?>
<?php //加入php代码
if ($bqno==1){ //指定第一条信息
$class = ""; //第一条信息的样式
}
else{ //其它信息
$class = "hide"; //其它信息的样式
}
?>
<div class="<?=$class?>">
<div class="top">
<a href="/<?=$bqr['ztpath']?>/" title="<?=$bqr['ztname']?>" target="_blank" class="imgBox">
<img src="<?=$bqr['ztimg']?>" alt="<?=$bqr['ztname']?>"/>
<span>共收录<?$num=$empire->gettotal("select count(*) as total from {$dbtbpre}enewsztinfo where ztid='$bqr[ztid]'");
echo $num;?>款</span>
</a>
<p><?=$bqr['ztname']?></p><span><?=date("Y-m-d",$bqr[addtime])?></span>
<div>
<p><?=$bqr['intro']?></p>
<a href="/<?=$bqr['ztpath']?>/" target="_blank" title="">查看详情<i class="icon"></i></a>
</div>
</div>
<ul>
<?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="<?=$bqr3[titleurl]?>" target="_blank" title="<?=$bqr3[title]?>">
<img data-src="<?=$bqr3[titlepic]?>" src="" alt="<?=$bqr3[title]?>">
<p><?=$bqr3[title]?></p>
<p><?=$bqr3[classname]?></p>
<div >下载</div>
</a>
</li>
<?php
}
?>
<?php
}
?>
</ul>
</div>
<?php
}
?>
</div>

</div>

 

 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。