--------------------------------------------------------------------------------------------------------------- 方法3、tags标签实现多颜色样式 <?php $ecms_bq_sql=sys_ReturnEcmsLoopBq("select * from [!db.pre!]enewstagsdata where classid='$navinfor[classid]' and id='$navinfor[id]' order by tagid",10,24,0); $bqno=0; while($bqr=$empire->fetch($ecms_bq_sql)) { $bqsr=sys_ReturnEcmsLoopStext($bqr); $bqno++; ?>
<?php $ecms_bq_sql2=sys_ReturnEcmsLoopBq("select * from [!db.pre!]enewstags where tagid='$bqr[tagid]' order by tagid",1,24,0); $bqno2=0; while($bqr2=$empire->fetch($ecms_bq_sql2)) { $bqsr2=sys_ReturnEcmsLoopStext($bqr2); $bqno2++; ?>
[e:loop={"select a.*,b.* from [!db.pre!]enewstags a LEFT JOIN [!db.pre!]enewstagsdata b ON a.tagid=b.tagid where b.classid='$navinfor[classid]' and b.id='$navinfor[id]' group by b.tagid order by a.num desc limit 100",0,24,0}] <a href='<?=$public_r['newsurl']?>e/tags/?tagname=<?=$bqr['tagname']?>' title='<?=$bqr['num']?>个'><?=$bqr['tagname']?>(<?=$bqr['num']?>)</a> [/e:loop]
--------------------------------------------------------------------------------------------------------------- 方法5、 <?php $tsql=$empire->query("select * from {$dbtbpre}enewstagsdata where id='$navinfor[id]'order by id asc limit 7"); while($tr=$empire->fetch($tsql)){ $tag=$empire->fetch1("select * from {$dbtbpre}enewstags where tagid='$tr[tagid]' limit 1"); ?> <span><a class="tag" href="<?=$public_r[newsurl]?>e/tags/?tagname=<?=$tag['tagname']?>"><?=$tag[tagname]?></a></span> <?}?>