代码如下:
{loop $infos $r}
<?php
$i="n".$r[id];
$k=$r[id];
?>
<div class="rank_list">
<h3><img src="{$r[img]}" width="21" height="21" /> {$r[title]}</h3>
<ul>
{get sql="select c.url,c.title,c.style,m.n$r[id] from phpcms_content c,phpcms_mood_data m where c.contentid=m.contentid and m.moodid='$moodid' and m.n$r[id]>0 order by m.n$r[id] desc" rows="6"}
<li>{if $r[$i]}<span class="right">({$r[$i]})</span>{/if}<a href="{$r[url]}" target="_blank"><font>{$r[title]}</font></a></li>
{/get}
</ul>
</div>
{if $k%2==0}
<div class="b12"></div>
{/if}
{/loop}
模板位于:mood/rank.html