$nsmalltext=$r[smalltext]; $ntext=strip_tags($nsmalltext);//去除内容简介里的HTML标签 $newtext=esub($ntext,100,'...') ;//限制100字 $keyboard=$r[keyboard]; $r_tag=explode(",",$keyboard); $tempid=1;//这里是搜索模板ID for($i=0;$i<count($r_tag);$i++) { if($r_tag[$i]) { $tagslink=$public_r[newsurl]."e/search/?searchget=1&tbname=$tbname&tempid=$tempid&show=keyboard&keyboard=".$r_tag[$i];//链接 $tags.="<a href='$tagslink' target='_blank'>".$r_tag[$i]."</a> "; } } $listtemp='<div class=""> <h3 class=""> <a href="/e/action/ShowInfo.php?classid=30&id=559" target="_blank" title="[!--oldtitle--]">[!--title--]</a></h3> <p title="内容简介">'.$newtext.'...</p> <p class=""><span>标签:</span>'.$tags.'<span class="">[!--newstime--]</span> </p> </div>';
$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];//链接 $tags.="<a href='$tagslink' target='_blank'>".$r_tag[$i]."</a> "; } }if(empty($fr[infotags])){$tags="无";}$listtemp=' <p><a class="" href="/e/action/ShowInfo.php?classid=30&id=559" target="_blank">[!--title--]</a></p><p class=""> [!--smalltext--] <a href="/e/action/ShowInfo.php?classid=30&id=559">[详细]</a></p><div class="">标签:'.$tags.'<p><span>[!--newstime--]</span><span><script src=/e/public/ViewClick?classid=30&id=559&addclick=1></script>人浏览</span><span>来自互联网</span></p></div>';