{"id":59846,"date":"2025-04-24T08:41:00","date_gmt":"2025-04-24T00:41:00","guid":{"rendered":"https:\/\/fwq.ai\/blog\/59846\/"},"modified":"2025-04-24T08:41:00","modified_gmt":"2025-04-24T00:41:00","slug":"ecshop%e4%ba%8c%e6%ac%a1%e5%bc%80%e5%8f%9150%e4%b8%aa%e5%b0%8f%e6%8a%80%e5%b7%a7-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/59846\/","title":{"rendered":"ecshop\u4e8c\u6b21\u5f00\u53d150\u4e2a\u5c0f\u6280\u5de7"},"content":{"rendered":"<p>ecshop\u4e8c\u6b21\u5f00\u53d150\u4e2a\u5c0f\u6280\u5de7,\u597d\u6a21\u677f\u63d0\u4f9b<\/p>\n<p>1:\u5982\u4f55\u7edf\u8ba1ecshop\u5546\u54c1\u5728\u8ba2\u5355\u4e2d\u51fa\u73b0\u7684\u6b21\u6570<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp; \u56de\u7b54:$count = $db -&gt; getOne(&#8220;select sum(goods_number) from &#8220;.$ecs-&gt;table(&#8216;order_goods&#8217;).&#8221; where goods_id = &#8216;$goods[goods_id]'&#8221;);<\/p>\n<p>&nbsp;&nbsp; 2:<strong>ecshop\u8be6\u7ec6\u9875\u9762<\/strong>\u5982\u4f55\u901a\u8fc7onclick\u70b9\u51fb\u4e8b\u4ef6\u6765\u63a7\u5236\u8d2d\u4e70\uff0c\u7279\u522b\u7528\u5728\u6279\u53d1\uff0c\u6279\u53d1\u5b58\u5728\u4e00\u4e2a\u6700\u5c0f\u8d2d\u4e70\u91cf\u63a7\u5236\uff0e<\/p>\n<p>&nbsp;&nbsp; \u56de\u7b54:<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;script&gt;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function adgtz(){<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var number = document.getElementById(&#8220;ordernumber&#8221;).value;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var min_number = {$goods.min_number};<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var goods_num = 1000;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(number &gt; goods_num &#8211; min_number){<br \/> &nbsp;&nbsp; alert(&#8220;\u6700\u591a\u80fd\u4e70&#8221;+goods_number+&#8221;\u4ef6&#8221;);<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number=parseInt(number)+min_number;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.getElementById(&#8220;ordernumber&#8221;).value = number;<br \/> }<br \/> function adgtzmm(){<br \/> &nbsp;&nbsp;&nbsp; var number = document.getElementById(&#8220;ordernumber&#8221;).value;<br \/> &nbsp;&nbsp;&nbsp;&nbsp; var min_number = {$goods.min_number};<br \/> &nbsp;&nbsp;&nbsp; if (number&gt;min_number){<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number=parseInt(number)-min_number;<br \/> &nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp; document.getElementById(&#8220;ordernumber&#8221;).value = number;<br \/> &nbsp;&nbsp;&nbsp; <br \/> }<br \/> &lt;\/script&gt;<\/p>\n<p>&nbsp;&nbsp;&nbsp; 3:\u5982\u4f55\u7528js\u53bb\u9a8c\u8bc1\u624b\u673a\u53f7\u7801\uff0e<\/p>\n<p>&nbsp;&nbsp;&nbsp; \u56de\u7b54\uff1avar reg =\/^[1]([3][0-9]{1}|50|53|59|58|56|86|80|89|87|88|85|86|55|51|52|57)[0-9]{8}$\/;<\/p>\n<p>&nbsp;&nbsp;&nbsp; 4:ecshop\u4e2d\u5982\u4f55\u53d6\u5f97\u6bcf\u4e2a\u6708\u76841\u53f7\u65f6\u95f4?<\/p>\n<p>&nbsp;&nbsp; \u56de\u7b54:local_mktime(0,0,0,date(&#8220;m&#8221;),0,date(&#8220;Y&#8221;));\u4f7f\u7528ecshop\u7684local_mktime\u51fd\u6570.&nbsp;&nbsp;http:\/\/www.chinab4c.com\/html\/shangchengchengxu\/ecshophanshu\/2009\/0629\/70.html<\/p>\n<p>&nbsp;&nbsp;&nbsp; 5:ecshop\u5982\u4f55\u76f4\u63a5\u5173\u95ed\u7a97\u53e3\u800c\u4e0d\u5f39\u51fa\u63d0\u793a<\/p>\n<p>&nbsp;&nbsp; \u56de\u7b54:&lt;a href=&#8221;javascript:window.opener=null;window.close();&#8221;&gt;<\/p>\n<p>&nbsp;&nbsp;&nbsp; 6:\u5982\u4f55\u7edf\u8ba1ecshop\u67d0\u5546\u54c1\u4e0b\u88ab\u5ba1\u6838\u8fc7\u7684\u8bc4\u8bba\u6570\u91cf\u3002<\/p>\n<p>\u56de\u7b54\uff1a$ccount = $db -&gt; getOne(&#8220;select count(*) cc from &#8220;.$ecs-&gt;table(&#8216;comment&#8217;).&#8221; where id_value = &#8216;$goods_id&#8217; and comment_type = &#8216;0&#8217; and status = &#8216;1&#8217; and parent_id = &#8216;0&#8217;&#8221;);<\/p>\n<p>&nbsp;&nbsp;&nbsp; \u6709\u5173ecshop\u8bc4\u8bba\uff0c\u8bf7\u53c2\u8003\u672c\u6587http:\/\/www.chinab4c.com\/html\/shangchengchengxu\/ecshopchangjianwenti\/2009\/0811\/129.html<\/p>\n<p>&nbsp;&nbsp; 7:ecshop\u4e2djs\u5982\u4f55\u5c06\u65f6\u95f4\u683c\u5f0f\u4e92\u8f6c<\/p>\n<p>&nbsp;&nbsp;&nbsp; \u56de\u7b54\uff1adate1 = new Date();<br \/> var b = Date.UTC(date1.getYear(),date1.getMonth()+1,date1.getDate(),0,0,0)<br \/> time1 = frm.elements[&#8216;best_time&#8217;].value;<\/p>\n<p> y = time1.substring(0,4);<br \/> m = time1.substring(5,7);<br \/> d = time1.substring(8,10);<br \/> var b2 = Date.UTC(y,m,d,0,0,0)<\/p>\n<p>&nbsp;&nbsp; 8:\u5982\u4f55\u89e3\u6790ecshop flash\u7684xml<\/p>\n<p>\u56de\u7b54\uff1a<\/p>\n<p>&nbsp;&nbsp;&nbsp; $str = @file_get_contents(&#8220;data\/flash_data.xml&#8221;);<br \/> if($str){<br \/> &nbsp;&nbsp; preg_match_all(&#8220;\/item_url=\\&#8221;(.*?)\\&#8221;\/&#8221;,$str,$url);<br \/> &nbsp;&nbsp; preg_match_all(&#8220;\/text=\\&#8221;(.*?)\\&#8221;\/&#8221;,$str,$text);<br \/> &nbsp;&nbsp; preg_match_all(&#8220;\/link=\\&#8221;(.*?)\\&#8221;\/&#8221;,$str,$link);<br \/> &nbsp;&nbsp; $ar_flash = array();<br \/> &nbsp;&nbsp; if(sizeof($url[1])){<br \/> &nbsp;&nbsp;&nbsp; for($i=0;$i&lt;sizeof($url[1]);$i++){<br \/> &nbsp;&nbsp;&nbsp;&nbsp; $ar_flash[$i][&#8216;url&#8217;] = $url[1][$i];<br \/> &nbsp;&nbsp;&nbsp;&nbsp; $ar_flash[$i][&#8216;text&#8217;] = $text[1][$i];<br \/> &nbsp;&nbsp;&nbsp;&nbsp; $ar_flash[$i][&#8216;link&#8217;] = $link[1][$i];<\/p>\n<p>&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp; $smarty-&gt;assign(&#8216;ar_flash&#8217;,$ar_flash);<br \/> &nbsp;&nbsp; }<br \/> &nbsp;&nbsp;<br \/> }<br \/> 9:ecshop\u4e2d\u5982\u4f55\u6b63\u5219\u63d0\u53d6\u4e2d\u6587<\/p>\n<p>\u56de\u7b54:preg_match(&#8220;\/[&#8220;.chr(0xa1).&#8221;-&#8220;.chr(0xff).&#8221;]+\/&#8221;,ecs_iconv(&#8220;UTF-8&#8243;,&#8221;GBK&#8221;,$v[&#8216;brand_name&#8217;]),$cn);<\/p>\n<p>10:ecshop\u5982\u4f55\u53d6\u5f97\u8ba2\u5355\u4e2d\u6240\u5c5e\u533a\u57df<\/p>\n<p>$p = $GLOBALS[&#8216;db&#8217;]-&gt;getOne(&#8220;select region_name from &#8220;.$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;region&#8217;).&#8221; where region_id = &#8216;&#8221;.$re1[&#8216;province&#8217;].&#8221;&#8216;&#8221;);<br \/> &nbsp;&nbsp;&nbsp;&nbsp; $c = $GLOBALS[&#8216;db&#8217;]-&gt;getOne(&#8220;select region_name from &#8220;.$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;region&#8217;).&#8221; where region_id = &#8216;&#8221;.$re1[&#8216;city&#8217;].&#8221;&#8216;&#8221;);<br \/> &nbsp;&nbsp;&nbsp;&nbsp; $d = $GLOBALS[&#8216;db&#8217;]-&gt;getOne(&#8220;select region_name from &#8220;.$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;region&#8217;).&#8221; where region_id = &#8216;&#8221;.$re1[&#8216;district&#8217;].&#8221;&#8216;&#8221;);<\/p>\n<p>11:ecshop\u4e2d\u5982\u4f55\u5206\u522b\u63d0\u53d6\u4e2d\u6587\u548c\u82f1\u6587<\/p>\n<p>\u56de\u7b54:utf\u4e0b\u9762<\/p>\n<p>$pregstr = &#8220;\/[\\x{4e00}-\\x{9fa5}]+\/u&#8221;;<br \/> preg_match($pregstr,$v[&#8216;brand_name&#8217;],$ch);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p>gbk\u4e0b\u9762<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\"><span><font>$strtest = \u201cyyg<\/font><\/span><span>\u4e2d\u6587\u5b57\u7b26<\/span><span><font>yyg\u201d;<\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\"><span><font>$pregstr = &#8220;\/([&#8220;.chr(0xb0).&#8221;-&#8220;.chr(0xf7).&#8221;][&#8220;.chr(0xa1).&#8221;-&#8220;.chr(0xfe).&#8221;])+\/i&#8221;;<\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\"><span><font>if(preg_match($pregstr,$strtest,$matchArray)){<\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 5.25pt\"><span><font>echo $matchArray[0]; <\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\"><span><font>}<\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\"><span><font>12:\u5982\u4f55\u63a7\u5236<strong>ecshop\u5546\u54c1<\/strong>\u603b\u4ef7\u683c\u53ea\u6709ecshop\u4f1a\u5458\u7279\u6b8a\u7b49\u7ea7\u624d\u80fd\u67e5\u770b<\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\"><span><font>\u56de\u7b54\uff1aecshop\u7684goods.php<\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\"><span><font>$is_spe = $GLOBALS[&#8216;db&#8217;] -&gt; getOne(&#8220;select special_rank from &#8220;.$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;user_rank&#8217;).&#8221; where rank_id = &#8216;&#8221;.$_SESSION[&#8216;user_rank&#8217;].&#8221;&#8216;&#8221;);<br \/> &nbsp;&nbsp; if($is_spe){<br \/> &nbsp;&nbsp;&nbsp; $res[&#8216;result&#8217;] = price_format($shop_price * $number);<br \/> &nbsp;&nbsp; }else{<br \/> &nbsp;&nbsp;&nbsp; $string = &#8220;&lt;a href=article-21-%E6%80%8E%E4%B9%88%E6%B3%A8%E5%86%8C.html&gt;\u8bf7\u8054\u7cfb\u5ba2\u670d&lt;\/a&gt;&#8221;;<br \/> &nbsp;&nbsp;&nbsp; $res[&#8216;result&#8217;] = $string;<br \/> &nbsp;&nbsp; }<\/font><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">13:\u8c03\u8bd5ecshop\u7a0b\u5e8f\u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef<strong>Fatal error<\/strong>: Cannot redeclare\u662f\u4ec0\u4e48\u610f\u601d\uff1f<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">\u56de\u7b54\uff1a<strong>Fatal error<\/strong>: Cannot redeclare,\u610f\u601d\u662f\u4f60\u8fd0\u884c\u7684\u7a0b\u5e8f\u4e2d\uff0c\u67d0\u51fd\u6570\u91cd\u65b0\u7533\u660e\u4e86\u4e24\u6b21\uff0c\u8981\u5220\u9664\u5176\u4e2d\u4e00\u4e2a\u540c\u540d\u51fd\u6570\uff0e<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">14:ecshop\u5982\u4f55\u5224\u65ad\u662f\u5426\u5f53\u5929\u767b\u9646\uff0c\u5e76\u8d60\u9001\u79ef\u5206.<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">\u56de\u7b54:\/* \u8d60\u9001\u79ef\u5206 *\/<br \/> &nbsp;&nbsp; $day = local_mktime(0,0,0,date(&#8220;m&#8221;),date(&#8220;d&#8221;),date(&#8220;Y&#8221;));<br \/> &nbsp;&nbsp; $last_time = $db -&gt; getOne(&#8220;select last_login from &#8220;.$ecs-&gt;table(&#8216;users&#8217;).&#8221; where user_name = &#8216;&#8221;.$username.&#8221;&#8216;&#8221;);<br \/> &nbsp;&nbsp; if($last_time &lt; $day){<br \/> &nbsp;&nbsp;&nbsp; log_account_change($_SESSION[&#8216;user_id&#8217;], 0, 0, 0, 10, &#8216;\u6bcf\u5929\u767b\u9646\u9001\u79ef\u5206&#8217;, ACT_OTHER);<br \/> &nbsp;&nbsp; }<br \/> &nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">15:\u5982\u4f55\u5728ecshop\u8ba2\u5355\u5217\u8868\u4e2d\u5217\u8868\u51fa\u8ba2\u5355\u4e2d\u6240\u5305\u542b\u7684\u5546\u54c1\u7f16\u53f7.<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">\u56de\u7b54:<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;&nbsp;&nbsp; function get_user_orders($user_id, $num = 10, $start = 0)<br \/> {<br \/> &nbsp;&nbsp;&nbsp; \/* \u53d6\u5f97\u8ba2\u5355\u5217\u8868 *\/<br \/> &nbsp;&nbsp;&nbsp; $arr&nbsp;&nbsp;&nbsp; = array();<br \/> &nbsp;&nbsp;&nbsp; global $ecs;<br \/> global $db;<br \/> &nbsp;&nbsp;&nbsp; $sql = &#8220;SELECT order_id, order_sn, order_status,consignee, shipping_status, pay_status, add_time, &#8221; .<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;(goods_amount + shipping_fee + insure_fee + pay_fee + pack_fee + card_fee + tax &#8211; discount) AS total_fee &#8220;.<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8221; FROM &#8221; .$GLOBALS[&#8216;ecs&#8217;]-&gt;table(&#8216;order_info&#8217;) .<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8221; WHERE user_id = &#8216;$user_id&#8217; ORDER BY add_time DESC&#8221;;<br \/> &nbsp;&nbsp;&nbsp; $res = $GLOBALS[&#8216;db&#8217;]-&gt;SelectLimit($sql, $num, $start);<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;&nbsp;&nbsp; while ($row = $GLOBALS[&#8216;db&#8217;]-&gt;fetchRow($res))<br \/> &nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($row[&#8216;order_status&#8217;] == OS_UNCONFIRMED)<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $row[&#8216;handler&#8217;] = &#8220;&lt;a href=\\&#8221;user.php?act=cancel_order&amp;order_id=&#8221; .$row[&#8216;order_id&#8217;]. &#8220;\\&#8221; onclick=\\&#8221;if (!confirm(&#8216;&#8221;.$GLOBALS[&#8216;_LANG&#8217;][&#8216;confirm_cancel&#8217;].&#8221;&#8216;)) return false;\\&#8221;&gt;&#8221;.$GLOBALS[&#8216;_LANG&#8217;][&#8216;cancel&#8217;].&#8221;&lt;\/a&gt;&#8221;;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if ($row[&#8216;order_status&#8217;] == OS_SPLITED)<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/* \u5bf9\u914d\u9001\u72b6\u6001\u7684\u5904\u7406 *\/<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($row[&#8216;shipping_status&#8217;] == SS_SHIPPED)<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @$row[&#8216;handler&#8217;] = &#8220;&lt;a href=\\&#8221;user.php?act=affirm_received&amp;order_id=&#8221; .$row[&#8216;order_id&#8217;]. &#8220;\\&#8221; onclick=\\&#8221;if (!confirm(&#8216;&#8221;.$GLOBALS[&#8216;_LANG&#8217;][&#8216;confirm_received&#8217;].&#8221;&#8216;)) return false;\\&#8221;&gt;&#8221;.$GLOBALS[&#8216;_LANG&#8217;][&#8216;received&#8217;].&#8221;&lt;\/a&gt;&#8221;;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elseif ($row[&#8216;shipping_status&#8217;] == SS_RECEIVED)<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @$row[&#8216;handler&#8217;] = &#8216;&lt;span style=&#8221;color:red&#8221;&gt;&#8217;.$GLOBALS[&#8216;_LANG&#8217;][&#8216;ss_received&#8217;] .'&lt;\/span&gt;&#8217;;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($row[&#8216;pay_status&#8217;] == PS_UNPAYED)<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @$row[&#8216;handler&#8217;] = &#8220;&lt;a href=\\&#8221;user.php?act=order_detail&amp;order_id=&#8221; .$row[&#8216;order_id&#8217;]. &#8216;&#8221;&gt;&#8217; .$GLOBALS[&#8216;_LANG&#8217;][&#8216;pay_money&#8217;]. &#8216;&lt;\/a&gt;&#8217;;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @$row[&#8216;handler&#8217;] = &#8220;&lt;a href=\\&#8221;user.php?act=order_detail&amp;order_id=&#8221; .$row[&#8216;order_id&#8217;]. &#8216;&#8221;&gt;&#8217; .$GLOBALS[&#8216;_LANG&#8217;][&#8216;view_order&#8217;]. &#8216;&lt;\/a&gt;&#8217;;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $row[&#8216;handler&#8217;] = &#8216;&lt;span style=&#8221;color:red&#8221;&gt;&#8217;.$GLOBALS[&#8216;_LANG&#8217;][&#8216;os&#8217;][$row[&#8216;order_status&#8217;]] .'&lt;\/span&gt;&#8217;;<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $row2 = $db -&gt; getAll(&#8220;select goods_id ,goods_sn from &#8220;.$ecs-&gt;table(&#8216;order_goods&#8217;).&#8221; where order_id = &#8216;&#8221;.$row[&#8216;order_id&#8217;].&#8221;&#8216;&#8221;);<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $row[&#8216;shipping_status&#8217;] = ($row[&#8216;shipping_status&#8217;] == SS_SHIPPED_ING) ? SS_PREPARING : $row[&#8216;shipping_status&#8217;];<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $row[&#8216;order_status&#8217;] = $GLOBALS[&#8216;_LANG&#8217;][&#8216;os&#8217;][$row[&#8216;order_status&#8217;]] . &#8216;,&#8217; . $GLOBALS[&#8216;_LANG&#8217;][&#8216;ps&#8217;][$row[&#8216;pay_status&#8217;]] . &#8216;,&#8217; . $GLOBALS[&#8216;_LANG&#8217;][&#8216;ss&#8217;][$row[&#8216;shipping_status&#8217;]];<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $arr[] = array(&#8216;order_id&#8217;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; $row[&#8216;order_id&#8217;],<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8216;order_sn&#8217;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; $row[&#8216;order_sn&#8217;],<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8216;order_time&#8217;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; local_date($GLOBALS[&#8216;_CFG&#8217;][&#8216;time_format&#8217;], $row[&#8216;add_time&#8217;]),<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8216;order_status&#8217;&nbsp;&nbsp; =&gt; $row[&#8216;order_status&#8217;],<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8216;consignee&#8217;&nbsp;&nbsp; =&gt; $row[&#8216;consignee&#8217;],<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8216;total_fee&#8217;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; price_format($row[&#8216;total_fee&#8217;], false),<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8216;goodslist&#8217;&nbsp;&nbsp; =&gt; $row2,<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8216;handler&#8217;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; $row[&#8216;handler&#8217;]);<br \/> &nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;&nbsp;&nbsp; return $arr;<br \/> }<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">16:\u5982\u4f55\u53d6\u5f97ecshop\u4f1a\u5458\u4e00\u5929\u5185\u7684\u8bc4\u8bba\u6761\u6570<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">\u56de\u7b54:<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">function get_day_count_comment($user_id = &#8221;){<\/p>\n<p> global $db;<br \/> global $ecs;<br \/> $pre = local_mktime(0,0,0,date(&#8220;m&#8221;),date(&#8220;d&#8221;),date(&#8220;y&#8221;));<br \/> $next = local_mktime(0,0,0,date(&#8220;m&#8221;),date(&#8220;d&#8221;)+2,date(&#8220;y&#8221;));<br \/> &nbsp;&nbsp; <br \/> $count = $db -&gt; getOne(&#8220;select count(*) from &#8220;.$ecs-&gt;table(&#8216;comment&#8217;).&#8221; where user_id = &#8216;$user_id&#8217; and add_time &gt; &#8216;$pre&#8217; and add_time &lt; &#8216;$next&#8217; &#8220;);<\/p>\n<p> if($count &gt; 5){<br \/> &nbsp;&nbsp; return false;<br \/> }else{<br \/> &nbsp;&nbsp; return true;<br \/> }<br \/> }<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">17:ecshop\u4e2djs\u662f\u5982\u4f55\u9a8c\u8bc1radio\u9009\u62e9\uff0e<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">\u56de\u7b54\uff1a\u7c7b\u4f3c\u4ee5\u4e0b\u4ee3\u7801<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">\/*<br \/> var businesstype = false;<br \/> var job_title = false;<br \/> var number_of_employees = false;<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\"> &nbsp;&nbsp; for (i = 0; i &lt; frm.elements.length; i ++ )<br \/> {<br \/> &nbsp;&nbsp;&nbsp; if (frm.elements[i].name == &#8216;businesstype&#8217; &amp;&amp; frm.elements[i].checked)<br \/> &nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; businesstype = true;<br \/> &nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">&nbsp;&nbsp;&nbsp; if (frm.elements[i].name == &#8216;job_title&#8217; &amp;&amp; frm.elements[i].checked)<br \/> &nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; job_title = true;<br \/> &nbsp;&nbsp;&nbsp; }<br \/> if (frm.elements[i].name == &#8216;number_of_employees&#8217; &amp;&amp; frm.elements[i].checked)<br \/> &nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number_of_employees = true;<br \/> &nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"margin: 0cm 0cm 0pt 36pt;text-indent: 0cm\">if (frm.elements[i].name == &#8216;number_of_employees&#8217; &amp;&amp; frm.elements[i].checked)<br \/> &nbsp;&nbsp;&nbsp; {<br \/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number_of_employees = true;<br \/> &nbsp;&nbsp;&nbsp; }<br \/> }<br \/> *\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ecshop\u4e8c\u6b21\u5f00\u53d150\u4e2a\u5c0f\u6280\u5de7,\u597d\u6a21\u677f\u63d0\u4f9b 1:\u5982\u4f55\u7edf\u8ba1ecshop\u5546\u54c1\u5728\u8ba2\u5355\u4e2d\u51fa\u73b0\u7684\u6b21\u6570 &nbsp;&nbsp;&nbsp;&nbsp; \u56de\u7b54:$count = $db -&gt; getOne(&#8220;select sum(goods_number) from &#8220;.$ecs-&gt;table(&#8216;order_goods&#8217;).&#8221; where goods_id = &#8216;$goods[goods_id]&#8217;&#8221;); &nbsp;&nbsp; 2:ecshop\u8be6\u7ec6\u9875\u9762\u5982\u4f55\u901a\u8fc7onclick\u70b9\u51fb\u4e8b\u4ef6\u6765\u63a7\u5236\u8d2d\u4e70\uff0c\u7279\u522b\u7528\u5728\u6279\u53d1\uff0c\u6279\u53d1\u5b58\u5728\u4e00\u4e2a\u6700\u5c0f\u8d2d\u4e70\u91cf\u63a7\u5236\uff0e &nbsp;&nbsp; \u56de\u7b54: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;script&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function adgtz(){ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var number = document.getElementById(&#8220;ordernumber&#8221;).value; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var min_number = {$goods.min_number}; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var goods_num = 1000; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(number &gt; goods_num &#8211; min_number){ &nbsp;&nbsp; alert(&#8220;\u6700\u591a\u80fd\u4e70&#8221;+goods_number+&#8221;\u4ef6&#8221;); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number=parseInt(number)+min_number; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.getElementById(&#8220;ordernumber&#8221;).value = number; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-59846","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=59846"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59846\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=59846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=59846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=59846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}