帝国cms 通过栏目获取某个栏目的详情
当是某个栏目的时候,获取另外一个栏目下第一篇文章的详情,否则获取当前栏目下第一篇文章的详情
<?php $classid = $GLOBALS['navclassid']; if($classid == 1){ ?> [e:loop={"select * from phome_ecms_news where classid='2' limit 1",1,24,0}] <?php $fr=$empire->fetch1("select newstext from phome_ecms_news_data_{$bqr[stb]} where id='$bqr[id]'"); ?> <p><?=$fr[newstext]?></p> [/e:loop] <?php }else{ ?> [e:loop={"select * from phome_ecms_news where classid='$GLOBALS[navclassid]' limit 1",1,24,0}] <?php $fr=$empire->fetch1("select newstext from phome_ecms_news_data_{$bqr[stb]} where id='$bqr[id]'"); ?> <p><?=$fr[newstext]?></p> [/e:loop] <?php } ?>