孟垂博自媒体博客|只做精品

首页 > 网站教程 > 帝国cms  >  帝国cms7.5取得一级栏目栏目的二级栏目信息

<?php

$bclassid=$GLOBALS[navclassid]; //取得本栏目id

//取得本栏目下的子栏目

?>

[e:loop={"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$bclassid' order by `classid` desc ",7,24,0}]

<?php

//这里是取得该分类下的有图片的最新数据

$commbook=$empire->fetch1("select title,titlepic,smalltext,titleurl,keyboard,groupid,classid,newspath,filename,id from phome_ecms_news where classid = ".$bqr[classid]." and titlepic!='' order by newstime desc limit 1");

$commbookurl=sys_ReturnBqTitleLink($commbook);

?>

  <div class="content2">

<div class="content2_left">

<div class="title2">

<p class="p1"><?=$bqr[classname]?></p>

<p class="p2">

<a href="<?=$public_r[newsurl].$bqr[classpath]?>" target="_blank" title="<?=$bqr[classname]?>">更多</a>

</p>

</div>

<div class="new2" style="background:none;">

<div class="new2_L">

<a href="<?=$commbookurl?>" title="<?=$commbook[title]?>" target="_blank"><img src="<?=$commbook[titlepic]?>" title="<?=$commbook[title]?>"><p><?=esub($commbook[title],36)?></p></a>

</div>

<div class="new2_R">

<ul>

<h3><a href="<?=$commbookurl?>" title="<?=$commbook[title]?>" target="_blank" style="" ><?=esub($commbook[title],36)?></a></h3>

 

    <?php

//取得该分类下的最新数据

    $newbook=$empire->query("select title,titlepic,smalltext,titleurl,keyboard,newstime,groupid,classid,newspath,filename,id from phome_ecms_news  where classid =".$bqr[classid]." order by newstime desc limit 6");

    

    while($r=$empire->fetch($newbook)) {

    ?>

    <li><a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>"><?=esub($r[title],36)?></a></li>

    <?php

     }

     //显示5条

    ?> 

</ul>

</div>

</div>

</div>

 

<div class="content2_right">

<div class="right2">

<div class="title22">

<p class="p1"><?=$bqr[classname]?>排行</p>

</div>

<div class="new24">

<ul>

<?php

//取得该分类下的最新数据

    $newbook=$empire->query("select title,titlepic,smalltext,titleurl,keyboard,newstime,groupid,classid,newspath,filename,id from phome_ecms_news  where classid =".$bqr[classid]." order by newstime desc limit 7");

    

    while($r=$empire->fetch($newbook)) {

    ?>

    <li><a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>"><?=esub($r[title],36)?></a></li>

    <?php

     }

     //显示5条

    ?> 

</ul>

</div>

</div>

</div>

</div>

<div class="blank20"></div>

  [/e:loop]

3.jpg

    分享:

    微信

    相关文章

    发表评论