帝国cms子栏目循环灵动标签写法
2018-07-06 站长 站长日志
[e:loop={"select classid,classname,islast from {$dbtbpre}enewsclass where bclassid='3' and showclass=0 order by myorder,classid ASC limit 11",0,24,0}] <?php $classurl=sys_ReturnBqClassname($bqr,9);//取得栏目地址 ?> <li><a href="<?=$classurl?>" target="_blank" class="a"><span><?=$bqr[classname]?></span></a> <?php if(!$bqr[islast]) //判断是否终极栏目 { ?> <ul> <?php //取得栏目下的子栏目 $newsclass=$empire->query("select classid,classname from ".$dbtbpre."enewsclass where bclassid=".$bqr[classid]." order by myorder,classid desc limit 11"); while($classr=$empire->fetch($newsclass)) { $classrurl=sys_ReturnBqClassname($classr,9); //取得子栏目地址 ?> <li class="b"><a href="<?=$classrurl?>"><?=$classr[classname]?></a></li> <?php } ?> </ul> <?php } ?> </li> [/e:loop] |
或者
<?php $ecms_bq_sql=sys_ReturnEcmsLoopBq("select * from [!db.pre!]enewsclass where bclassid=58 order by myorder limit 7",14,24,0); $bqno=0; while($bqr=$empire->fetch($ecms_bq_sql)) { $bqsr=sys_ReturnEcmsLoopStext($bqr); $bqno++; ?> <li> <a href='<?=$public_r[newsurl]?><?=$bqr[classpath]?>/'><?=sub($bqr[classname],0,54,false)?></a> <p> <?php $ecms_bq_sql2=sys_ReturnEcmsLoopBq("select * from [!db.pre!]enewsclass where bclassid=$bqr[classid] order by myorder limit 8",14,24,0); $bqno2=0; while($bqr2=$empire->fetch($ecms_bq_sql2)) { $bqsr2=sys_ReturnEcmsLoopStext($bqr2); $bqno2++; ?> <a href="<?=$public_r[newsurl]?><?=$bqr2[classpath]?>/" ><?=sub($bqr2[classname],0,54,false)?></a> <?php } ?></p></li> <?php } ?> |