带标签(关键字词)的列表结果

$titlepic='';
$classid=$r[classid]; //获取栏目id
$tbname=$class_r[$classid][tbname];//获取数据表
$fr=$empire->fetch1("select infotags from {$dbtbpre}ecms_".$tbname."_data_{$r[stb]} where id='$r[id]'");//查询副表下的infotags字段
$tag1=''.$fr[infotags].'';
$r_tag=explode(",",$tag1);  
for($i=0;$i<count($r_tag);$i++)
        {
             if($r_tag[$i])
                {
                        $tagslink=$public_r[newsurl]."e/tags/?tagname=".$r_tag[$i]."&tempid=8";//链接
                        $tags.="<a href='$tagslink' target='_blank'>".$r_tag[$i]."</a> ";
                }
        }
if($r[titlepic])
{
$titlepic=' <span class="blogpic imgscale"><i><a href="[!--this.classlink--]" target="_blank">'.$class_r[$r[classid]]['classname'].'</a></i><a href="[!--titleurl--]" title="[!--title--]"><img src="[!--titlepic--]" alt="[!--title--]"></a></span>';
}
$listtemp='
        <li>
          <h3 class="blogtitle"><a href="[!--titleurl--]" target="_blank">[!--title--]</a></h3>
          '.$titlepic.'
          <p class="blogtext">[!--smalltext--] </p>
          <p class="bloginfo"><i class="avatar"><script src="[!--news.url--]d/js/acmsd/thea6.js"></script></i><span>[!--writer--]</span><span>[!--newstime--]</span><span>【<a href="[!--this.classlink--]" target="_blank">'.$class_r[$r[classid]]['classname'].'</a>】</span><span>'.$tags.'</span></p>
          <a href="[!--titleurl--]" class="viewmore">阅读更多</a> </li>
';