首页 > 学习 文章正文

帝国cms灵动标签实现循环子栏目数据

学习 2022-04-22 23:38:45
后台-插件-广告管理-内容页头部广告(手机)

<div class="sae_gl">
<?php
$bclassid=$GLOBALS[navclassid]; //取得本栏目id
//取得本栏目下的子栏目
?>
[e:loop={"select classid, classname, classpath from `[!db.pr

<div class="sae_gl">
<?php
$bclassid=$GLOBALS[navclassid]; //取得本栏目id
//取得本栏目下的子栏目
?>
[e:loop={"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$bclassid' order by `classid` desc ",7,24,0}]
<?php

//这里是取得该分类下的有图片的最新数据
$commbook=$empire->fetch1("select title,titlepic,smalltext,titleurl,keyboard,groupid,classid,newspath,filename,id from phome_ecms_news where classid = ".$bqr[classid]." and titlepic!='' order by newstime desc limit 1");
$commbookurl=sys_ReturnBqTitleLink($commbook);
?>
  <div class="gl_01" <?php $i++;if($i%2==0){echo 'id="gl_01"';} ?> >
     <ol class="gl_c"><h3><?=$bqr[classname]?></h3><a href="<?=$public_r[newsurl].$bqr[classpath]?>">更多>></a></ol>
         <div class="yd">
         <dl>
           <dt><a href="<?=$commbookurl?>"><img src="<?=$commbook[titlepic]?>" width="108px" height="85px" /></a></dt>
           <dd><b><a href="<?=$commbookurl?>"><?=$commbook[title]?></a></b><a class="uus" href="#"><?=esub($commbook[smalltext],84)?></a></dd>
         </dl>
         <ol class="ga_ic">

     <?php
//取得该分类下的最新数据

    $newbook=$empire->query("select title,titlepic,smalltext,titleurl,keyboard,newstime,groupid,classid,newspath,filename,id from phome_ecms_news  where classid =".$bqr[classid]." order by newstime desc limit 5");
   
    while($r=$empire->fetch($newbook)) {
    ?>
    <li><a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>">·<?=$r[title]?></a><span class="riq"><?=date('Y-m-d',$r[newstime])?></span></li>
    <?php
     }
     //显示5条
    ?> 
         </ol>
         </div>
         <div class="bj_t"></div>
  </div>
  [/e:loop]
</div>

全是图片的 
<?php
$bclassid=$GLOBALS[navclassid]; //取得本栏目id
//取得本栏目下的子栏目
?>
[e:loop={"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$bclassid' order by `classid` asc ",7,24,0}]
<?php
//这里是取得该分类下的有图片的最新数据
$commbook=$empire->fetch1("select title,titlepic,smalltext,titleurl,keyboard,groupid,classid,newspath,filename,id from phome_ecms_news where classid = ".$bqr[classid]." and titlepic!='' order by newstime desc limit 1");
$commbookurl=sys_ReturnBqTitleLink($commbook);
?>
    <div class="box whitebg pics-fm">
        
    <ul id="tab">
      <li class="tab-current"><a href="<?=$public_r[newsurl].$bqr[classpath]?>/" title="更多<?=$bqr[classname]?>"><?=$bqr[classname]?></a></li>
    </ul>
    <div class="plr20">
      <section>
        <div class="pic-list-img">
          <ul>
               <?php
//取得该分类下的最新数据
    $newbook=$empire->query("select title,titlepic,smalltext,titleurl,keyboard,newstime,groupid,classid,newspath,filename,id from phome_ecms_news  where classid =".$bqr[classid]." order by newstime desc limit 10");
   
    while($r=$empire->fetch($newbook)) {
    ?>     
              
              <li><a href="<?=sys_ReturnBqTitleLink($r)?>"><i><img src="<?=$r[titlepic]?$r[titlepic]:'/skin/ecms12/images/notimg.gif'?>"></i><span><?=$r[title]?></span></a></li>
              <?php
     }
     //显示10条
    ?> 
            
            
            </ul>
        </div>
        <span class="tab-a-more"><a href="<?=$public_r[newsurl].$bqr[classpath]?>/" title="更多创<?=$bqr[classname]?>"><i></i><i></i><i></i></a></span></section>
    </div>
  </div>
  <!-- pics end-->
  <div class="clear blank"></div>
    [/e:loop]
    
 

后台-插件-广告管理-内容页尾部广告(手机)

标签: 帝国CMS 

帝国cms灵动标签实现循环子栏目数据Copyright @ 2022 All Rights Reserved. 版权所有 备案号:辽ICP备10018320号-18 帝国CMS强力驱动 站长微信:jiangeseo