百度 | 神马 | 搜狗 | 技术文档 | 学习资料分享 - 记录帝国CMS及运维技术的点点滴滴
你的位置:首页 > 帝国cms技术 » 正文

智能标签实现循环子列数据——实现循环子列数据标签的效果(LISTSONCLASS)

发布时间:2020-11-07

作品分类:灵动标签   循环子栏目

<?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);
?>
   >
     

<?=$bqr[classname]?>

">更多>>                    
           
">" width="108px" height="85px" />
           
"><?=$commbook[title]?><?=esub($commbook[smalltext],84)?>
         
               <?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)) {     ?>     
  • " title="<?=$r[title]?>">·<?=$r[title]?><?=date('Y-m-d',$r[newstime])?>
  •     <?php      }      //显示5条     ?>                      
             
      
      [/e:loop]

    0_1281338684R78k.gif

    相关内容推荐:

    Top