<!-- 循环开始 -->
<?php
$Result = sys_ReturnEcmsLoopBq("select classid,classname from {$dbtbpre}enewsclass where bclassid='$GLOBALS[navclassid]' order by myorder,classid asc",0,24,0);
while($IndexClass=$empire->fetch($Result)){
$ClassLink = sys_ReturnBqClassname($IndexClass,9);
?>
<div class="lm louti bj_mt26">
<div class="lm_l fl">
<div class="lm_title">
<h3 class="fl">
<em class="iconfont icon-xuexi1"></em>
<a href="<?=$ClassLink?>" rel="external nofollow" rel="external nofollow" target="_blank" title="<?=$IndexClass[classname]?>"><?=$IndexClass[classname]?></a>
</h3>
<div class="lm_nav1 tag fl">
[e:loop={"select * from phome_enewsclass where bclassid=$IndexClass[classid] order by classid asc limit 5",0,24,0}]
<a href="<?=$bqsr[classurl]?>" rel="external nofollow" target="_blank" title="<?=$bqr[classname]?>" class="lm_btn"><?=$bqr[classname]?></a>
[/e:loop]
</div>
<a href="<?=$ClassLink?>" rel="external nofollow" rel="external nofollow" target="_blank" class="more cb fr">更多</a>
</div>
<div class="lm_rwap bj_mt30">
<div class="lm_itme fl">
<div class="pic_lb3">
<?php
$bqno=0;
$ResultG = sys_ReturnEcmsLoopBq($IndexClass[classid],1,0,1,'','onclick DESC');
while($ClassGoods=$empire->fetch($ResultG)){
$bqsr=sys_ReturnEcmsLoopStext($ResultG);
$bqsr=sys_ReturnEcmsLoopStext($ClassGoods);
$bqno++;
?>
<a href="<?=$ClassGoods[titleurl]?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="<?=$ClassGoods[title]?>" target="_blank" class="lb_img photo"><img src="<?=$ClassGoods[titlepic]?$ClassGoods[titlepic]:'/skin/images/'.rand(1,50).'.jpg'?>" alt="<?=$ClassGoods[title]?>"></a>
<a href="<?=$ClassGoods[titleurl]?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="<?=$ClassGoods[title]?>" target="_blank" class="lb_bt chao"><?=$ClassGoods[title]?></a>
<p class="chao2"><?=$ClassGoods[smalltext]?>...</p>
<?php
}
//显示1条
?>
</div>
<?php
$bqno=0;
$ResultG = sys_ReturnEcmsLoopBq($IndexClass[classid],'2,6',0,0,'','onclick DESC');
while($ClassGoods=$empire->fetch($ResultG)){
$bqsr=sys_ReturnEcmsLoopStext($ResultG);
$bqsr=sys_ReturnEcmsLoopStext($ClassGoods);
$bqno++;
?>
<a href="<?=$ClassGoods[titleurl]?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="<?=$ClassGoods[title]?>" target="_blank" class="lb_5 chao"><span>荐</span><?=$ClassGoods[title]?><time><?=date('m-d',$ClassGoods[newstime])?></time></a>
<?php
}
//显示6条
?>
</div>
<div class="lm_itme fr">
<div class="pic_lb3">
<?php
$bqno=0;
$ResultG = sys_ReturnEcmsLoopBq($IndexClass[classid],'1,1',0,1,'','onclick DESC');
while($ClassGoods=$empire->fetch($ResultG)){
$bqsr=sys_ReturnEcmsLoopStext($ResultG);
$bqsr=sys_ReturnEcmsLoopStext($ClassGoods);
$bqno++;
?>
<a href="<?=$ClassGoods[titleurl]?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="<?=$ClassGoods[title]?>" target="_blank" class="lb_img photo"><img src="<?=$ClassGoods[titlepic]?>" alt="<?=$ClassGoods[title]?>"></a>
<a href="<?=$ClassGoods[titleurl]?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="<?=$ClassGoods[title]?>" target="_blank" class="lb_bt chao"><?=$ClassGoods[title]?></a>
<p class="chao2"><?=$ClassGoods[smalltext]?>...</p>
<?php
}
//显示1条
?>
</div>
<?php
$bqno=0;
$ResultG = sys_ReturnEcmsLoopBq($IndexClass[classid],'1,6',0,0,'','newstime DESC');
while($ClassGoods=$empire->fetch($ResultG)){
$bqsr=sys_ReturnEcmsLoopStext($ResultG);
$bqsr=sys_ReturnEcmsLoopStext($ClassGoods);
$bqno++;
?>
<div class="lb_5 lb_6 chao">
<a href="<?=$bqsr['classurl']?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" target="_blank" title="<?=$class_r[$IndexClass[classid]][classname]?>" class="lb_lm"><?=$class_r[$IndexClass[classid]][classname]?></a>
<a href="<?=$ClassGoods[titleurl]?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="<?=$ClassGoods[title]?>" target="_blank" class="lb_bt"><?=$ClassGoods[title]?></a>
<time><?=date('m-d',$ClassGoods[newstime])?></time>
</div>
<?php
}
//显示6条
?>
</div>
</div>
</div>
<!-- 热门排行 -->
<div class="r_hot fr">
<div class="head head1"><h4 class="f16">热门排序</h4><span></span></div>
<ul class="lm_hot sideMen bj_mt20">
<?php
$bqno=0;
$ResultG = sys_ReturnEcmsLoopBq($IndexClass[classid],7,0,1,'','rand() DESC');
while($ClassGoods=$empire->fetch($ResultG)){
$bqsr=sys_ReturnEcmsLoopStext($ResultG);
$bqsr=sys_ReturnEcmsLoopStext($ClassGoods);
$bqno++;
?>
<?php //加入php代码
if ($bqno==1){ //指定第一条信息
$class = "on"; //第一条信息的样式
}
else{ //其它信息
$class = ""; //其它信息的样式
}
?>
<li class="lb_w1 <?=$class?>">
<a href="<?=$ClassGoods[titleurl]?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="<?=$ClassGoods[title]?>" target="_blank" class="lb_wimg"><em class="icon"></em></a>
<div class="lb_nr">
<span><?=$bqno?></span>
<a href="<?=$ClassGoods[titleurl]?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="<?=$ClassGoods[title]?>" target="_blank" class="lb_bt chao2"><?=$ClassGoods[title]?></a>
<a href="<?=$bqsr['classurl']?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" target="_blank" title="<?=$bqsr['classname']?>" class="lb_lm"><?=$bqsr['classname']?></a>
</div>
</li>
<?php
}
//显示7条
?>
</ul>
</div>
<!-- 热门排行 -->
<div class="clear"></div>
</div>
<?
}
?>
<!-- 循环结束 -->
其中下边这一段:
<div class="lb_5 lb_6 chao">
<a href="<?=$bqsr['classurl']?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" target="_blank" title="<?=$class_r[$IndexClass[classid]][classname]?>" class="lb_lm"><?=$class_r[$IndexClass[classid]][classname]?></a>
<a href="<?=$ClassGoods[titleurl]?>" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="<?=$ClassGoods[title]?>" target="_blank" class="lb_bt"><?=$ClassGoods[title]?></a>
<time><?=date('m-d',$ClassGoods[newstime])?></time>
</div>
解释:
<?=$class_r[$IndexClass[classid]][classname]?>
为大栏目名称
<?=$class_r[$ClassGoods[classid]][classname]?>
为信息所属的最终子栏目名称
<?=$bqsr[classname]?>
显示为栏目别名
1.本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:115904045@qq.com,我们将第一时间处理!
2.资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持
3.所有资源仅限于参考和学习,版权归原作者所有,更多请阅读网站声明。