帝国cms封面模板调用当前栏目下的子栏目名称及子栏目下的信息展示/二级分类
时间:2024年04月24日
/来源:网络
/编辑:佚名
帝国cms封面模板调用当前栏目下的子栏目名称及子栏目下的信息展示代码:
<!-- 栏目1 -->
[e:loop={"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$GLOBALS[navclassid]' order by classid asc ",7,24,0}]
<div class="lm b_top main louti">
<div class="lm_l fl">
<!-- 栏目标题 -->
<div class="lm_head bj_mt10">
<a href="<?=$public_r[newsurl].$bqr[classpath]?>" target="_blank" title="<?=$bqr[classname]?>" class="head f20 fl"><h4 class="nobold"><?=$bqr[classname]?></h4></a>
<div class="hd fr chao">
<?
$newsclass=$empire->query("select classid,classname from ".$dbtbpre."enewsclass where bclassid=".$bqr[classid]." order by myorder,classid asc");
while($classr=$empire->fetch($newsclass)){
$classurl=sys_ReturnBqClassname($classr,9);
?>
<a href="<?=$classurl?>" class="lm_bt c9"><?=$classr[classname]?></a>
<?}?>
</div>
</div>
<!-- 栏目标题 -->
<div class="lm_nr bj_mt10">
<div class="lm_nr_l fl">
<div class="lm_l_t_r">
<?php
//取得该分类下的最新数据
$newbook=$empire->query("select * from phome_ecms_news where classid =".$bqr[classid]." order by newstime desc limit 1");
while($r=$empire->fetch($newbook)) {
?>
<div class="lb_5">
<a class="lb_l fl" href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>" target="_blank">
<img src="<?=$r[titlepic]?$r[titlepic]:$public_r[newsurl]."e/data/images/notimg.gif"?>" alt="<?=$r[title]?>" />
</a>
<div class="lb_r fr">
<a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>" target="_blank" class="lb_bt chao f16"><?=$r[title]?></a>
<p class="chao2 c9 f12"><?=$r[smalltext]?></p>
<div class="lb_b c9 f12"><time><?=date('m-d',$r[newstime])?></time></div>
</div>
<div class="clear"></div>
</div>
<?php
}
//显示1条
?>
<div class="bj_mt10">
<?php
//取得该分类下的最新数据
$newbook=$empire->query("select * from phome_ecms_news where classid =".$bqr[classid]." order by newstime desc limit 10");
while($r=$empire->fetch($newbook)) {
?>
<a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>" target="_blank" class="chao lb_2"><time><?=date('m-d',$r[newstime])?></time><?=$r[title]?></a>
<?php
}
//显示10条
?>
</div>
</div>
</div>
<div class="lm_nr_r fr">
<div class="head_2 yj_10 bg2">
<h4 class="nobold f18">热门推荐</h4>
</div>
<div class="bj_mt10">
<?php
//取得该分类下的最新数据
$newbook=$empire->query("select * from phome_ecms_news where classid =".$bqr[classid]." order by newstime desc limit 12");
while($r=$empire->fetch($newbook)) {
?>
<a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>" target="_blank" class="chao lb_2"><time><?=date('m-d',$r[newstime])?></time><?=$r[title]?></a>
<?php
}
//显示10条
?>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="lm_r fr">
<!-- 热门排行 -->
<div class="r_hot yj_10 bg2">
<div class="head_1 f18 nobold">
<h4 class="nobold"><em class="iconfont ca"></em>热门排行</h4>
</div>
<div class="hot_nr bj_mt15 sideMen">
<?php
//取得该分类下的最新数据
$newbook=$empire->query("select * from phome_ecms_news where classid =".$bqr[classid]." order by newstime desc limit 10");
while($r=$empire->fetch($newbook)) {
?>
<a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>" target="_blank" class="lb_6">
<span class="chao lb_a f14"><?=$r[title]?></span>
<p class="chao2 c9 f12"><?=$r[smalltext]?></p>
</a>
<?php
}
//显示10条
?>
</div>
</div>
<!-- 热门排行 -->
</div>
</div>
[/e:loop]
<!-- 栏目1 -->
<!-- 栏目1 -->
[e:loop={"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$GLOBALS[navclassid]' order by classid asc ",7,24,0}]
<div class="lm b_top main louti">
<div class="lm_l fl">
<!-- 栏目标题 -->
<div class="lm_head bj_mt10">
<a href="<?=$public_r[newsurl].$bqr[classpath]?>" target="_blank" title="<?=$bqr[classname]?>" class="head f20 fl"><h4 class="nobold"><?=$bqr[classname]?></h4></a>
<div class="hd fr chao">
<?
$newsclass=$empire->query("select classid,classname from ".$dbtbpre."enewsclass where bclassid=".$bqr[classid]." order by myorder,classid asc");
while($classr=$empire->fetch($newsclass)){
$classurl=sys_ReturnBqClassname($classr,9);
?>
<a href="<?=$classurl?>" class="lm_bt c9"><?=$classr[classname]?></a>
<?}?>
</div>
</div>
<!-- 栏目标题 -->
<div class="lm_nr bj_mt10">
<div class="lm_nr_l fl">
<div class="lm_l_t_r">
<?php
//取得该分类下的最新数据
$newbook=$empire->query("select * from phome_ecms_news where classid =".$bqr[classid]." order by newstime desc limit 1");
while($r=$empire->fetch($newbook)) {
?>
<div class="lb_5">
<a class="lb_l fl" href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>" target="_blank">
<img src="<?=$r[titlepic]?$r[titlepic]:$public_r[newsurl]."e/data/images/notimg.gif"?>" alt="<?=$r[title]?>" />
</a>
<div class="lb_r fr">
<a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>" target="_blank" class="lb_bt chao f16"><?=$r[title]?></a>
<p class="chao2 c9 f12"><?=$r[smalltext]?></p>
<div class="lb_b c9 f12"><time><?=date('m-d',$r[newstime])?></time></div>
</div>
<div class="clear"></div>
</div>
<?php
}
//显示1条
?>
<div class="bj_mt10">
<?php
//取得该分类下的最新数据
$newbook=$empire->query("select * from phome_ecms_news where classid =".$bqr[classid]." order by newstime desc limit 10");
while($r=$empire->fetch($newbook)) {
?>
<a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>" target="_blank" class="chao lb_2"><time><?=date('m-d',$r[newstime])?></time><?=$r[title]?></a>
<?php
}
//显示10条
?>
</div>
</div>
</div>
<div class="lm_nr_r fr">
<div class="head_2 yj_10 bg2">
<h4 class="nobold f18">热门推荐</h4>
</div>
<div class="bj_mt10">
<?php
//取得该分类下的最新数据
$newbook=$empire->query("select * from phome_ecms_news where classid =".$bqr[classid]." order by newstime desc limit 12");
while($r=$empire->fetch($newbook)) {
?>
<a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>" target="_blank" class="chao lb_2"><time><?=date('m-d',$r[newstime])?></time><?=$r[title]?></a>
<?php
}
//显示10条
?>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="lm_r fr">
<!-- 热门排行 -->
<div class="r_hot yj_10 bg2">
<div class="head_1 f18 nobold">
<h4 class="nobold"><em class="iconfont ca"></em>热门排行</h4>
</div>
<div class="hot_nr bj_mt15 sideMen">
<?php
//取得该分类下的最新数据
$newbook=$empire->query("select * from phome_ecms_news where classid =".$bqr[classid]." order by newstime desc limit 10");
while($r=$empire->fetch($newbook)) {
?>
<a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>" target="_blank" class="lb_6">
<span class="chao lb_a f14"><?=$r[title]?></span>
<p class="chao2 c9 f12"><?=$r[smalltext]?></p>
</a>
<?php
}
//显示10条
?>
</div>
</div>
<!-- 热门排行 -->
</div>
</div>
[/e:loop]
<!-- 栏目1 -->
新闻资讯 更多
- 【帝国cms教程】帝国cms封面模板调用当前栏目下的子栏目名称及子栏目下的信息展示/二级分类04-24
- 【帝国cms教程】帝国cms修改列表分页默认index及url的方法04-24
- 【帝国cms教程】帝国cms内容页随机调用站点搜索关键词以及搜索关键字统计(和tag一样)灵动方法!04-24
- 【帝国cms教程】帝国cms复选框在列表页list.var中的分割及调用04-23
- 【帝国cms教程】帝国CMS删除清空旧数据让栏目和文章ID从1开始04-23
- 【帝国cms教程】帝国CMS提示Table ‘XX.***_enewspubtemp_2’ doesn’t exist错误解决方法04-23
- 【帝国cms教程】帝国cms灵动标签判断是否有缩略图,如果有就显示,如果没有则不显示04-23
- 【帝国cms教程】帝国cms二次开发之首页灵动标签内及列表页list.var自定义字段计算结果折扣率计算04-23
热门文章
- 178Moban源码谈谈免费源码与收费源码的区别
- 2帝国CMS忘记后台登陆用户名、密码、认证码的解决方法
- 3帝国CMS(EmpireCMS) v7.5后台任意代码执行漏洞及具体修复方法
- 4帝国CMS和WordPress 哪个好?哪个适合建站?
- 5如何解决Discuz的密码错误次数过多请15分钟后登陆的问题
- 6帝国cms灵动标签取得内容和栏目链接地址
- 7emlog pro 注册码“开心”教程(如果有一天,emlog官方版 或者 emlog免费版 跑路了,那用户怎么办?)
- 8帝国cms后台登录出现”您还未登录”怎么解决?
- 9织梦CMS在nginx下设置伪静态方法(附nginx伪静态规则)
- 10帝国cms7.5忘记登录密码 和忘记登录认证码以及多次登录 失败被锁定解决办法