{"id":199312,"date":"2025-05-03T13:23:05","date_gmt":"2025-05-03T05:23:05","guid":{"rendered":"https:\/\/server.hk\/cnblog\/199312\/"},"modified":"2025-05-03T13:23:05","modified_gmt":"2025-05-03T05:23:05","slug":"ecshop273%e9%99%a4%e7%89%88%e6%9d%83%e5%a4%96%e5%90%8e%e5%8f%b0%e5%bf%85%e5%88%a0%e9%99%a4%e4%bb%a3%e7%a0%81%e7%bb%8f%e9%aa%8c","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/199312\/","title":{"rendered":"ecshop273\u9664\u7248\u6743\u5916\u540e\u53f0\u5fc5\u5220\u9664\u4ee3\u7801\u7ecf\u9a8c"},"content":{"rendered":"<p>\u597d\u6a21\u677f\u5f88\u591a\u5ba2\u6237\u770b\u5230\u4e86\u6211\u4eec\u4ee5\u524d\u5206\u4eab\u7684\u6587\u7ae0\uff0c\u90fd\u80fd\u53bb\u6389\u524d\u53f0\u7248\u6743\uff0c\u4f46\u662f\u540e\u53f0\u7248\u6743\u5220\u9664\uff0c\u7279\u522b\u662f\u90a3\u4e9b\u4e71\u8df3\u7684\u63d0\u793a\u627e\u4e0d\u5230\u6559\u7a0b\u3002\u8fd9\u6b21\u603b\u7ed3\u4e0b\u7ecf\u9a8c\uff0c\u5728ecshop\u6700\u65b0273\u7248\u4e0a\u544a\u8bc9\u5927\u5bb6\u65b9\u6cd5\uff1a<\/p>\n<p> 1. &nbsp; \u53bb\u9664ecshop\u5b98\u65b9\u5b89\u88c5\u8bb0\u5f55\uff0c\u5177\u4f53\u4ee3\u7801\u4f55\u7528\u9014\uff0c\u4f60\u61c2\u7684\uff01\u63a5\u5230ecshop\u5b98\u65b9\u8981\u4f60\u4e70\u6388\u6743\u7684\u7535\u8bdd\u4e86\u5417\uff1f<\/p>\n<p> \u627e\u5230admin\/index.php<\/p>\n<p> \u5927\u6982489-539\u884c\uff0c\u5220\u9664\u4e4b\uff01<\/p>\n<p>  elseif ($_REQUEST[&#8216;act&#8217;] == &#8216;main_api&#8217;)   {   &nbsp; &nbsp; require_once(ROOT_PATH . &#8216;\/includes\/lib_base.php&#8217;);   &nbsp; &nbsp; $data = read_static_cache(&#8216;api_str&#8217;);   &nbsp;   &nbsp; &nbsp; if($data === false || API_TIME &lt; date(&#8216;Y-m-d H:i:s&#8217;,time()-43200))   &nbsp; &nbsp; {   &nbsp; &nbsp; &nbsp; &nbsp; include_once(ROOT_PATH . &#8216;includes\/cls_transport.php&#8217;);   &nbsp; &nbsp; &nbsp; &nbsp; $ecs_version = VERSION;   &nbsp; &nbsp; &nbsp; &nbsp; $ecs_lang = $_CFG[&#8216;lang&#8217;];   &nbsp; &nbsp; &nbsp; &nbsp; $ecs_release = RELEASE;   &nbsp; &nbsp; &nbsp; &nbsp; $php_ver = PHP_VERSION;   &nbsp; &nbsp; &nbsp; &nbsp; $mysql_ver = $db-&gt;version();   &nbsp; &nbsp; &nbsp; &nbsp; $order[&#8216;stats&#8217;] = $db-&gt;getRow(&#8216;SELECT COUNT(*) AS oCount, IFNULL(SUM(order_amount), 0) AS oAmount&#8217; .   &nbsp; &nbsp; &#8216; FROM &#8216; .$ecs-&gt;table(&#8216;order_info&#8217;));   &nbsp; &nbsp; &nbsp; &nbsp; $ocount = $order[&#8216;stats&#8217;][&#8216;oCount&#8217;];   &nbsp; &nbsp; &nbsp; &nbsp; $oamount = $order[&#8216;stats&#8217;][&#8216;oAmount&#8217;];   &nbsp; &nbsp; &nbsp; &nbsp; $goods[&#8216;total&#8217;] &nbsp; = $db-&gt;GetOne(&#8216;SELECT COUNT(*) FROM &#8216; .$ecs-&gt;table(&#8216;goods&#8217;).   &nbsp; &nbsp; &#8216; WHERE is_delete = 0 AND is_alone_sale = 1 AND is_real = 1&#8217;);   &nbsp; &nbsp; &nbsp; &nbsp; $gcount = $goods[&#8216;total&#8217;];   &nbsp; &nbsp; &nbsp; &nbsp; $ecs_charset = strtoupper(EC_CHARSET);   &nbsp; &nbsp; &nbsp; &nbsp; $ecs_user = $db-&gt;getOne(&#8216;SELECT COUNT(*) FROM &#8216; . $ecs-&gt;table(&#8216;users&#8217;));   &nbsp; &nbsp; &nbsp; &nbsp; $ecs_template = $db-&gt;getOne(&#8216;SELECT value FROM &#8216; . $ecs-&gt;table(&#8216;shop_config&#8217;) . &#8216; WHERE code = \\&#8217;template\\&#8221;);   &nbsp; &nbsp; &nbsp; &nbsp; $style = $db-&gt;getOne(&#8216;SELECT value FROM &#8216; . $ecs-&gt;table(&#8216;shop_config&#8217;) . &#8216; WHERE code = \\&#8217;stylename\\&#8221;);   &nbsp; &nbsp; &nbsp; &nbsp; if($style == &#8221;)   &nbsp; &nbsp; &nbsp; &nbsp; {   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $style = &#8216;0&#8217;;   &nbsp; &nbsp; &nbsp; &nbsp; }   &nbsp; &nbsp; &nbsp; &nbsp; $ecs_style = $style;   &nbsp; &nbsp; &nbsp; &nbsp; $shop_url = urlencode($ecs-&gt;url());   &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; $patch_file = file_get_contents(ROOT_PATH.ADMIN_PATH.&#8221;\/patch_num&#8221;);   &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; $apiget = &#8220;ver= $ecs_version &amp;lang= $ecs_lang &amp;release= $ecs_release &amp;php_ver= $php_ver &amp;mysql_ver= $mysql_ver &amp;ocount= $ocount &amp;oamount= $oamount &amp;gcount= $gcount &amp;charset= $ecs_charset &amp;usecount= $ecs_user &amp;template= $ecs_template &amp;style= $ecs_style &amp;url= $shop_url &amp;patch= $patch_file &#8220;;   &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; $t = new transport;   &nbsp; &nbsp; &nbsp; &nbsp; $api_comment = $t-&gt;request(&#8216;http:\/\/api.ecshop.com\/checkver.php&#8217;, $apiget);   &nbsp; &nbsp; &nbsp; &nbsp; $api_str = $api_comment[&#8220;body&#8221;];   &nbsp; &nbsp; &nbsp; &nbsp; echo $api_str;   &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; $f=ROOT_PATH . &#8216;data\/config.php&#8217;;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; file_put_contents($f,str_replace(&#8220;&#8216;API_TIME&#8217;, &#8216;&#8221;.API_TIME.&#8221;&#8216;&#8221;,&#8221;&#8216;API_TIME&#8217;, &#8216;&#8221;.date(&#8216;Y-m-d H:i:s&#8217;,time()).&#8221;&#8216;&#8221;,file_get_contents($f)));   &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; write_static_cache(&#8216;api_str&#8217;, $api_str);   &nbsp; &nbsp; }   &nbsp; &nbsp; else&nbsp;   &nbsp; &nbsp; {   &nbsp; &nbsp; &nbsp; &nbsp; echo $data;   &nbsp; &nbsp; }   &nbsp;   } <\/p>\n<p> 2. &nbsp;\u53bb\u9664ecshop\u540e\u53f0\u5347\u7ea7\u63d0\u793a\uff1a<br \/>\n<br \/> \u627e\u5230admin\/templates\/start.htm<br \/>\n<br \/> 234\u884c<br \/>\n<br \/> &nbsp; Ajax.call(&#8216;index.php?is_ajax=1&amp;act=main_api&#8217;,&#8221;, start_api, &#8216;GET&#8217;, &#8216;TEXT&#8217;,&#8217;FLASE&#8217;);<br \/>\n<br \/> \u5220\u9664\u6216\u8005\u524d\u9762\u52a0\u53cc\u659c\u6760 <\/p>\n<p> 3. \u53bb\u9664ecshop\u540e\u53f0\u4e91\u83dc\u5355 <\/p>\n<p> 143\u884cadmin\/templates\/menu.htm<br \/>\n<br \/> &nbsp; &lt;script language=&#8221;JavaScript&#8221; src=&#8221;http:\/\/api.ecshop.com\/menu_ext.php?charset={$charset}&amp;lang={$help_lang}&#8221;&gt;&lt;\/script&gt;<br \/>\n<br \/> \u8be5\u884c\u4ee3\u7801\u5220\u9664 <\/p>\n<p> \u7ecf\u8fc7\u4ee5\u4e0a\u4e09\u4e2a\u5220\u9664\uff0c\u5c31\u5b89\u5168\u65e0\u5fe7\uff0c\u6ca1\u6709\u8fd9\u4e9b\u4e0d\u5b9e\u9645\u7684\u529f\u80fd\u4e86\u3002&nbsp;  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u597d\u6a21\u677f\u5f88\u591a\u5ba2\u6237\u770b\u5230\u4e86\u6211\u4eec\u4ee5\u524d\u5206\u4eab&#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-199312","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199312","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=199312"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199312\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=199312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=199312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=199312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}