浏览代码

搜索调整

tags/6.5.6
tianya 5 天前
父节点
当前提交
e90fea2f42
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. +4
    -1
      src/system/archive/searchview.class.php
  2. +4
    -1
      src/theme/dedebiz/widget_search.htm

+ 4
- 1
src/system/archive/searchview.class.php 查看文件

@@ -207,6 +207,9 @@ class SearchView
*/ */
function GetKeywordSql() function GetKeywordSql()
{ {
if ($this->Keywords == '') {
return '1=2';
}
$ks = explode(' ', $this->Keywords); $ks = explode(' ', $this->Keywords);
$kwsql = ''; $kwsql = '';
$kwsqls = array(); $kwsqls = array();
@@ -354,7 +357,7 @@ class SearchView
$this->AddTable = "#@__archives"; $this->AddTable = "#@__archives";
} }
$cquery = "SELECT * FROM `{$this->AddTable}` arc WHERE ".$this->AddSql; $cquery = "SELECT * FROM `{$this->AddTable}` arc WHERE ".$this->AddSql;
//var_dump($cquery);
// var_dump($cquery);
$hascode = md5($cquery); $hascode = md5($cquery);
$row = $this->dsql->GetOne("SELECT * FROM `#@__arccache` WHERE `md5hash`='".$hascode."' "); $row = $this->dsql->GetOne("SELECT * FROM `#@__arccache` WHERE `md5hash`='".$hascode."' ");
$uptime = time(); $uptime = time();


+ 4
- 1
src/theme/dedebiz/widget_search.htm 查看文件

@@ -2,7 +2,10 @@
<form class="search" name="formsearch" action="{dede:global.cfg_phpurl/}/search.php"> <form class="search" name="formsearch" action="{dede:global.cfg_phpurl/}/search.php">
<input type="hidden" name="kwtype" value="0"> <input type="hidden" name="kwtype" value="0">
<div class="input-group"> <div class="input-group">
<input name="q" type="text" class="form-control" placeholder="请输入关键词">
<input name="q" type="text" class="form-control" value="{dede:global name='keyword' function='RemoveXSS(@me)'/}" placeholder="请输入关键词">
<a class="btn bg-transparent" style="margin-left: -40px; z-index: 100;" href="{dede:global.cfg_phpurl/}/search.php">
<i class="fa fa-times"></i>
</a>
<div class="input-group-append"><button type="submit" class="btn btn-success"><i class="fa fa-search"></i></button></div> <div class="input-group-append"><button type="submit" class="btn btn-success"><i class="fa fa-search"></i></button></div>
</div> </div>
</form> </form>

正在加载...
取消
保存