{"id":1767,"date":"2018-06-29T10:48:25","date_gmt":"2018-06-29T02:48:25","guid":{"rendered":"http:\/\/www.baishitou.cn\/?p=1767"},"modified":"2018-06-29T10:54:44","modified_gmt":"2018-06-29T02:54:44","slug":"%e7%bb%87%e6%a2%a6dedecms%e8%81%94%e5%8a%a8%e7%ad%9b%e9%80%89%e4%bc%aa%e9%9d%99%e6%80%81%e7%89%88-%e5%8d%95%e9%93%be%e6%8e%a5%e5%bd%a2%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/1767.html","title":{"rendered":"\u7ec7\u68a6DedeCms\u8054\u52a8\u7b5b\u9009[\u4f2a\u9759\u6001\u7248 – \u5355\u94fe\u63a5\u5f62\u5f0f]"},"content":{"rendered":"

DedeCms\u7ec7\u68a6\u8054\u52a8\u7b5b\u9009[\u4f2a\u9759\u6001\u7248 - \u5355\u94fe\u63a5\u5f62\u5f0f]\uff0c\u7f51\u7ad9\u7528\u7684\u662f\u9759\u6001\uff0c\u7b5b\u9009\u7528\u7684\u662f\u4f2a\u9759\u6001\uff0c\u7b5b\u9009\u7684\u4f2a\u9759\u6001\u5730\u5740\u4ee5\u5b57\u6bb5\u548c\u952e\u503c\u5448\u73b0\uff0c\u8ba9\u7b5b\u9009URL\u4e0e\u9759\u6001\u4fdd\u6301\u4e00\u81f4<\/h2>\n

\u6f14\u793a\u6548\u679c<\/p>\n

\"1-1P20G34639534\"<\/a><\/p>\n

DedeCms\u7684\u7ec7\u68a6\u8054\u52a8\u7b5b\u9009[\u4f2a\u9759\u6001\u7248]\uff0c\u7f51\u7ad9\u7528\u7684\u662f\u9759\u6001\uff0c\u7b5b\u9009\u7528\u7684\u662f\u4f2a\u9759\u6001\uff0c\u7b5b\u9009\u7684\u4f2a\u9759\u6001\u5730\u5740\u4ee5\u5b57\u6bb5\u548c\u952e\u503c\u5448\u73b0\uff0c\u8ba9\u7b5b\u9009URL\u4e0e\u9759\u6001\u4fdd\u6301\u4e00\u81f4\u3002\u5982\uff1a<\/strong><\/p>\n

\u9759\u6001\u680f\u76ee\u9875<\/strong><\/p>\n

http:\/\/www.123.com\/juji\/<\/p>\n

\u9759\u6001\u680f\u76ee\u9875\u5206\u9875<\/strong><\/p>\n

http:\/\/www.123.com\/juji\/list_1_\u00a02.html<\/p>\n

\u4f2a\u9759\u6001\u7b5b\u9009\u9875<\/strong><\/p>\n

http:\/\/www.123.com\/juji\/list_1_\u00a0AREA_\u00a00.html<\/p>\n

\u4f2a\u9759\u6001\u7b5b\u9009\u5206\u9875<\/strong><\/p>\n

http:\/\/www.123.com\/juji\/list_1_\u00a0area_\u00a00_\u00a02.html<\/p>\n

\u3010\u8b66\u544a\u3011<\/strong>
\n\u64cd\u4f5c\u4e4b\u524d\u5148\u5907\u4efd\u4f60\u7684\u7a0b\u5e8f\u8fd92\u4e2a\u6587\u4ef6\u3002
\n\\ include \\ arc.listview.class.php
\n\\ include \\ extend.func.php<\/p>\n

edecms\u7ec7\u68a6\u8054\u52a8\u7b5b\u9009[\u4f2a\u9759\u6001\u7248 - \u5355\u94fe\u63a5\u5f62\u5f0f]\u6253\u5305\u4e0b\u8f7d<\/h2>\n

<\/i>dedecms\u7ec7\u68a6\u8054\u52a8\u7b5b\u9009\u4f2a\u9759\u6001\u7248-\u5355\u94fe\u63a5\u5f62\u5f0f<\/a><\/p>\n

<\/i>\u767e\u5ea6\u7f51\u76d8<\/a><\/p>\n

\u5bc6\u7801: dbm3<\/p>\n

\u5b89\u88c5\u8bf4\u660e<\/h2>\n

1.\u9009\u62e9\u5bf9\u5e94\u7684\u7f16\u7801\uff0c\u628a\u6587\u4ef6\u5939\u6587\u4ef6\u5168\u90e8\u8986\u76d6\u5230\u5bf9\u5e94\u76ee\u5f55;<\/strong><\/p>\n

2.\u540e\u53f0 - \u7cfb\u7edf\u914d\u7f6e\u6dfb\u52a0\u53d8\u91cf<\/strong>
\n\u53d8\u91cf\u540d\u79f0\uff1acfg_rewritea
\n\u53d8\u91cf\u7c7b\u578b\uff1a\u5e03\u5c14\uff08Y \/ N\uff09
\n\u53c2\u6570\u8bf4\u660e\uff1a\u7b5b\u9009a\u9759\u6001
\n\u53d8\u91cf\u503c\uff1aY
\n\u6240\u5c5e\u7ec4\uff1a\u7ad9\u70b9\u8bbe\u7f6e<\/p>\n

3.\u540e\u53f0 - \u7cfb\u7edf - \u7cfb\u7edf\u8bbe\u7f6e - \u7cfb\u7edf\u57fa\u672c\u53c2\u6570 - \u5176\u4ed6\u9009\u9879 - \u7981\u7528\u6a21\u677f\u6807\u7b7e\uff0c\u628aphp\u5220\u9664\u540e\u4fdd\u5b58;<\/strong><\/p>\n

4.\u540e\u53f0 - \u6838\u5fc3 - \u9891\u9053\u6a21\u578b - \u5185\u5bb9\u6a21\u578b\u7ba1\u7406<\/strong>
\n\u627e\u5230\u60a8\u8981\u8bbe\u7f6e\u7b5b\u9009\u7684\u6a21\u578b\uff0c\u8fd9\u91cc\u4ee5\u201c\u666e\u901a\u6587\u7ae0\u201d\u4e3a\u4f8b\uff0c\u70b9\u51fb\u53f3\u8fb9\u7684\u7f16\u8f91\u6309\u94ae\uff0c\u5728\u51fa\u6765\u7684\u9875\u9762\u4e2d\u5207\u6362\u5230\u201c\u5b57\u6bb5\u7ba1\u7406\u201d\uff0c\u70b9\u51fb\u201c\u6dfb\u52a0\u65b0\u5b57\u6bb5\u201d\uff0c\u586b\u5199\u7684\u65f6\u5019\u6ce8\u610f\u201c\u6570\u636e\u7c7b\u578b\u201d\u9009\u62e9\u3010\u4f7f\u7528\u9009\u9879\u6846\u4e0b\u62c9\u3011;<\/p>\n

\"QQ\u622a\u56fe20180629094943\"<\/a><\/p>\n

5.\u6dfb\u52a0\u6587\u6863\uff0c\u9009\u62e9\u5bf9\u5e94\u7684\u7b5b\u9009\uff0c\u5df2\u7ecf\u6dfb\u52a0\u7684\u6587\u6863\u9700\u8981\u91cd\u65b0\u7f16\u8f91\uff0c\u9009\u62e9\u5bf9\u5e94\u7684\u7b5b\u9009;<\/strong><\/p>\n

6.htaccess\u4e3aapache\u4f2a\u9759\u6001\uff0c\u653e\u5728\u7f51\u7ad9\u6839\u76ee\u5f55\uff0c\u7528\u4e8e\u7b5b\u9009\u4f2a\u9759\u6001\u4f7f\u7528\uff0ciis\u548cnginx\u7528\u6237\u81ea\u884c\u8f6c\u6362\u3002<\/strong><\/p>\n

7.\u8bbe\u7f6e\u7f51\u7ad9\u6574\u7ad9\u4e3a\u9759\u6001\uff0c\u751f\u6210\uff0c\u6d4f\u89c8\u7f51\u7ad9\u5e26\u7b5b\u9009\u7684\u680f\u76ee\uff0c\u770b\u6548\u679c\u3002<\/strong><\/p>\n

\u8c03\u7528\u8bf4\u660e<\/h2>\n

\u5728\u9700\u8981\u663e\u793a\u7b5b\u9009\u7684\u5730\u65b9\u52a0\u5165(\u624b\u673a\u7248\u4e5f\u4e00\u6837)
\n{dede:php}AddFilter(\u6a21\u578bID\u53f7,\u7c7b\u578b,\"\u5b57\u6bb51\");{\/dede:php}
\n\u4f8b\uff1a
\n{dede:php}AddFilter(1,1,\"area\");{\/dede:php}<\/p>\n

\u591a\u4e2a\u5b57\u6bb5\u7528\u534a\u89d2\u9017\u53f7\u5206\u9694
\n{dede:php}AddFilter(\u6a21\u578bID\u53f7,\u7c7b\u578b,\"\u5b57\u6bb51,\u5b57\u6bb52,\u5b57\u6bb53\");{\/dede:php}
\n\u4f8b\uff1a
\n{dede:php}AddFilter(1,1,\"area,type,time\");{\/dede:php}<\/p>\n

title\u6807\u9898\u6dfb\u52a0\u7b5b\u9009\u6587\u5b57\u8fdb\u53bb<\/h2>\n
<title>{dede:field.time\/} {dede:field.area\/} {dede:field.type\/} - {dede:field.title\/} - {dede:global.cfg_webname\/}<\/title><\/code><\/pre>\n

 <\/p>\n

\u5185\u5bb9\u9875\u8f93\u51fa\u6240\u5c5e\u7b5b\u9009\u503c+\u94fe\u63a5(\u652f\u6301\u52a8\u6001\/\u4f2a\u9759\u6001)<\/h2>\n

\u5b9e\u73b0\u6559\u7a0b<\/h2>\n

\u6253\u5f00 \\include\\extend.func.php \u5728\u6700\u4e0b\u9762\u52a0\u5165<\/p>\n

\/**\r\n *  \u5185\u5bb9\u9875\u8f93\u51fa\u6240\u5c5e\u7b5b\u9009\u503c+\u94fe\u63a5\r\n *\r\n * @access    public\r\n * @param     string  $id\t\u6587\u6863id\r\n * @param     string  $fieldsnamef\t\u5355\u4e2a\u7b5b\u9009\u5b57\u6bb5\r\n * @return    string\r\n *\/\r\nfunction GetFilterUrl($id,$fieldsnamef)\r\n{\r\n\tglobal $dsql,$cfg_cmspath,$cfg_rewritea;\r\n\tif (!isset($id) && !is_numeric($id))\r\n\t{\r\n\t\treturn '';\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$arcrow = $dsql->GetOne(\" Select typeid,channel From `SzsFox_archives` where id='$id' \");\r\n\t\t$channelid = $arcrow['channel'];\r\n\t\t$tid = $arcrow['typeid'];\r\n\t\t$typerow = $dsql->GetOne(\" Select typedir From `SzsFox_arctype` where id='$tid' \");\r\n\t\t$typedir = MfTypedir($typerow[\"typedir\"]);\r\n\t\t\r\n\t\t$channelrow = $dsql->GetOne(\"SELECT addtable FROM SzsFox_channeltype where id='$channelid'\");\r\n\t\t$addtable = trim($channelrow['addtable']);\r\n\r\n\t\t$fieldrow = $dsql->GetOne(\"SELECT $fieldsnamef FROM `$addtable` WHERE aid=$id\");\r\n\t}\r\n\t$plist = $_SERVER['HTTP_X_REWRITE_URL'] ? string_filter($_SERVER['HTTP_X_REWRITE_URL']) : string_filter($_SERVER['REQUEST_URI']);\r\n\tif($cfg_rewritea == 'Y')\r\n\t{\r\n\t\t$plist = stripos($plist, \"makehtml_list_action.php\") ? $cfg_cmspath.$typedir.'\/' : $plist;\r\n\t\t$filterarr = string_filter(stripos($plist, \".html\") ? str_replace(\".html\", \"\", $plist) : $cfg_cmspath.$typedir.'\/');\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$nofilter = (isset($_REQUEST['TotalResult']) ? \"&TotalResult=\".$_REQUEST['TotalResult'] : '').(isset($_REQUEST['PageNo']) ? \"&PageNo=\".$_REQUEST['PageNo'] : '');\r\n\t\t$filterarr = string_filter(stripos($plist, \"list.php?tid=\") ? str_replace($nofilter, '', $plist) : $GLOBALS['cfg_cmsurl'].\"\/plus\/list.php?tid=\".$tid);\r\n\t}\r\n\r\n\t$cInfos = $dsql->GetOne(\" Select * From  `SzsFox_channeltype` where id='$channelid' \");\r\n\t$fieldset = $cInfos['fieldset'];\r\n\t$dtp = new DedeTagParse();\r\n    $dtp->SetNameSpace('field','<','>');\r\n    $dtp->LoadSource($fieldset);\r\n    $result = '';\r\n    if(is_array($dtp->CTags))\r\n    {\r\n\t\tforeach($dtp->CTags as $tida=>$ctag)\r\n        {\r\n            $field_name = $ctag->GetName();\r\n\t\t\t$fieldsname = $fieldsnamef ? explode(\",\", $fieldsnamef) : explode(\",\", $field_name);\r\n\t\t\tif( in_array($field_name, $fieldsname))\r\n\t\t\t{\r\n\t\t\t\tif($cfg_rewritea == 'Y')\r\n\t\t\t\t{\r\n\t\t\t\t\t$href = \"\";\r\n\t\t\t\t\t$addonfields_items = explode(\",\",$ctag->GetAtt('default'));\r\n\r\n\t\t\t\t\t$i = array_search($fieldrow[$fieldsnamef],explode(\",\",$ctag->GetAtt('default')));\r\n\t\t\t\t\t$filterarr1 = explode(\"list_\", $filterarr);\r\n\t\t\t\t\t$href = $filterarr1[0].\"list_\".$tid.'_'.$field_name.'_'.$i;\r\n\r\n\t\t\t\t\t$href .= \".html\";\r\n\t\t\t\t\t$href = str_replace(array(\"_\".$field_name.\".\",\".\",\"_\".$_REQUEST['TotalResult'].\"_\".$_REQUEST['PageNo']),array(\".\",\".\",\"\"),$href);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$result .= '<a href=\"'.$href.'\">'.$addonfields_items[$i].'<\/a>';\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$addonfields_items = explode(\",\",$ctag->GetAtt('default'));\r\n\t\t\t\t\t\r\n\t\t\t\t\t$i = array_search($fieldrow[$fieldsnamef],explode(\",\",$ctag->GetAtt('default')));\r\n\t\t\t\t\t\r\n\t\t\t\t\t$href = stripos($filterarr,$ctag->GetName().'=') ? str_replace(\"=\".$fields_value,\"=\".urlencode($addonfields_items[$i]),$filterarr) : $filterarr.'&'.$ctag->GetName().'='.urlencode($addonfields_items[$i]);\r\n\t\t\t\t\t$href = str_replace(\"&TotalResult=\".$_REQUEST['TotalResult'].\"&PageNo=\".$_REQUEST['PageNo'], \"\", $href);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$result .= '<a title=\"'.$addonfields_items[$i].'\" href=\"'.$href.'\">'.$addonfields_items[$i].'<\/a>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n        }\r\n    }\r\n\treturn $result;\r\n}<\/code><\/pre>\n

 <\/p>\n

\u5185\u5bb9\u9875\u6a21\u677f\u4e2d\u8c03\u7528\u6807\u7b7e<\/h2>\n
<small>\u533a\u57df:<\/small>{dede:field.id function=GetFilterUrl(@me,'area')\/}\r\n<small>\u5730\u94c1:<\/small>{dede:field.id function=GetFilterUrl(@me,'subway')\/}<\/code><\/pre>\n

\u9996\u9875\/\u5217\u8868\u9875\u8c03\u7528\u6807\u7b7e<\/h2>\n
\u533a\u57df:[field:id function=function=GetFilterUrl(@me,'area')\/]\r\n\u5730\u94c1:[field:id function=function=GetFilterUrl(@me,'subway')\/]<\/code><\/pre>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

DedeCms\u7ec7\u68a6\u8054\u52a8\u7b5b\u9009[\u4f2a\u9759\u6001\u7248 - \u5355\u94fe\u63a5\u5f62\u5f0f]\uff0c\u7f51\u7ad9\u7528\u7684\u662f\u9759\u6001\uff0c\u7b5b\u9009\u7528\u7684\u662f\u4f2a\u9759\u6001\uff0c\u7b5b\u9009\u7684\u4f2a\u9759\u6001\u5730\u5740\u4ee5\u5b57 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[43,180,331],"class_list":["post-1767","post","type-post","status-publish","format-standard","hentry","category-web","tag-dedecms","tag-180","tag-331"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=1767"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1767\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=1767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=1767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=1767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}