国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 織夢DEDE > 正文

織夢搜索指定多個欄目的文檔

2024-07-12 08:59:57
字體:
來源:轉載
供稿:網友

在搜索框表單里加個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).") ";
}

完成


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 台山市| 辽源市| 开阳县| 桃江县| 麻栗坡县| 鲁甸县| 清流县| 铁岭县| 石泉县| 长乐市| 桑日县| 额敏县| 新乡县| 内黄县| 尚义县| 仪征市| 上林县| 荥经县| 江孜县| 西峡县| 铁力市| 舒兰市| 霍邱县| 英超| 达孜县| 安泽县| 泽普县| 南汇区| 乌兰县| 泗水县| 云南省| 涪陵区| 镇远县| 康马县| 西昌市| 乌兰察布市| 东丽区| 万安县| 洛川县| 平和县| 南岸区|