帝国cms封面循环栏目及信息

<?php
$fr=$empire->fetch1("select * from {$dbtbpre}enewsclass where bclassid=$navclassid order by classid  limit 1");
?>
    
	<div class="content">
[e:loop={"select classid,classname,islast,sonclass,classimg from {$dbtbpre}enewsclass where bclassid=$fr[classid] order by myorder,classid ASC limit 20",0,24,0}]
        <?php
        $classurl=sys_ReturnBqClassname($bqr,9); //取得栏目地址
        $tbname=$class_r[$bqr[classid]][tbname]; //取得表名
        $navshow=ReturnClassAddField($bqr[classid],'nav'); //取得栏目自定义字段navshow值?>
		<div class="items">
			<div class="pic">
				<img src="<?=$bqr[classimg]?$bqr[classimg]:'/e/data/images/notimg.gif'?>" >
			</div>
			<div class="text-box p_r">
				<h3><a href="<?=$classurl?>" target="_blank" class="di_bl"><?=$bqr[classname]?></a></h3>
                <?php
            $numinfo=$empire->gettotal("select count(*) as total from ".$dbtbpre."ecms_".$tbname." where classid=".$bqr[classid]); //统计子栏目信息
            //判断终极栏目下是否有信息Start 
            if($numinfo){ 
            echo '<div class="txt">'; 
             //循环栏目下的信息Start
             $newsinfo=$empire->query("select title,id,classid,newspath,filename,groupid,titleurl from ".$dbtbpre."ecms_".$tbname." where classid=".$bqr[classid]." order by newstime desc limit 10"); 
              while($infor=$empire->fetch($newsinfo)) { 
              $titleurl=sys_ReturnBqTitleLink($infor); 
               ?>
        <a href="<?=$titleurl?>" class="di_bl"><?=$infor[title]?> &gt;</a>
        <?php 
         }
         //循环栏目下的信息End
          echo '</div>'; 
          }
           ?>                
			</div>
		</div>
 		[/e:loop]
	</div>
</div>

适用于封面页,循环栏目及信息

部分内容来源于网络,如有侵权请联系删除::狂人日记 » 帝国cms封面循环栏目及信息

赞 (0) 打赏

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏