帝国CMS灵动标签循环子栏目数据-同时调用点击排行及最新信息


avatar
pcwnas 2023-04-21 174

帝国CMS灵动标签循环子栏目数据,同时调用点击排行及最新信息,当然也可以是其它两种信息调用,如下图为例:

如上图所示,左边调用点击排行,右边调用最新信息。代码如下:

<divclass="intabbk"id="shtree1"><h3></h3><spanclass="more"><ahref="[!---news.url--]list-1-0.html"target="_blank">更多>></a></span><divid="tab-hd"class="deep-hd">[showclasstemp]1,13,0,0[/showclasstemp]</div><divid="tab-bd"class="deep-bd">[e:loop={"selectclassid,classname,classpathfrom`[!db.pre!]enewsclass`wherebclassid='1'orderbymyorderasc",7,24,0}]<divclass="dcon"><divclass="topl"><divclass="top10"><b>销售排行</b>TOP10</div><?php//这里是取得该分类下的有图片的最新数据$newbook1=$empire->query("selecttitle,titlepic,titleurl,keyboard,newstime,groupid,tprice,price,classid,newspath,filename,idfromphome_ecms_shopwhereclassid=".$bqr[classid]."orderbyonclickdesclimit6");while($r=$empire->fetch($newbook1)){$commbookurl=sys_ReturnBqTitleLink($commbook1);?><dl><dt><ahref="<?=sys_ReturnBqTitleLink($r)?>"target="_blank"><imgsrc="<?=$r[titlepic]?>"width="60"height="60"/></a></dt><dd><ahref="<?=sys_ReturnBqTitleLink($r)?>"target="_blank"><?=$r[title]?></a></dd><dd><spanclass="price">市价:<?=$r[tprice]?></span></dd><dd><spanclass="priceb">售价:<?=$r[price]?></span></dd></dl><?php}?><divclass="go"><ahref="[!---news.url--]list-1-0.html"target="_blank">进入进口食品>></a></div></div><divclass="goodsbk"><ulclass="goods_list"><?php$newbook=$empire->query("selecttitle,titlepic,titleurl,keyboard,newstime,groupid,tprice,price,classid,newspath,filename,idfromphome_ecms_shopwhereclassid=".$bqr[classid]."orderbynewstimedesclimit8");while($r=$empire->fetch($newbook)){?><li><divclass="pic_wrap"><ahref="<?=sys_ReturnBqTitleLink($r)?>"target="_blank"><imgalt="<?=$r[title]?>"src="<?=$r[titlepic]?>"></a></div><divclass="price_wrap"><pclass="price"><span>¥</span><?=$r[price]?></p></div><divclass="title_wrap"><atitle="<?=$r[title]?>"href="<?=sys_ReturnBqTitleLink($r)?>"target="_blank"><?=$r[title]?></a></div></li><?php}?></ul></div></div>[/e:loop]</div>