{"id":326,"date":"2011-06-06T16:55:02","date_gmt":"2011-06-06T08:55:02","guid":{"rendered":"http:\/\/www.spendl.com\/?p=326"},"modified":"2015-06-25T22:54:03","modified_gmt":"2015-06-25T14:54:03","slug":"dedecms%e7%bb%87%e6%a2%a6%e6%97%b6%e9%97%b4%e6%97%a5%e6%9c%9f%e6%a0%87%e7%ad%be%e6%a0%b7%e5%bc%8f%e8%b0%83%e7%94%a8%e5%a4%a7%e5%85%a8","status":"publish","type":"post","link":"https:\/\/www.spendl.com\/?p=326","title":{"rendered":"dedecms(\u7ec7\u68a6)\u65f6\u95f4\u65e5\u671f\u6807\u7b7e\u6837\u5f0f\u8c03\u7528\u5927\u5168"},"content":{"rendered":"<p>24\u5c0f\u65f6\u5185\u66f4\u65b0\u7684\u6587\u7ae0\u65f6\u95f4\u663e\u793a\u4e3a\u7ea2\u8272\uff1a<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">[field:pubdate runphp=&#8217;yes&#8217;]<br \/>\n$a=&#8221;&lt;font color=red&gt;&#8221;.strftime(&#8216;%m-%d&#8217;,@me).&#8221;&lt;\/font&gt;&#8221;;<br \/>\n$b=strftime(&#8216;%m-%d&#8217;,@me);<br \/>\n$ntime = time();<br \/>\n$c = 3600 * 24;<br \/>\nif(($ntime &#8211; @me) &lt; $c) @me = $a;<br \/>\nelse @me =$b;<br \/>\n[\/field:pubdate]<\/span><\/p>\n<p><span style=\"color: #0000ff;\"><br \/>\n<\/span><\/p><\/blockquote>\n<div>24\u5c0f\u65f6\u5185\u66f4\u65b0\u7684\u6587\u7ae0\u65f6\u95f4\u540e\u9762\u6dfb\u52a0\u7ea2\u8272\u7684(new)\uff1a<\/div>\n<div>\n<blockquote>\n<div><span style=\"color: #0000ff;\">[field:pubdate runphp=&#8217;yes&#8217;]<\/span><\/div>\n<div><span style=\"color: #0000ff;\">$aa=strftime(&#8216;%m-%d&#8217;,@me);<\/span><\/div>\n<div><span style=\"color: #0000ff;\">$ntime = time();<\/span><\/div>\n<div><span style=\"color: #0000ff;\">$tagtime = @me;<\/span><\/div>\n<div><span style=\"color: #0000ff;\">$day3 = 3600 * 24;<\/span><\/div>\n<div><span style=\"color: #0000ff;\">if($tagtime &gt; $ntime-$day3) @me = &#8220;&lt;font color=&#8217;red&#8217;&gt;(new)&lt;\/font&gt;&#8221;;<\/span><\/div>\n<div><span style=\"color: #0000ff;\">else @me = $aa;<\/span><\/div>\n<div><span style=\"color: #0000ff;\">[\/field:pubdate]<\/span><\/div>\n<div><span style=\"color: #0000ff;\"><br \/>\n<\/span><\/div>\n<\/blockquote>\n<\/div>\n<div>\n<p>24\u5c0f\u65f6\u5185\u66f4\u65b0\u7684\u6587\u7ae0\u65f6\u95f4\u540e\u9762\u6dfb\u52a0\u52a0new.gif\u5c0f\u56fe\u7247\uff1a<\/p>\n<blockquote>\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">[field:pubdate runphp=&#8217;yes&#8217;]<\/span><\/div>\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">$aa=strftime(&#8216;%m-%d&#8217;,@me);<\/span><\/div>\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">$ntime = time();<\/span><\/div>\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">$tagtime = @me;<\/span><\/div>\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">$day3 = 3600 * 24 * 3;<\/span><\/div>\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">if($tagtime &gt; $ntime-$day3) @me = &#8220;&lt;img src=&#8217;new.gif&#8217; \/&gt;&#8221;.$aa;<\/span><\/div>\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">else @me = $aa;<\/span><\/div>\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">[\/field:pubdate]<\/span><\/div>\n<div><span style=\"color: #0000ff;\"><br \/>\n<\/span><\/div>\n<\/blockquote>\n<\/div>\n<div>\n<p>24\u5c0f\u65f6\u5185\u66f4\u65b0\u7684\u6587\u7ae0\u53ea\u663e\u793a\u65f6\u95f4\u4e0d\u65e5\u671f\uff0c\u4e0d\u572824\u5c0f\u65f6\u5185\u5219\u663e\u793a\u65e5\u671f\u4e0d\u663e\u793a\u65f6\u95f4\uff1a<\/p>\n<blockquote>\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">[field:pubdate runphp=&#8221;yes&#8221;]<\/span><\/div>\n<div id=\"_mcePaste\">\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">if((time()-@me)&lt;(60*60*24)){@me=&#8217; &lt;font color=&#8221;#ff6600&#8243;&gt;&#8217;.strftime(&#8220;%H:%M&#8221;,@me).'&lt;\/FONT&gt;&#8217;;}<\/span><\/div>\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">else {@me=strftime(&#8220;%m-%d&#8221;,@me);}<\/span><\/div>\n<\/div>\n<div id=\"_mcePaste\"><span style=\"color: #0000ff;\">[\/field:pubdate]<\/span><\/div>\n<div><span style=\"color: #0000ff;\"><br \/>\n<\/span><\/div>\n<\/blockquote>\n<\/div>\n<p>\u4eba\u6027\u5316\u7684 \u65f6\u95f4\u683c\u5f0f\uff0c\u663e\u793a\u51e0\u5929\u524d\uff0c\u800c\u4e0d\u663e\u793a\u65e5\u671f\uff1a<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">[field:pubdate runphp=&#8217;yes&#8217;]<br \/>\n$today = Floor(time()\/(3600 * 24));<br \/>\n$senday= Floor(@me\/(3600 * 24));<br \/>\n$updays = $today-$senday;<br \/>\nif($updays==0) @me = &#8220;\u4eca\u65e5&#8221;;<br \/>\nelse @me = $updays.&#8221;\u5929\u524d&#8221;;<br \/>\n[\/field:pubdate]<\/span><\/p>\n<p><span style=\"color: #0000ff;\"><br \/>\n<\/span><\/p><\/blockquote>\n<p>\u66f4\u4eba\u6027\u5316\u7684\u65f6\u95f4\u683c\u5f0f\uff0c\u5728\u89c4\u5b9a\u65e5\u671f\u5185\u663e\u793a\u4eca\u5929\u3001\u6628\u5929\u3001\u660e\u5929\u4e4b\u7c7b\u7684\uff0c\u89c4\u5b9a\u65f6\u95f4\u5916\u5219\u663e\u793a\u65e5\u671f\uff1a<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">[field:pubdate runphp=&#8217;yes&#8217;]<br \/>\n$today = Floor(time()\/(3600 * 24));<br \/>\n$b=strftime(&#8220;%m\u6708%d\u65e5&#8221;,&#8221;@me&#8221;);<br \/>\n$a= Floor(@me\/(3600 * 24));<br \/>\n$days = $today-$a;<br \/>\nif($days==0) @me = &#8220;&lt;font color=&#8217;#0000FF&#8217;&gt;\u4eca\u65e5&lt;\/font&gt;&#8221;;<br \/>\nelseif($days==1) @me = &#8220;&lt;font color=&#8217;#00CC66&#8242;&gt;\u6628\u5929&lt;\/font&gt;&#8221;;<br \/>\nelseif($days==2) @me = &#8220;&lt;font color=&#8217;#00CC66&#8242;&gt;\u524d\u5929&lt;\/font&gt;&#8221;;<br \/>\nelseif($days==-1) @me = &#8220;&lt;font color=&#8217;#ff0000&#8242;&gt;\u660e\u5929&lt;\/font&gt;&#8221;;<br \/>\nelseif($days==-2) @me = &#8220;&lt;font color=&#8217;#ff0000&#8242;&gt;\u540e\u5929&lt;\/font&gt;&#8221;;<br \/>\nelse @me = $b;<br \/>\n[\/field:pubdate]<\/span><br \/>\n\u6b64\u683c\u5f0f\u9002\u5408\u81ea\u5b9a\u4e49\u65f6\u95f4\u5b57\u6bb5<\/p><\/blockquote>\n<p><span style=\"color: #ff0000;\">PS:<\/span>\u4ee5\u4e0a$a\u3001$b\u3001$c\u3001$*\u90fd\u662f\u4e3a\u81ea\u5b9a\u4e49\u51fd\u6570\uff0c\u4e5f\u5c31\u662f\u4ec0\u4e48\u5b57\u6bcd\u90fdOK\u3002<\/p>\n<p>%Y-\u5e74\uff08\u56db\u4f4d\uff09   %y-\u5e74\uff08\u540e\u4e24\u4f4d\uff09   %m-\u6708   %d-\u65e5    %H-\u5c0f\u65f6    %M-\u5206   %S-\u79d2<\/p>\n<p>\u5982\u679c\u4f60\u53d1\u73b0\u6709\u66f4\u591a\u7684\u662f\u65f6\u95f4\u683c\u5f0f\uff0c\u6b22\u8fce\u8054\u7cfb\u6211\uff0c\u8ba9\u6211\u52a0\u4e0a\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>24\u5c0f\u65f6\u5185\u66f4\u65b0\u7684\u6587\u7ae0\u65f6\u95f4\u663e\u793a\u4e3a\u7ea2\u8272\uff1a<\/p>\n<p><span style=\"color: #0000ff;\">[field:pubdate runphp=&#8217;yes&#8217;]<\/p>\n<p>$a=&#8221;&lt;font color=red&gt;&#8221;.strftime(&#8216;%m-%d&#8217;,@me).&#8221;&lt;\/font&gt;&#8221;;<\/p>\n<p>$b=strftime(&#8216;%m-%d&#8217;,@me);<\/p>\n<p>$<\/p>\n<p><\/span><\/p>\n<div class=\"clear-float\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[93,152,151,153,134,94],"views":4692,"_links":{"self":[{"href":"https:\/\/www.spendl.com\/index.php?rest_route=\/wp\/v2\/posts\/326"}],"collection":[{"href":"https:\/\/www.spendl.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.spendl.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.spendl.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.spendl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=326"}],"version-history":[{"count":10,"href":"https:\/\/www.spendl.com\/index.php?rest_route=\/wp\/v2\/posts\/326\/revisions"}],"predecessor-version":[{"id":328,"href":"https:\/\/www.spendl.com\/index.php?rest_route=\/wp\/v2\/posts\/326\/revisions\/328"}],"wp:attachment":[{"href":"https:\/\/www.spendl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.spendl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.spendl.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}