{"id":199469,"date":"2025-05-03T08:36:50","date_gmt":"2025-05-03T00:36:50","guid":{"rendered":"https:\/\/server.hk\/cnblog\/199469\/"},"modified":"2025-05-03T08:36:50","modified_gmt":"2025-05-03T00:36:50","slug":"%e5%88%a0%e9%99%a4ecshop%e7%a8%8b%e5%ba%8f%e9%bb%98%e8%ae%a4%e5%ae%98%e6%96%b9%e8%ae%b0%e5%bd%95%e5%ae%89%e8%a3%85%e9%87%8f%e7%bb%9f%e8%ae%a1%e9%87%8f%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/199469\/","title":{"rendered":"\u5220\u9664ecshop\u7a0b\u5e8f\u9ed8\u8ba4\u5b98\u65b9\u8bb0\u5f55\u5b89\u88c5\u91cf\u7edf\u8ba1\u91cf\u4ee3\u7801"},"content":{"rendered":"<p> \u5220\u9664ecshop\u7a0b\u5e8f\u9ed8\u8ba4\u5b98\u65b9\u8bb0\u5f55\u5b89\u88c5\u91cf\u7edf\u8ba1\u91cf\u4ee3\u7801\uff0c\u7b2c\u4e00\u5904\uff1a\u6587\u4ef6 admin\/index.php &nbsp;489\u884c\u5230539\u884c\uff1a<\/p>\n<blockquote>\n<p> &nbsp;elseif ($_REQUEST[&#8216;act&#8217;] == &#8216;main_api&#8217;)<\/p>\n<p> {<\/p>\n<p> &nbsp; &nbsp; require_once(ROOT_PATH . &#8216;\/includes\/lib_base.php&#8217;);<\/p>\n<p> &nbsp; &nbsp; $data = read_static_cache(&#8216;api_str&#8217;);<\/p>\n<p> &nbsp;<\/p>\n<p> &nbsp; &nbsp; if($data === false || API_TIME &lt; date(&#8216;Y-m-d H:i:s&#8217;,time()-43200))<\/p>\n<p> &nbsp; &nbsp; {<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; include_once(ROOT_PATH . &#8216;includes\/cls_transport.php&#8217;);<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $ecs_version = VERSION;<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $ecs_lang = $_CFG[&#8216;lang&#8217;];<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $ecs_release = RELEASE;<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $php_ver = PHP_VERSION;<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $mysql_ver = $db-&gt;version();<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $order[&#8216;stats&#8217;] = $db-&gt;getRow(&#8216;SELECT COUNT(*) AS oCount,NULLM(order_amount), 0) AS oAmount&#8217; .<\/p>\n<p> &nbsp; &nbsp; &#8216; FROM &#8216; .$ecs-&gt;table(&#8216;order_info&#8217;));<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $ocount = $order[&#8216;stats&#8217;][&#8216;oCount&#8217;];<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $oamount = $order[&#8216;stats&#8217;][&#8216;oAmount&#8217;];<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $goods[&#8216;total&#8217;] &nbsp; = $db-&gt;GetOne(&#8216;SELECT COUNT(*) FROM &#8216; .$ecs-&gt;table(&#8216;goods&#8217;).<\/p>\n<p> &nbsp; &nbsp; &#8216; WHERE is_delete = 0 AND is_alone_sale = 1 AND is_real = 1&#8217;);<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $gcount = $goods[&#8216;total&#8217;];<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $ecs_charset = strtoupper(EC_CHARSET);<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $ecs_user = $db-&gt;getOne(&#8216;SELECT COUNT(*) FROM &#8216; . $ecs-&gt;table(&#8216;users&#8217;));<\/p>\n<p> &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;);<\/p>\n<p> &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;);<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; if($style == &#8221;)<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; {<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $style = &#8216;0&#8217;;<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $ecs_style = $style;<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $shop_url = urlencode($ecs-&gt;url());<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp;$patch_file = file_get_contents(ROOT_PATH.ADMIN_PATH.&#8221;\/patch_num&#8221;);<\/p>\n<p> &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;;<\/p>\n<p> &nbsp;<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $t = new transport;<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $api_comment = $t-&gt;request(&#8216;http:\/\/api.ecshop.com\/checkver.php&#8217;, $apiget);<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $api_str = $api_comment[&#8220;body&#8221;];<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; echo $api_str;<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; $f=ROOT_PATH . &#8216;data\/config.php&#8217;;&nbsp;<\/p>\n<p> &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)));<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; write_static_cache(&#8216;api_str&#8217;, $api_str);<\/p>\n<p> &nbsp; &nbsp; }<\/p>\n<p> &nbsp; &nbsp; else&nbsp;<\/p>\n<p> &nbsp; &nbsp; {<\/p>\n<p> &nbsp; &nbsp; &nbsp; &nbsp; echo $data;<\/p>\n<p> &nbsp; &nbsp; }<\/p>\n<p> }<\/p>\n<\/blockquote>\n<p> &nbsp;<\/p>\n<p> \u7b2c\u4e8c\u5904\uff1aadmin\/shop_config.php 231\u5230243\u884c<\/p>\n<blockquote>\n<p> &nbsp;&nbsp; &nbsp; $spt = &#8216;&lt;script type=&#8221;text\/javascript&#8221; src=&#8221;http:\/\/api.ecshop.com\/record.php?&#8217;;<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;url=&#8221; .urlencode($ecs-&gt;url());<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;&amp;shop_name=&#8221; .urlencode($_CFG[&#8216;shop_name&#8217;]);<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;&amp;shop_title=&#8221;.urlencode($_CFG[&#8216;shop_title&#8217;]);<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;&amp;shop_desc=&#8221; .urlencode($_CFG[&#8216;shop_desc&#8217;]);<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;&amp;shop_keywords=&#8221; .urlencode($_CFG[&#8216;shop_keywords&#8217;]);<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;&amp;country=&#8221;.urlencode($shop_country).&#8221;&amp;province=&#8221;.urlencode($shop_province).&#8221;&amp;city=&#8221;.urlencode($shop_city);<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;&amp;address=&#8221; .urlencode($_CFG[&#8216;shop_address&#8217;]);<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;&amp;qq=$_CFG[qq]&amp;ww=$_CFG[ww]&amp;ym=$_CFG[ym]&amp;msn=$_CFG[msn]&#8221;;<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;&amp;email=$_CFG[service_email]&amp;phone=$_CFG[service_phone]&amp;icp=&#8221;.urlencode($_CFG[&#8216;icp_number&#8217;]);<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;&amp;version=&#8221;.VERSION.&#8221;&amp;language=$_CFG[lang]&amp;php_ver=&#8221; .PHP_VERSION. &#8220;&amp;mysql_ver=&#8221; .$db-&gt;version();<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;&amp;charset=&#8221;.EC_CHARSET;<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8216;&#8221;&gt;&lt;\/script&gt;&#8217;;&nbsp;<\/p>\n<\/blockquote>\n<p> \u7b2c\u4e09\u5904\uff1a\/install\/includes\/lib_auto_installer.php &nbsp;763\u5230764\u884c<\/p>\n<blockquote>\n<p> &nbsp;<\/p>\n<p> &nbsp; &nbsp; $spt = &#8216;&lt;script type=&#8221;text\/javascript&#8221; src=&#8221;http:\/\/api.ecshop.com\/record.php?&#8217;;<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;url=&#8221; .urlencode($ecs-&gt;url()). &#8220;&amp;mod=install&amp;version=&#8221; .VERSION. &#8220;&amp;hash_code=&#8221; . $hash_code . &#8220;&amp;charset=&#8221; .EC_CHARSET. &#8220;&amp;language=&#8221; . $GLOBALS[&#8216;installer_lang&#8217;] . &#8220;\\&#8221;&gt;&lt;\/script&gt;&#8221;;<\/p>\n<p> &nbsp;<\/p>\n<\/blockquote>\n<p> &nbsp;<\/p>\n<p> \u7b2c\u56db\u5904\uff1ainstall\\includes\\lib_installer.php &nbsp;779\u5230780\u884c<\/p>\n<blockquote>\n<p> &nbsp;<\/p>\n<p> &nbsp; &nbsp; $spt = &#8216;&lt;script type=&#8221;text\/javascript&#8221; src=&#8221;http:\/\/api.ecshop.com\/record.php?&#8217;;<\/p>\n<p> &nbsp; &nbsp; $spt .= &#8220;url=&#8221; .urlencode($ecs-&gt;url()). &#8220;&amp;mod=install&amp;version=&#8221; .VERSION. &#8220;&amp;hash_code=&#8221; . $hash_code . &#8220;&amp;charset=&#8221; .EC_CHARSET. &#8220;&amp;language=&#8221; . $GLOBALS[&#8216;installer_lang&#8217;] . &#8220;\\&#8221;&gt;&lt;\/script&gt;&#8221;;<\/p>\n<p> &nbsp;<\/p>\n<\/blockquote>\n<p> &nbsp;<\/p>\n<p> \u7b2c\u4e94\u5904\uff1aadmin\\templates\\index.htm<\/p>\n<blockquote>\n<p> &nbsp;<\/p>\n<p> &nbsp; &lt;frameset rows=&#8221;0, 0&#8243; framespacing=&#8221;0&#8243; border=&#8221;0&#8243;&gt;<\/p>\n<p> &nbsp; &lt;frame src=&#8221;http:\/\/api.ecshop.com\/record.php?mod=login&amp;url={$shop_url}&#8221; id=&#8221;hidd-frame&#8221; name=&#8221;hidd-frame&#8221; frameborder=&#8221;no&#8221; scrolling=&#8221;no&#8221;&gt;<\/p>\n<p> &nbsp; &lt;\/frameset&gt;<\/p>\n<p> &nbsp;<\/p>\n<\/blockquote>\n<p> &nbsp;<\/p>\n<p> \u7b2c\u516d\u5904<\/p>\n<blockquote>\n<p> &nbsp;<\/p>\n<p> &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;<\/p>\n<p> &nbsp;<\/p>\n<\/blockquote>\n<p> &nbsp;<\/p>\n<p> &nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5220\u9664ecshop\u7a0b\u5e8f\u9ed8\u8ba4\u5b98\u65b9\u8bb0\u5f55&#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-199469","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199469","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=199469"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199469\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=199469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=199469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=199469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}