灵动标签实现循环子栏目数据——实现 循环子栏目数据标签 (LISTSONCLASS)的效果

作者: | 时间:2021-08-09 14:29:39

<divclass="sae_gl"> <?php $bclassid=$GLOBALS[navclassid];//取得本栏目id //取得本栏目下的子栏目 ?> [e:loop={"selectclassid,classname,classpathfrom`[!db.pre!]enewsclass`wherebclassid='$bclassid'orderby`classid`desc",7,24,0}] <?php //这里是取得该分类下的有图片的最新数据 $commbook=$empire->fetch1("selecttitle,titlepic,smalltext,titleurl,keyboard,groupid,classid,newspath,filename,idfromphome_ecms_newswhereclassid=".$bqr[classid]."andtitlepic!=''orderbynewstimedesclimit1"); $commbookurl=sys_ReturnBqTitleLink($commbook); ?> <divclass="gl_01"<?php$i++;if($i%2==0){echo'id="gl_01"';}?>> <olclass="gl_c"><h3><?=$bqr[classname]?></h3><ahref="<?=$public_r[newsurl].$bqr[classpath]?>">更多>></a></ol> <divclass="yd"> <dl> <dt><ahref="<?=$commbookurl?>"><imgsrc="<?=$commbook[titlepic]?>"width="108px"height="85px"/></a></dt> <dd><b><ahref="<?=$commbookurl?>"><?=$commbook[title]?></a></b><aclass="uus"href="#"><?=esub($commbook[smalltext],84)?></a></dd> </dl> <olclass="ga_ic"> <?php //取得该分类下的最新数据 $newbook=$empire->query("selecttitle,titlepic,smalltext,titleurl,keyboard,newstime,groupid,classid,newspath,filename,idfromphome_ecms_newswhereclassid=".$bqr[classid]."orderbynewstimedesclimit5"); while($r=$empire->fetch($newbook)){ ?> <li><ahref="<?=sys_ReturnBqTitleLink($r)?>"title="<?=$r[title]?>">·<?=$r[title]?></a><spanclass="riq"><?=date('Y-m-d',$r[newstime])?></span></li> <?php } //显示5条 ?> </ol> </div> <divclass="bj_t"></div> </div> [/e:loop] </div>灵动标签实现循环子栏目数据——实现 循环子栏目数据标签 (LISTSONCLASS)的效果

相关新闻