原帖由 brucech 于 2010-12-16 10:59:34 发表 有三级栏目的话
在1级栏目调用不了2级所有信息.
1级栏目-2级栏目-3级栏目(终极栏目) |
三级栏目
论坛里复制的
<ul> <?php if( $class_r[$GLOBALS[navclassid]][bclassid]==0) { ?> [e:loop={"select * from phome_enewsclass where classid='$GLOBALS[navclassid]'",10,24,1}] <li><a href="/<?=$bqr[classpath]?>"><?=$bqr[classname]?></a>
<ul> <?php $ecms_bq_sql1=sys_ReturnEcmsLoopBq("select * from phome_enewsclass where bclassid in($bqr[classid])",10,24,0); $bqno1=0; while($bqr1=$empire->fetch($ecms_bq_sql1)) { $bqsr1=sys_ReturnEcmsLoopStext($bqr1); $bqno++; ?> <li> <a href="/<?=$bqr1[classpath]?>"><?=$bqr1[classname]?></a> <ul> <?php $ecms_bq_sql2=sys_ReturnEcmsLoopBq("select * from phome_enewsclass where bclassid in($bqr1[classid])",10,24,0); $bqno2=0; while($bqr2=$empire->fetch($ecms_bq_sql2)) { $bqsr2=sys_ReturnEcmsLoopStext($bqr2); $bqno2++; ?> <li> <a href="/<?=$bqr2[classpath]?>"><?=$bqr2[classname]?></a></li> <?php } ?> </ul> </li>
<?php } ?> </ul> </li> [/e:loop] <?php } else { ?> [e:loop={"select * from phome_enewsclass where classid='$GLOBALS[navclassid]'",10,24,1}]
<ul> <?php $ecms_bq_sql1=sys_ReturnEcmsLoopBq("select * from phome_enewsclass where bclassid in($bqr[bclassid])",10,24,0); $bqno1=0; while($bqr1=$empire->fetch($ecms_bq_sql1)) { $bqsr1=sys_ReturnEcmsLoopStext($bqr1); $bqno++; ?> <li> <a href="/<?=$bqr1[classpath]?>"><?=$bqr1[classname]?></a> <ul> <?php $ecms_bq_sql2=sys_ReturnEcmsLoopBq("select * from phome_enewsclass where bclassid in($bqr1[classid])",10,24,0); $bqno2=0; while($bqr2=$empire->fetch($ecms_bq_sql2)) { $bqsr2=sys_ReturnEcmsLoopStext($bqr2); $bqno2++; ?> <li> <a href="/<?=$bqr2[classpath]?>"><?=$bqr2[classname]?></a></li> <?php } ?> </ul> </li>
<?php } ?> </ul> [/e:loop]
<?php } ?>
</ul>
|