在搜索框表單里加個typeid提交過去
1 2 3 | <form name="formsearch" action="/plus/search.php"> <input type="hidden" name="typeid" value="1,2,3"> </form> |
在/plus/search.php 找到
$typeid = (isset($typeid) && is_numeric($typeid)) ? $typeid : 0;
注銷或者刪除它
繼續(xù)找到
$typeid = intval($typeid);
注銷或者刪除它
最后打開 \include\arc.searchview.class.php 找到
$ksqls[] = " typeid IN (".GetSonIds($this->TypeID).") ";
改成
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | //指定了多個欄目時 if( preg_match('#,#', $this->TypeID) ) { $typeids = explode(',', $this->TypeID); foreach($typeids as $ttid) { $typeidss[] = GetSonIds($ttid); } $typeidStr = join(',', $typeidss); $typeidss = explode(',', $typeidStr); $typeidssok = array_unique($typeidss); $typeid = join(',', $typeidssok); $ksqls[] = " arc.typeid IN ($typeid) "; } else { $ksqls[] = " arc.typeid IN (".GetSonIds($this->TypeID).") "; } |
完成
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時內(nèi)刪除!謝謝!
轉(zhuǎn)載請注明: 織夢搜索指定多個欄目的文檔