{"id":199099,"date":"2025-05-03T10:14:53","date_gmt":"2025-05-03T02:14:53","guid":{"rendered":"https:\/\/server.hk\/cnblog\/199099\/"},"modified":"2025-05-03T10:14:53","modified_gmt":"2025-05-03T02:14:53","slug":"%e8%ae%a9ecshop%e7%bd%91%e7%ab%99%e5%ba%95%e9%83%a8%e7%9a%84%e6%96%87%e7%ab%a0%e7%94%a8help-php%e6%96%87%e4%bb%b6%e6%89%93%e5%bc%80","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/199099\/","title":{"rendered":"\u8ba9ecshop\u7f51\u7ad9\u5e95\u90e8\u7684\u6587\u7ae0\u7528help.php\u6587\u4ef6\u6253\u5f00"},"content":{"rendered":"<\/p>\n<p>\u76ee\u7684\uff1a\u4f7f\u5e2e\u52a9\u6587\u6863\u7528\u4e0d\u540c\u4e8e\u4e00\u822c\u6587\u6863\u7684\u6a21\u677f\u6765\u663e\u793a<\/p>\n<p>&nbsp;<\/p>\n<p>\u89e3\u51b3\u601d\u8def\uff1a\u867d\u7136\u5e95\u90e8\u7f51\u5e97\u4fe1\u606f\u662f\u901a\u8fc7\u5224\u65adcat_id=2\u6765\u8c03\u7528article_pro.dwt\u6a21\u677f\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u6839\u636ecat_type=5\u6765\u533a\u5206\u5e2e\u52a9\u6587\u6863\u548c\u5176\u5b83\u6587\u6863\uff0c\u4f46\u8fd8\u662f\u89c9\u5f97\u5355\u72ec\u5efa\u7acb\u4e00\u4e2a\u6587\u4ef6help.php\u6765\u8c03\u7528\u5e2e\u52a9\u6a21\u677fhelp.dwt\u7684\u65b9\u6cd5\u663e\u793a\u5e2e\u52a9\u6587\u6863\u597d\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u65b9\u6cd5\uff1a\u7528\u4e86\u4e00\u4e2a\u5f88\u82ef\u53c8\u4e0d\u53eb\u82ef\u4f46\u5f88\u5b9e\u7528\u7684\u65b9\u6cd5\uff08\u65b0\u5efa\u5e2e\u52a9\u6587\u4ef6help.php\u548c\u6a21\u677f\u6587\u4ef6help.dwt\uff0c\u7136\u540e\u4fee\u6539\u4e24\u4e2a\u7cfb\u7edf\u51fd\u6570build_uri()\u548cget_shop_help()\u6765\u5b9e\u73b0\uff09<\/p>\n<p>&nbsp;<\/p>\n<p>1\u3001\u590d\u5236artile.php\u6587\u4ef6\u91cd\u547d\u540d\u4e3ahelp.php\u6587\u4ef6\uff0c\u4e0d\u8fc7\u91cc\u9762\u7684\u6709\u4e9b\u4ee3\u7801\u53ef\u4ee5\u5220\u6389\uff0c\u6211\u53ea\u4fdd\u7559\u4e86\u5982\u4e0b\u4ee3\u7801\uff08help.php\u6587\u4ef6\uff09\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;?php<\/p>\n<p>\/**<\/p>\n<p>* ECSHOP \u5e2e\u52a9\u5185\u5bb9<\/p>\n<p>* ============================================================================<\/p>\n<p>* \u7248\u6743\u6240\u6709 2005-2008 \u4e0a\u6d77\u5546\u6d3e\u7f51\u7edc\u79d1\u6280\u6709\u9650\u516c\u53f8\uff0c\u5e76\u4fdd\u7559\u6240\u6709\u6743\u5229\u3002<\/p>\n<p>* \u7f51\u7ad9\u5730\u5740: http:\/\/www.ecshop.com\uff1b<\/p>\n<p>* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>* \u8fd9\u4e0d\u662f\u4e00\u4e2a\u81ea\u7531\u8f6f\u4ef6\uff01\u60a8\u53ea\u80fd\u5728\u4e0d\u7528\u4e8e\u5546\u4e1a\u76ee\u7684\u7684\u524d\u63d0\u4e0b\u5bf9\u7a0b\u5e8f\u4ee3\u7801\u8fdb\u884c\u4fee\u6539\u548c<\/p>\n<p>* \u4f7f\u7528\uff1b\u4e0d\u5141\u8bb8\u5bf9\u7a0b\u5e8f\u4ee3\u7801\u4ee5\u4efb\u4f55\u5f62\u5f0f\u4efb\u4f55\u76ee\u7684\u7684\u518d\u53d1\u5e03\u3002<\/p>\n<p>* ============================================================================<\/p>\n<p>* $Author: testyang $<\/p>\n<p>* $Id: article.php 15115 2008-10-28 09:43:36Z testyang $<\/p>\n<p>*\/<\/p>\n<p>define(&#8216;IN_ECS&#8217;, true);<\/p>\n<p>require(dirname(__FILE__) . &#8216;\/includes\/init.php&#8217;);<\/p>\n<p>if ((DEBUG_MODE &amp; 2) != 2)<\/p>\n<p>{<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;caching = true;<\/p>\n<p>}<\/p>\n<p>\/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; *\/<\/p>\n<p>\/\/&#8211; INPUT<\/p>\n<p>\/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; *\/<\/p>\n<p>$_REQUEST[&#8216;id&#8217;] = isset($_REQUEST[&#8216;id&#8217;]) ? intval($_REQUEST[&#8216;id&#8217;]) : 0;<\/p>\n<p>$article_id &nbsp; &nbsp; = $_REQUEST[&#8216;id&#8217;];<\/p>\n<p>if(isset($_REQUEST[&#8216;cat_id&#8217;]) &amp;&amp; $_REQUEST[&#8216;cat_id&#8217;] &lt; 0)<\/p>\n<p>{<\/p>\n<p>&nbsp;&nbsp; &nbsp;$article_id = $db-&gt;getOne(&#8220;SELECT article_id FROM &#8221; . $ecs-&gt;table(&#8216;article&#8217;) . &#8221; WHERE cat_id = &#8216;&#8221;.intval($_REQUEST[&#8216;cat_id&#8217;]).&#8221;&#8216; &#8220;);<\/p>\n<p>}<\/p>\n<p>\/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; *\/<\/p>\n<p>\/\/&#8211; PROCESSOR<\/p>\n<p>\/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; *\/<\/p>\n<p>$cache_id = sprintf(&#8216;%X&#8217;, crc32($_REQUEST[&#8216;id&#8217;] . &#8216;-&#8216; . $_CFG[&#8216;lang&#8217;]));<\/p>\n<p>if (!$smarty-&gt;is_cached(&#8216;help.dwt&#8217;, $cache_id))<\/p>\n<p>{<\/p>\n<p>&nbsp;&nbsp; &nbsp;\/* \u6587\u7ae0\u8be6\u60c5 *\/<\/p>\n<p>&nbsp;&nbsp; &nbsp;$article = get_article_info($article_id);<\/p>\n<p>&nbsp;&nbsp; &nbsp;if (empty($article))<\/p>\n<p>&nbsp;&nbsp; &nbsp;{<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ecs_header(&#8220;Location: .\/\\n&#8221;);<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;exit;<\/p>\n<p>&nbsp;&nbsp; &nbsp;}<\/p>\n<p>&nbsp;&nbsp; &nbsp;if (!empty($article[&#8216;link&#8217;]) &amp;&amp; $article[&#8216;link&#8217;] != &#8216;http:\/\/&#8217; &amp;&amp; $article[&#8216;link&#8217;] != &#8216;https:\/\/&#8217;)<\/p>\n<p>&nbsp;&nbsp; &nbsp;{<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ecs_header(&#8220;locationarticle[link]\\n&#8221;);<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;exit;<\/p>\n<p>&nbsp;&nbsp; &nbsp;}<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8216;categories&#8217;, &nbsp; &nbsp; &nbsp; get_categories_tree()); &nbsp;\/\/ \u5206\u7c7b\u6811<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8216;helps&#8217;, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;get_shop_help()); \/\/ \u7f51\u5e97\u5e2e\u52a9<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8216;id&#8217;, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $article_id);<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8216;username&#8217;, &nbsp; &nbsp; &nbsp; &nbsp; $_SESSION[&#8216;user_name&#8217;]);<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8217;email&#8217;, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$_SESSION[&#8217;email&#8217;]);<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8216;type&#8217;, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8216;1&#8217;);<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8216;promotion_info&#8217;, get_promotion_info());<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8216;article&#8217;, &nbsp; &nbsp; &nbsp;$article);<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8216;keywords&#8217;, &nbsp; &nbsp; htmlspecialchars($article[&#8216;keywords&#8217;]));<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8216;descriptions&#8217;, htmlspecialchars($article[&#8216;title&#8217;]));<\/p>\n<p>&nbsp;&nbsp; &nbsp;$catlist = array();<\/p>\n<p>&nbsp;&nbsp; &nbsp;foreach(get_article_parent_cats($article[&#8216;cat_id&#8217;]) as $k=&gt;$v)<\/p>\n<p>&nbsp;&nbsp; &nbsp;{<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$catlist[] = $v[&#8216;cat_id&#8217;];<\/p>\n<p>&nbsp;&nbsp; &nbsp;}<\/p>\n<p>&nbsp;&nbsp; &nbsp;assign_template(&#8216;a&#8217;, $catlist);<\/p>\n<p>&nbsp;&nbsp; &nbsp;$position = assign_ur_here($article[&#8216;cat_id&#8217;], $article[&#8216;title&#8217;]);<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8216;page_title&#8217;, &nbsp; $position[&#8216;title&#8217;]); &nbsp; &nbsp;\/\/ \u9875\u9762\u6807\u9898<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;assign(&#8216;comment_type&#8217;, 1);<\/p>\n<p>&nbsp;&nbsp; &nbsp;assign_dynamic(&#8216;article&#8217;);<\/p>\n<p>}<\/p>\n<p>&nbsp;&nbsp; &nbsp;$smarty-&gt;display(&#8216;help.dwt&#8217;, $cache_id);<\/p>\n<p>\/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; *\/<\/p>\n<p>\/\/&#8211; PRIVATE FUNCTION<\/p>\n<p>\/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; *\/<\/p>\n<p>\/**<\/p>\n<p>* \u83b7\u5f97\u6307\u5b9a\u7684\u6587\u7ae0\u7684\u8be6\u7ec6\u4fe1\u606f<\/p>\n<p>*<\/p>\n<p>* @access &nbsp;private<\/p>\n<p>* @param &nbsp; integer &nbsp; &nbsp; $article_id<\/p>\n<p>* @return &nbsp;array<\/p>\n<p>*\/<\/p>\n<p>function get_article_info($article_id)<\/p>\n<p>{<\/p>\n<p>&nbsp;&nbsp; &nbsp;\/* \u83b7\u5f97\u6587\u7ae0\u7684\u4fe1\u606f *\/<\/p>\n<p>&nbsp;&nbsp; &nbsp;$sql = &#8220;SELECT a.*, IFNULL(AVG(r.comment_rank), 0) AS comment_rank &#8220;.<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8220;FROM &#8221; .$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;article&#8217;). &#8221; AS a &#8220;.<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8220;LEFT JOIN &#8221; .$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;comment&#8217;). &#8221; AS r ON r.id_value = a.article_id AND comment_type = 1 &#8220;.<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8220;WHERE a.is_open = 1 AND a.article_id = &#8216;$article_id&#8217; GROUP BY a.article_id&#8221;;<\/p>\n<p>&nbsp;&nbsp; &nbsp;$row = $GLOBALS[&#8216;db&#8217;]-&gt;getRow($sql);<\/p>\n<p>&nbsp;&nbsp; &nbsp;if ($row !== false)<\/p>\n<p>&nbsp;&nbsp; &nbsp;{<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$row[&#8216;add_time&#8217;] &nbsp; &nbsp; = local_date($GLOBALS[&#8216;_CFG&#8217;][&#8216;date_format&#8217;], $row[&#8216;add_time&#8217;]); \/\/ \u4fee\u6b63\u6dfb\u52a0\u65f6\u95f4\u663e\u793a<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;\/* \u4f5c\u8005\u4fe1\u606f\u5982\u679c\u4e3a\u7a7a\uff0c\u5219\u7528\u7f51\u7ad9\u540d\u79f0\u66ff\u6362 *\/<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if (empty($row[&#8216;author&#8217;]) || $row[&#8216;author&#8217;] == &#8216;_SHOPHELP&#8217;)<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$row[&#8216;author&#8217;] = $GLOBALS[&#8216;_CFG&#8217;][&#8216;shop_name&#8217;];<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}<\/p>\n<p>&nbsp;&nbsp; &nbsp;}<\/p>\n<p>&nbsp;&nbsp; &nbsp;return $row;<\/p>\n<p>}<\/p>\n<p>?&gt;<\/p>\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n<p>2\u3001\u5728themes\/\u4f60\u7684\u6a21\u677f\u6587\u4ef6\u5939\u4e0b\uff08\u8981\u4e48\u5c31\u9ed8\u8ba4default\u6587\u4ef6\u5939\uff09\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6help.dwt\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;!DOCTYPE html PUBLIC &#8220;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&#8221; &#8220;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&#8221;&gt;<\/p>\n<p>&lt;html xmlns=&#8221;http:\/\/www.w3.org\/1999\/xhtml&#8221;&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=gbk&#8221; \/&gt;<\/p>\n<p>&lt;meta name=&#8221;Keywords&#8221; content=&#8221;{$keywords}&#8221; \/&gt;<\/p>\n<p>&lt;meta name=&#8221;Description&#8221; content=&#8221;{$description}&#8221; \/&gt;<\/p>\n<p>&lt;!&#8211; TemplateBeginEditable name=&#8221;doctitle&#8221; &#8211;&gt;<\/p>\n<p>&lt;title&gt;{$page_title}&lt;\/title&gt;<\/p>\n<p>&lt;!&#8211; TemplateEndEditable &#8211;&gt;&lt;!&#8211; TemplateBeginEditable name=&#8221;head&#8221; &#8211;&gt;&lt;!&#8211; TemplateEndEditable &#8211;&gt;<\/p>\n<p>&lt;link rel=&#8221;shortcut icon&#8221; href=&#8221;favicon.ico&#8221; \/&gt;<\/p>\n<p>&lt;link rel=&#8221;icon&#8221; href=&#8221;animated_favicon.gif&#8221; type=&#8221;image\/gif&#8221; \/&gt;<\/p>\n<p>&lt;link href=&#8221;{$ecs_css_path}&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text\/css&#8221; \/&gt;<\/p>\n<p>{* \u5305\u542b\u811a\u672c\u6587\u4ef6 *}<\/p>\n<p>{insert_scripts files=&#8217;common.js&#8217;}<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;!&#8211; #BeginLibraryItem &#8220;\/library\/page_header.lbi&#8221; &#8211;&gt;&lt;!&#8211; #EndLibraryItem &#8211;&gt;<\/p>\n<p>&lt;!&#8211;\u5f53\u524d\u4f4d\u7f6e start&#8211;&gt;<\/p>\n<p>&lt;div class=&#8221;block box&#8221;&gt;<\/p>\n<p>&lt;div id=&#8221;ur_here&#8221;&gt;<\/p>\n<p>&nbsp;&nbsp;&lt;!&#8211; #BeginLibraryItem &#8220;\/library\/ur_here.lbi&#8221; &#8211;&gt;&lt;!&#8211; #EndLibraryItem &#8211;&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;!&#8211;\u5f53\u524d\u4f4d\u7f6e end&#8211;&gt;<\/p>\n<p>&lt;div class=&#8221;blank&#8221;&gt;&lt;\/div&gt;<\/p>\n<p>&lt;div class=&#8221;block clearfix&#8221;&gt;<\/p>\n<p>&lt;!&#8211;left start&#8211;&gt;<\/p>\n<p>&lt;div class=&#8221;AreaL&#8221;&gt;<\/p>\n<p>&lt;!&#8211; #BeginLibraryItem &#8220;\/library\/help2.lbi&#8221; &#8211;&gt;<\/p>\n<p>&lt;!&#8211; #EndLibraryItem &#8211;&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;!&#8211;left end&#8211;&gt;<\/p>\n<p>&nbsp;&nbsp;&lt;!&#8211;right start&#8211;&gt;<\/p>\n<p>&nbsp;&nbsp;&lt;div class=&#8221;AreaR&#8221;&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp;&lt;div class=&#8221;box&#8221;&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp; &lt;div class=&#8221;box_1&#8243;&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp;&lt;div style=&#8221;border:4px solid #fcf8f7; background-color:#fff; padding:10px 15px 20px;&#8221;&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&#8221;tc&#8221; style=&#8221;padding:8px;&#8221;&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;font class=&#8221;f5 f6&#8243;&gt;{$article.title|escape:html}&lt;\/font&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;\/div&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;!&#8211; {if $article.content } &#8211;&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{$article.content}<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;!&#8211; {\/if} &#8211;&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {if $article.open_type eq 2 or $article.open_type eq 1}&lt;br \/&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;&lt;a href=&#8221;{$article.file_url}&#8221; target=&#8221;_blank&#8221;&gt;{$lang.relative_file}&lt;\/a&gt;&lt;\/div&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{\/if}<\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp;&lt;\/div&gt;<\/p>\n<p>&nbsp;&nbsp; &nbsp;&lt;\/div&gt;<\/p>\n<p>&nbsp;&nbsp;&lt;\/div&gt;<\/p>\n<p>&nbsp;&nbsp;&lt;div class=&#8221;blank&#8221;&gt;&lt;\/div&gt;<\/p>\n<p>&nbsp;&nbsp;&lt;\/div&gt;<\/p>\n<p>&nbsp;&nbsp;&lt;!&#8211;right end&#8211;&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;div class=&#8221;blank&#8221;&gt;&lt;\/div&gt;<\/p>\n<p>&lt;!&#8211; #BeginLibraryItem &#8220;\/library\/page_footer.lbi&#8221; &#8211;&gt;&lt;!&#8211; #EndLibraryItem &#8211;&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n<p>3\u3001\u5728themes\/\u4f60\u7684\u6a21\u677f\u6587\u4ef6\u5939\uff08\u8981\u4e48\u5c31\u9ed8\u8ba4default\u6587\u4ef6\u5939\uff09\/library\/\u76ee\u5f55\u4e0b\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6help2.lbi\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;div class=&#8221;box&#8221;&gt;<\/p>\n<p>&lt;div class=&#8221;box_1&#8243;&gt;<\/p>\n<p>&lt;div id=&#8221;help_tree&#8221;&gt;<\/p>\n<p>&lt;h5&gt;\u5e2e\u52a9\u4e2d\u5fc3&lt;\/h5&gt;<\/p>\n<p>&lt;!&#8211; {foreach from=$helps item=help_cat} &#8211;&gt;<\/p>\n<p>&lt;dl&gt;<\/p>\n<p>&lt;dt&gt;&lt;span&gt;{$help_cat.cat_name}&lt;\/span&gt;&lt;\/dt&gt;<\/p>\n<p>&lt;!&#8211; {foreach from=$help_cat.article item=item} &#8211;&gt;<\/p>\n<p>&lt;dd&gt;&lt;a href=&#8221;{$item.url}&#8221; title=&#8221;{$item.title|escape:html}&#8221;&gt;{$item.short_title}&lt;\/a&gt;&lt;\/dd&gt;<\/p>\n<p>&lt;!&#8211;{\/foreach}&#8211;&gt;<\/p>\n<p>&lt;\/dl&gt;<\/p>\n<p>&lt;!&#8211;{\/foreach}&#8211;&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n<p>4\u3001\u5728\u4f60\u7684\u6837\u5f0f\u8868\u6587\u4ef6\u91cc\uff08themes\/\u6a21\u677f\u6587\u4ef6\u5939\/style.css\uff09\u52a0\u5165\u4e0b\u9762\u4ee3\u7801\uff08\u5176\u5b9e\u8fd9\u4e2a\u53ef\u4ee5\u4e0d\u8981\uff0c\u4e3b\u8981\u662f\u65b9\u4fbf\u81ea\u5df1\u7f8e\u5316\u53c8\u4e0d\u5f71\u54cd\u5176\u5b83\u7684artile\u6587\u4ef6\uff09\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;&nbsp; \/*\u5e2e\u52a9\u5217\u8868*\/<\/p>\n<p>&nbsp;&nbsp; #help_tree{border:4px solid #fef7f9; background-color:#fff;}<\/p>\n<p>&nbsp;&nbsp; #help_tree h5{text-align:left;margin:0px;padding:2px 0px 3px 10px;font-weight:bold;font-size:14px;color:#d83135;background-color:#fef7f9;}<\/p>\n<p>&nbsp;&nbsp; #help_tree dl{margin:6px;}<\/p>\n<p>&nbsp;&nbsp; #help_tree dt{background:url(images\/lineBg.gif) repeat-x left bottom;<\/p>\n<p>&nbsp;&nbsp; color:#3f3f3f; &nbsp;padding:2px 0 3px 5px;font-weight:bold;<\/p>\n<p>&nbsp;&nbsp; }<\/p>\n<p>&nbsp;&nbsp; #help_tree dd{padding:3px 0 3px 10px;}<\/p>\n<p>&nbsp;&nbsp; #help_tree dd a{color:#404040; text-decoration:none;}<\/p>\n<p>&nbsp;&nbsp; #help_tree dd a:hover{color:#ff6600; text-decoration:none;}<\/p>\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n<p>5\u3001\u5728includes\/lib_common.php\u6587\u4ef6\u4e2d\uff0c\u627e\u5230\u51fd\u6570\u884cbuild_uri()\uff0c\u5927\u69821449\u884c\u5904\u3002<\/p>\n<p>\u5728\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>case &#8216;article&#8217;:<\/p>\n<p>if (empty($aid))<\/p>\n<p>{<\/p>\n<p>return false;<\/p>\n<p>}<\/p>\n<p>else<\/p>\n<p>{<\/p>\n<p>$uri = $rewrite ? &#8216;article-&#8216; . $aid : &#8216;article.php?id=&#8217; . $aid;<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n<p>\u7684\u540e\u9762\uff08\u5927\u69821664\u884c\u4f4d\u7f6e\u5904\uff09\u52a0\u5165\u4ee3\u7801\uff1a<\/p>\n<p>case &#8216;help&#8217;:<\/p>\n<p>if (empty($aid))<\/p>\n<p>{<\/p>\n<p>return false;<\/p>\n<p>}<\/p>\n<p>else<\/p>\n<p>{<\/p>\n<p>$uri = $rewrite ? &#8216;help-&#8216; . $aid : &#8216;help.php?id=&#8217; . $aid;<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n<p>6\u3001\u5728includes\/lib_main.php\u6587\u4ef6\u4e2d\u627e\u5230\u51fd\u6570\uff08\u5927\u6982421\u884c\u5904\uff09get_shop_help()<\/p>\n<p>\u5728\u5927\u6982439\u884c\u5904\u6709\u8fd9\u6837\u4e00\u4e2a\u8bed\u53e5\uff1a<\/p>\n<p>$arr[$row[&#8216;cat_id&#8217;]][&#8216;article&#8217;][$key][&#8216;url&#8217;] = $row[&#8216;open_type&#8217;] != 1 ?<\/p>\n<p>build_uri(&#8216;article&#8217;, array(&#8216;aid&#8217; =&gt; $row[&#8216;article_id&#8217;]), $row[&#8216;title&#8217;]) : trim($row[&#8216;file_url&#8217;]);<\/p>\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n<p>\u4fee\u6539\u4e3a\uff1a<\/p>\n<p>$arr[$row[&#8216;cat_id&#8217;]][&#8216;article&#8217;][$key][&#8216;url&#8217;] = $row[&#8216;open_type&#8217;] != 1 ?<\/p>\n<p>build_uri(&#8216;help&#8217;, array(&#8216;aid&#8217; =&gt; $row[&#8216;article_id&#8217;]), $row[&#8216;title&#8217;]) : trim($row[&#8216;file_url&#8217;]);<\/p>\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n<p>\u5373\uff1a\u628a&#8221;artilce&#8221;\uff0c\u6539\u4e3a\uff1a&#8221;help&#8221;<\/p>\n<p>&nbsp;<\/p>\n<p>OK\uff01\u5927\u529f\u544a\u6210\uff01\uff01<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u7684\uff1a\u4f7f\u5e2e\u52a9\u6587\u6863\u7528\u4e0d\u540c\u4e8e\u4e00\u822c\u6587\u6863&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-199099","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199099","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=199099"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199099\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=199099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=199099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=199099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}