帝国cms搜索飘红?很简单,无需修改代码!~~

搜索飘红?很简单,无需修改代码!~~

$searchid = (int)$_GET['searchid'];
$search=$empire->fetch1("select keyboard from {$dbtbpre}enewssearch where searchid='$searchid' limit 1");
$keyboard = $search['keyboard'];
$r[title]=str_replace($keyboard,"<font color='red'>$keyboard</font>",$r[title]);
$smalltext=str_replace($keyboard,"<font color='red'>$keyboard</font>",$r[smalltext]);
$listtemp='
<li>
<div class="media media-box media-x">
        <a href="[!--titleurl--]" title="[!--oldtitle--]" class="float-left" target="_blank">
                <img src="[!--titlepic--]" class="img-responsive" alt="[!--oldtitle--]">
        </a>
        <div class="media-body">
                <div class="media-box-title"><span>[!--no.num--].</span> <a class="fl" href="[!--this.classlink--]" target="_blank">【[!--this.classname--]】</a> <a href="[!--titleurl--]" title="[!--oldtitle--]" target="_blank">[!--title--]</a></div>
                <div class="media-box-meta"><span><i class="layui-icon layui-icon-face-smile"></i> [!--newstime--]</span><span class="author"><i class="layui-icon layui-icon-user"></i> [!--username--]</span><span class="pv"><i class="layui-icon layui-icon-reply-fill"></i> 阅读([!--onclick--])</span><span class="post-like"><i class="layui-icon layui-icon-praise"></i> 赞([!--diggtop--])</span></div>
                <div class="media-box-note">'.$smalltext.'</div>
        </div>
        
</div>
</li>
';
最后修改:2018 年 10 月 30 日 03 : 43 PM
如果觉得我的文章对你有用,请随意赞赏

发表评论