{"id":199228,"date":"2025-05-03T11:52:56","date_gmt":"2025-05-03T03:52:56","guid":{"rendered":"https:\/\/server.hk\/cnblog\/199228\/"},"modified":"2025-05-03T11:52:56","modified_gmt":"2025-05-03T03:52:56","slug":"%e7%bb%99ecshop%e5%90%8e%e5%8f%b0%e6%b7%bb%e5%8a%a0%e9%80%9a%e8%bf%87email%e6%90%9c%e7%b4%a2%e7%94%a8%e6%88%b7%e7%9a%84%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/199228\/","title":{"rendered":"\u7ed9ecshop\u540e\u53f0\u6dfb\u52a0\u901a\u8fc7email\u641c\u7d22\u7528\u6237\u7684\u529f\u80fd"},"content":{"rendered":"<p>&nbsp;\u7ed9ecshop\u540e\u53f0\u6dfb\u52a0\u901a\u8fc7email\u641c\u7d22\u7528\u6237\u7684\u529f\u80fd,\u597d\u6a21\u677f\u4ecb\u7ecd\u5982\u4e0b\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>\u5148\u627e\u5230ecshop\u4e0b\u4e24\u4e2a\u6587\u4ef6admin\/users.php\u4ee5\u53caadmin\/templates\/users_list.htm<\/p>\n<p>1\uff0c\u4fee\u6539admin\/users.php\uff1a<\/p>\n<p>\u67e5\u627e\u201c\u8fc7\u6ee4\u6761\u4ef6\u201d\uff0c672\u884c\u5de6\u53f3\uff0c\u5728$filter[&#8216;keywords&#8217;]\u540e\u4e00\u884c\u6dfb\u52a0<\/p>\n<p>$filter[&#8217;email&#8217;] = empty($_REQUEST[&#8217;email&#8217;]) ? &#8221; : trim($_REQUEST[&#8217;email&#8217;]);<\/p>\n<p>\u67e5\u627e<\/p>\n<p>if ($filter[&#8216;keywords&#8217;])<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; {<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ex_where .= &#8221; AND user_name LIKE &#8216;%&#8221; . mysql_like_quote($filter[&#8216;keywords&#8217;]) .&#8221;%'&#8221;;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n<p>\u4fee\u6539\u4e3a\uff1a<\/p>\n<p>if ($filter[&#8216;keywords&#8217;] &amp;&amp; $filter[&#8217;email&#8217;])<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; {<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ex_where .= &#8221; AND user_name LIKE &#8216;%&#8221; . mysql_like_quote($filter[&#8216;keywords&#8217;]) .&#8221;%&#8217; AND email LIKE &#8216;%&#8221; . mysql_like_quote($filter[&#8217;email&#8217;]) .&#8221;%'&#8221;;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n<p>&nbsp; elseif($filter[&#8216;keywords&#8217;])<\/p>\n<p>&nbsp; {<\/p>\n<p>&nbsp; &nbsp;$ex_where .= &#8221; AND user_name LIKE &#8216;%&#8221; . mysql_like_quote($filter[&#8216;keywords&#8217;]) .&#8221;%'&#8221;;<\/p>\n<p>&nbsp; }<\/p>\n<p>&nbsp; elseif($filter[&#8217;email&#8217;])<\/p>\n<p>&nbsp; {<\/p>\n<p>&nbsp; &nbsp; &nbsp; $ex_where .= &#8221; AND email LIKE &#8216;%&#8221; . mysql_like_quote($filter[&#8217;email&#8217;]) .&#8221;%'&#8221;;<\/p>\n<p>&nbsp; }<\/p>\n<p>2\uff0c\u4fee\u6539admin\/templates\/users_list.htm<\/p>\n<p>\u67e5\u627e {$lang.label_user_name}\uff0c11\u884c\u5de6\u53f3\uff0c\u5728\u4e0b\u9762\u6dfb\u52a0<\/p>\n<p>&nbsp;<\/p>\n<p>&amp;nbsp;\u90ae\u7bb1\u5730\u5740 &amp;nbsp;&lt;input type=&#8221;text&#8221; name=&#8221;email&#8221; \/&gt; &lt;input type=&#8221;submit&#8221; value=&#8221;{$lang.button_search}&#8221; \/&gt;<\/p>\n<p>\u67e5\u627elistTable.filter[&#8216;rank&#8217;]\uff0c97\u884c\u5de6\u53f3\uff0c\u5728\u540e\u9762\u6dfb\u52a0\uff1a<\/p>\n<p>listTable.filter[&#8217;email&#8217;] = document.forms[&#8216;searchForm&#8217;].elements[&#8217;email&#8217;].value;<\/p>\n<p>\u81f3\u6b64\u5c31\u53ef\u4ee5\u5728\u7528\u6237\u5217\u8868\u91cc\u9762\u901a\u8fc7\u90ae\u7bb1\u67e5\u627e\u7528\u6237\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;\u7ed9ecshop\u540e\u53f0\u6dfb&#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-199228","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199228","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=199228"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/199228\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=199228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=199228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=199228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}