﻿
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>让代码飞扬-王志博的博客</title>
	<atom:link href="http://www.wangzhibo.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wangzhibo.com</link>
	<description></description>
	<lastBuildDate>Sat, 19 May 2012 10:20:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>ecshop【六】 网站订单神器，从此不在为网站订单发愁</title>
		<link>http://www.wangzhibo.com/share/1219.html</link>
		<comments>http://www.wangzhibo.com/share/1219.html#comments</comments>
		<pubDate>Sat, 19 May 2012 09:39:02 +0000</pubDate>
		<dc:creator>tarfly</dc:creator>
				<category><![CDATA[PHP/PHP框架]]></category>
		<category><![CDATA[我的作品分享]]></category>
		<category><![CDATA[ecshop]]></category>
		<category><![CDATA[自动生成订单]]></category>
		<category><![CDATA[订单系统]]></category>

		<guid isPermaLink="false">http://www.wangzhibo.com/?p=1219</guid>
		<description><![CDATA[网站插件往往能提高网站的说服力，让网站的说服力大大飙升,有了这个订单申请让你的网站在不用为订单而发愁......]]></description>
			<content:encoded><![CDATA[<p><strong><span style="color: #ff0000;">网站插件往往能提高网站的说服力，让网站的说服力大大飙升,有了这个订单申请让你的网站在不用为订单而发愁&#8230;&#8230;<a href="http://www.wangzhibo.com/wp-content/uploads/2012/05/f47454d1d3644127f42070181a8b9afc"><br />
</a>现说下订单的重要性：</span></strong></p>
<p>1 、<strong>网站有订单，客户容易信服</strong></p>
<p>2、<strong>能体现商品的价值</strong></p>
<p>在说站长获得订单的办法：</p>
<p>1、<strong>当然是自己手动下单了，<span style="text-decoration: underline;">不信累不死里</span></strong></p>
<p>2、<strong>网上流传一个添加商品下单的插件。(但是那个时间又难以控制，不能形成互动性)</strong></p>
<p>自己好好想想</p>
<p>现在我推出了这样一个订单插件，我说下他的优点：</p>
<p>1、<strong>完全自动生成订单</strong></p>
<p>2、<strong>人性化，说服力高，完全模仿淘宝订单</strong></p>
<p>3、<strong>低耦合，不用修改源代码，便于升级</strong></p>
<p>4、效率高，不影响网站速度</p>
<p>订单演示地址：<a href="http://shop.wangzhibo.com" target="_blank">http://shop.wangzhibo.com</a> （随便打开一个产品，看页面中间部分的）</p>
<p><strong>成功案例: 宜品库: http://www.epkmall.com 网站使用了插件系统，是网站的转化率维持在<span style="text-decoration: underline;"><span style="color: #00ff00;">2%</span></span> 左右；</strong></p>
<p>截图演示:</p>
<p><a href="http://www.wangzhibo.com/wp-content/uploads/2012/05/f47454d1d3644127f42070181a8b9afc"><img title="123" src="http://www.wangzhibo.com/wp-content/uploads/2012/05/f47454d1d3644127f42070181a8b9afc-300x220.jpg" alt="" width="300" height="220" /></a></p>
<p>插件售价:<strong><span style="color: #ff0000;">200</span></strong>元</p>
<p><a href="https://me.alipay.com/tarfly"><img class="alignnone" title="购买插件" src="http://www.wangzhibo.com/wp-content/uploads/2012/02/btn-index.png" alt="" width="159" height="37" /></a></p>
<p>点击上面的链接向我购买： 你也可以联系QQ:815248688</p>
<p>这个订单系统，不单单的是用在ecshop 其他的网站系统也可以使用</p>
<p>插件列表: <a href="http://www.wangzhibo.com/ecshop" target="_blank">http://www.wangzhibo.com/ecshop</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wangzhibo.com/share/1219.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 的 HMAC_SHA1算法 实现</title>
		<link>http://www.wangzhibo.com/php/1200.html</link>
		<comments>http://www.wangzhibo.com/php/1200.html#comments</comments>
		<pubDate>Mon, 14 May 2012 05:33:42 +0000</pubDate>
		<dc:creator>tarfly</dc:creator>
				<category><![CDATA[PHP/PHP框架]]></category>
		<category><![CDATA[HMAC_SHA1]]></category>

		<guid isPermaLink="false">http://www.wangzhibo.com/?p=1200</guid>
		<description><![CDATA[PHP 的 HMAC_SHA1算法 实现 。根据RFC 2316(Report of the IAB，April 1998)，HMAC(散列消息身份验证码: Hashed Message Authentication Code)以及IPSec被认为是Interact安全的关键性核心协议。]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="0" width="664" align="center">
<tbody>
<tr>
<td width="26" height="24"><img src="http://www.prcsc.com/userfiles/image/image001.gif" alt="" width="14" height="14" /></td>
<td width="638"><strong>HMAC </strong><strong><span> </span></strong></td>
</tr>
</tbody>
</table>
<p>根据RFC 2316(Report of the IAB，April 1998)，HMAC(散列消息身份验证码: Hashed Message Authentication Code)以及IPSec被认为是Interact安全的关键性核心协议。它不是散列函数，而是采用了将MD5或SHA1散列函数与共享机密密钥(与公钥／私钥对不同)一起使用的消息身份验证机制。基本来说，消息与密钥组合并运行散列函数。然后运行结果与密钥组合并再次运行散列函数。这个128位的结果被截断成96位，成为MAC.</p>
<p>hmac主要应用在身份验证中，它的使用方法是这样的：<br />
1. 客户端发出登录请求（假设是浏览器的GET请求）<br />
2. 服务器返回一个随机值，并在会话中记录这个随机值<br />
3. 客户端将该随机值作为密钥，用户密码进行hmac运算，然后提交给服务器<br />
4. 服务器读取用户数据库中的用户密码和步骤2中发送的随机值做与客户端一样的hmac运算，然后与用户发送的结果比较，如果结果一致则验证用户合法<br />
在这个过程中，可能遭到安全攻击的是服务器发送的随机值和用户发送的hmac结果，而对于截获了这两个值的黑客而言这两个值是没有意义的，绝无获取用户密码的可能性，随机值的引入使hmac只在当前会话中有效，大大增强了安全性和实用性。大多数的语言都实现了hmac算法，比如php的mhash、python的hmac.py、java的MessageDigest类，在web验证中使用hmac也是可行的，用js进行md5运算的速度也是比较快的。</p>
<table border="0" cellspacing="0" cellpadding="0" width="664" align="center">
<tbody>
<tr>
<td width="26" height="24"><img src="http://www.prcsc.com/userfiles/image/image001.gif" alt="" width="14" height="14" /></td>
<td width="638"><strong>SHA    <span style="color: #000000;"> </span></strong><strong><span> </span><strong> <strong> <strong> <strong> <strong> <strong> <strong> <strong> <strong> <strong> <strong> <strong> <strong> <strong> <strong> <strong> </strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></td>
</tr>
</tbody>
</table>
<p>安全散列算法SHA　(Secure Hash Algorithm)是美国国家标准和技术局发布的国家标准FIPS PUB 180-1，一般称为SHA-1。其对长度不超过264二进制位的消息产生160位的消息摘要输出，按512比特块处理其输入。<br />
SHA是一种数据加密算法，该算法经过加密专家多年来的发展和改进已日益完善，现在已成为公认的最安全的散列算法之一，并被广泛使用。该算法的思想是接收一段明文，然后以一种不可逆的方式将它转换成一段（通常更小）密文，也可以简单的理解为取一串输入码（称为预映射或信息），并把它们转化为长度较短、位数固定的输出序列即散列值（也称为信息摘要或信息认证代码）的过程。散列函数值可以说时对明文的一种“指纹”或是“摘要”所以对散列值的数字签名就可以视为对此明文的数字签名。</p>
<table border="0" cellspacing="0" cellpadding="0" width="664" align="center">
<tbody>
<tr>
<td width="26" height="24"><img src="http://www.prcsc.com/userfiles/image/image001.gif" alt="" width="14" height="14" /></td>
<td width="638"><strong>SHMAC_SHA1</strong></td>
</tr>
</tbody>
</table>
<p>HMAC_SHA1(Hashed Message Authentication Code, Secure Hash Algorithm)是一种安全的基于加密hash函数和共享密钥的消息认证协议。它可以有效地防止数据在传输过程中被截获和篡改，维护了数据的完整性、可靠性和安全性。HMAC_SHA1消息认证机制的成功在于一个加密的hash函数、一个加密的随机密钥和一个安全的密钥交换机制。<br />
HMAC_SHA1 其实还是一种散列算法,只不过是用密钥来求取摘要值的散列算法。<br />
HMAC_SHA1算法在身份验证和数据完整性方面可以得到很好的应用，在目前网络安全也得到较好的实现。</p>
<p>文章来源：<a href="http://www.prcsc.com/info.aspx?m=20100803133543077665">http://www.prcsc.com/info.aspx?m=20100803133543077665</a></p>
<p><strong>附带一个  PHP HMAC_SHA1 算法</strong></p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1200code1'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p12001"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
</pre></td><td class="code" id="p1200code1"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * @使用HMAC-SHA1算法生成oauth_signature签名值
 *
 * @param $key  密钥
 * @param $str  源串
 *
 * @return 签名值
 */</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> get_signature<span style="color: #009900;">&#40;</span><span style="color: #000088;">$str</span><span style="color: #339933;">,</span> <span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$signature</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'hash_hmac'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$signature</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/base64_encode"><span style="color: #990000;">base64_encode</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/hash_hmac"><span style="color: #990000;">hash_hmac</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;sha1&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$str</span><span style="color: #339933;">,</span> <span style="color: #000088;">$key</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$blocksize</span>	<span style="color: #339933;">=</span> <span style="color: #cc66cc;">64</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$hashfunc</span>	<span style="color: #339933;">=</span> <span style="color: #0000ff;">'sha1'</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$blocksize</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$key</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/pack"><span style="color: #990000;">pack</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'H*'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$hashfunc</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000088;">$key</span>	<span style="color: #339933;">=</span> <a href="http://www.php.net/str_pad"><span style="color: #990000;">str_pad</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span><span style="color: #339933;">,</span><span style="color: #000088;">$blocksize</span><span style="color: #339933;">,</span><a href="http://www.php.net/chr"><span style="color: #990000;">chr</span></a><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x00</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$ipad</span>	<span style="color: #339933;">=</span> <a href="http://www.php.net/str_repeat"><span style="color: #990000;">str_repeat</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/chr"><span style="color: #990000;">chr</span></a><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x36</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$blocksize</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$opad</span>	<span style="color: #339933;">=</span> <a href="http://www.php.net/str_repeat"><span style="color: #990000;">str_repeat</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/chr"><span style="color: #990000;">chr</span></a><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x5c</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$blocksize</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$hmac</span> 	<span style="color: #339933;">=</span> <a href="http://www.php.net/pack"><span style="color: #990000;">pack</span></a><span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">'H*'</span><span style="color: #339933;">,</span><span style="color: #000088;">$hashfunc</span><span style="color: #009900;">&#40;</span>
                <span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span>^<span style="color: #000088;">$opad</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><a href="http://www.php.net/pack"><span style="color: #990000;">pack</span></a><span style="color: #009900;">&#40;</span>
                    <span style="color: #0000ff;">'H*'</span><span style="color: #339933;">,</span><span style="color: #000088;">$hashfunc</span><span style="color: #009900;">&#40;</span>
                        <span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span>^<span style="color: #000088;">$ipad</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000088;">$str</span>
                    <span style="color: #009900;">&#41;</span>
                <span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$signature</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/base64_encode"><span style="color: #990000;">base64_encode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hmac</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$signature</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>文章如转载，请注明：转载自：让代码飞扬-PHP[<a href="http://www.wangzhibo.com">http://www.wangzhibo.com/</a>]本文链接地址： <a href="http://www.wangzhibo.com/php/1200.html">http://www.wangzhibo.com/php/1200.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wangzhibo.com/php/1200.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ecshop【十三】 运费超额最低运费设置</title>
		<link>http://www.wangzhibo.com/share/1195.html</link>
		<comments>http://www.wangzhibo.com/share/1195.html#comments</comments>
		<pubDate>Fri, 11 May 2012 03:28:27 +0000</pubDate>
		<dc:creator>tarfly</dc:creator>
				<category><![CDATA[我的作品分享]]></category>
		<category><![CDATA[免运费]]></category>

		<guid isPermaLink="false">http://www.wangzhibo.com/?p=1195</guid>
		<description><![CDATA[运费计算上加一个判断，如果订单的运费高于30元，按30元收取，因为酒类商品运费高，所以设定了如果超一公斤会加收运费，现在的计算方式如果没有满388元，会收他运费但是有可能会高于30元]]></description>
			<content:encoded><![CDATA[<p>有这样一个需求：<br />
运费计算上加一个判断，如果订单的运费高于30元，按30元收取，因为酒类商品运费高，所以设定了如果超一公斤会加收运费，现在的计算方式如果没有满388元，会收他运费但是有可能会高于30元</p>
<p>修改方法：<br />
修改include/lib_order.php</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1195code2'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11952"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p1195code2"><pre class="php" style="font-family:monospace;">在下面这行的上面添加如下代码
<span style="color: #666666; font-style: italic;">//$total['shipping_fee_formated']    = price_format($total['shipping_fee'], false);</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//30 数字自己设置</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$total</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'shipping_fee'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$total</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'shipping_fee'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">30</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>订阅我博客你将获得插件的更新：<br />
<!--以下是QQ邮件列表订阅嵌入代码--><script >var nId = "adc38c7bee9bf89b635e9973aab8b0ed9b7b4dbd5283fe61",nWidth="500px",sColor="light",sText="填写您的QQ邮件地址，订阅我们最新插件的发布与老插件的升级：" ;</script><script src="http://list.qq.com/zh_CN/htmledition/js/qf/page/qfcode.js" charset="gb18030"></script></p>
<p>文章如转载，请注明：转载自：让代码飞扬-PHP[<a href="http://www.wangzhibo.com/share/1184.html">http://www.wangzhibo.com</a>/]本文链接地址： <a href="http://www.wangzhibo.com/share/1184.html">http://www.wangzhibo.com/share/1117.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wangzhibo.com/share/1195.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>升级discuzx 2.5RC ，QQ互联提示当前存在网络问题或服务器繁忙，请您稍候再试 解决办法？</title>
		<link>http://www.wangzhibo.com/php/1191.html</link>
		<comments>http://www.wangzhibo.com/php/1191.html#comments</comments>
		<pubDate>Thu, 03 May 2012 07:56:15 +0000</pubDate>
		<dc:creator>tarfly</dc:creator>
				<category><![CDATA[PHP/PHP框架]]></category>
		<category><![CDATA[discux]]></category>

		<guid isPermaLink="false">http://www.wangzhibo.com/?p=1191</guid>
		<description><![CDATA[升级discuzx 到 2.5RC ，QQ互联提示当前存在网络问题或服务器繁忙，网上找了下解决办法， ]]></description>
			<content:encoded><![CDATA[<p>升级discuzx 到 2.5RC ，QQ互联提示当前存在网络问题或服务器繁忙，网上找了下解决办法， 开始说是版本问题，要等发布正式版本的，但是我升级的就是正式版本的。 最后看到一个帖子说是  http://www.discuz.net/thread-2720190-3-1.html  说是服务器系统时间问题</p>
<p>上服务器看确实服务器时间慢了几秒， <strong>于是 把系统时间 改成跟北京时间一样就OK 了</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wangzhibo.com/php/1191.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ecshop【十二】 会员登录才可以查看权限</title>
		<link>http://www.wangzhibo.com/share/1184.html</link>
		<comments>http://www.wangzhibo.com/share/1184.html#comments</comments>
		<pubDate>Wed, 25 Apr 2012 01:56:25 +0000</pubDate>
		<dc:creator>tarfly</dc:creator>
				<category><![CDATA[PHP/PHP框架]]></category>
		<category><![CDATA[我的作品分享]]></category>
		<category><![CDATA[ecshop会员]]></category>
		<category><![CDATA[文章权限]]></category>

		<guid isPermaLink="false">http://www.wangzhibo.com/?p=1184</guid>
		<description><![CDATA[加入这个代码就实现了登录才可以查看文章。 但是这样是所有的文章都需要登录才能查看， 不是很完美。 
应该这样： 某篇文章，后台勾选是否登录才可以查看]]></description>
			<content:encoded><![CDATA[<p>回答ecshop 论坛 用户:hongxu   的问题[求助] 文章模块怎么增加阅读权限呢？http://bbs.ecshop.com/thread-197495-1-1.html<br />
这个很简单，只要在article.php里面加入一端话就可以了<br />
在:</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1184code3'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11843"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p1184code3"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <a href="http://www.php.net/intval"><span style="color: #990000;">intval</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//在这句话的下面加入下面的代码</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* 未登录处理 */</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    show_message<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;请现登录！&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>加入这个代码就实现了登录才可以查看文章。 但是这样是所有的文章都需要登录才能查看， 不是很完美。<br />
应该这样： 某篇文章，后台勾选是否登录才可以查看。<br />
订阅我博客你将获得插件的更新：<br />
<!--以下是QQ邮件列表订阅嵌入代码--><script >var nId = "adc38c7bee9bf89b635e9973aab8b0ed9b7b4dbd5283fe61",nWidth="500px",sColor="light",sText="填写您的QQ邮件地址，订阅我们最新插件的发布与老插件的升级：" ;</script><script src="http://list.qq.com/zh_CN/htmledition/js/qf/page/qfcode.js" charset="gb18030"></script></p>
<p>文章如转载，请注明：转载自：让代码飞扬-PHP[<a href="http://www.wangzhibo.com/share/1184.html">http://www.wangzhibo.com</a>/]本文链接地址： <a href="http://www.wangzhibo.com/share/1184.html">http://www.wangzhibo.com/share/1117.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wangzhibo.com/share/1184.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ecshop 使用Robots解决重复收录之案例分析</title>
		<link>http://www.wangzhibo.com/share/1182.html</link>
		<comments>http://www.wangzhibo.com/share/1182.html#comments</comments>
		<pubDate>Mon, 23 Apr 2012 04:53:35 +0000</pubDate>
		<dc:creator>tarfly</dc:creator>
				<category><![CDATA[PHP/PHP框架]]></category>
		<category><![CDATA[SEO与程序开发]]></category>
		<category><![CDATA[我的作品分享]]></category>
		<category><![CDATA[ecshop seo]]></category>

		<guid isPermaLink="false">http://www.wangzhibo.com/?p=1182</guid>
		<description><![CDATA[朋友都会知道ECSHOP有严重的重复收录过多的问题，很多朋友的网站实际产品加文章数量仅仅1000来个，查询链接居然有3,4千，google甚至会有上万。 重复链接因为Title一样，所以常常会被搜索引擎惩罚导致收录差，对于这个问题，SEOer们是必须要解决的，以下发表我个人的解决经验，欢迎点评。]]></description>
			<content:encoded><![CDATA[<p>使用过<a href="http://www.ecshop.com">ECSHOP</a>的朋友都会知道ECSHOP有严重的重复收录过多的问题，很多朋友的网站实际产品加文章数量仅仅1000来个，查询链接居然有3,4千，google甚至会有上万。 重复链接因为Title一样，所以常常会被搜索引擎惩罚导致收录差，对于这个问题，SEOer们是必须要解决的，以下发表我个人的解决经验，欢迎点评。</p>
<p>　　分析会有哪些重复链接产生</p>
<p>　　1.就我使用的情况，首先是产品页和文章页会有很多的页面以 ?from=rss 结束</p>
<p>　　如 http://www.xxxx.com/goods-1.html?from=rss</p>
<p>　　这个的解决方法有二，一是通过删除rss信息订阅功能，二是Robots设置</p>
<p>　　我个人选择的是第二种</p>
<p>　　所以我在Robots里加了一条禁止搜索引擎索引的语句：</p>
<p>　　Disallow: /*rss*</p>
<p>　　这句的意思是只要根目录下的链接带 &#8220;rss&#8221;就不索引，除非你的网站会有带页面地址里正好出现rss这连续三个子母，这个语句都可以解决这个问题。</p>
<p>　　2.分类页里的动态链接</p>
<p>　　分类页里充斥了大量的动态链接</p>
<p>　　包括属性筛选的链接</p>
<p>　　排序的链接</p>
<p>　　显示方式的链接</p>
<p>　　接下来我们逐一击破</p>
<p>　　首先是属性筛选的链接</p>
<p>　　如http://www.xxxx.com/category-1-min80-max90-attr0.html</p>
<p>　　这个是筛选里面的价格的筛选</p>
<p>　　包括其他属性的链接，我们发现规律就是都会出现 &#8220;min&#8221; &#8220;max&#8221; &#8220;attr&#8221;三个词，分别是最小，最大，属性值</p>
<p>　　和上面的，我们在Robots加了一跳禁止抓取包括这三个词的语句：</p>
<p>Disallow: /*min*<br />
Disallow: /*max*<br />
Disallow: /*attr*</p>
<p>　　然后，排序的链接和显示方式的链接我们点击后同样会出现类似一长串，其中仍然包括 &#8220;min&#8221; &#8220;max&#8221; &#8220;attr&#8221;三个词</p>
<p>　　因而上面Robots的设置已经可以解决</p>
<p>　　这样就完了吗?没有，虽然我们设置了Robots的抓取，但为了让蜘蛛爬行更方面直接，我们需要做另外一个工作，就是限制爬行</p>
<p>　　找到模板文件里对应的属性筛选和产品列表的模板文件(我自己的是cat_filter.lbi和goods_list.lbi)</p>
<p>　　找到属性筛选、排序、显示方式的链接代码，在其里增加一句 rel=&#8221;nofollow&#8221;，意思就是限制爬行</p>
<p>　　robots的作用在于禁止抓取，而nofollow则在于禁止爬行，双管齐下很好的引导了蜘蛛和搜索引擎</p>
<p>　　3.其它的一些重复动态链接</p>
<p>　　我个人发现的其它重复链接还包括品牌商品里的显示方式</p>
<p>　　如http://www.xxxx.com/brand-1-c0.html?display=text等</p>
<p>　　我在Robots同样加了三句</p>
<p>Disallow: /*min*<br />
Disallow: /*max*<br />
Disallow: /*attr*</p>
<p>　　就解决了不同显示方式还有不同链接的重复收录问题</p>
<p>　　以上个人所提到的并未包含所有的动态链接，但给大家做了一个不错的参考，因为万变不离其宗，朋友们可以依据我提到的方法和思路慢慢的把自己的Robots写完整，同时适当的使用nofollow在模板里限制蜘蛛的爬行</p>
<p>　　注意的是对于已经收录了大量的重复链接，您进行以上提到的修改，搜索引擎并不能快速做出反应，对待新的页面会限制收录重复页面，但对于已经收录的重复链接，搜索引擎需要花了一段时间取消收录而重新收录主页面，个人的经验是至少需要2个月。</p>
<p>　　以上经验由泰摩网球www.taimo.cn原创整理，欢迎转载，但请保留网址，谢谢支持。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wangzhibo.com/share/1182.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ecshop【十一】复制一个新的admin 目录</title>
		<link>http://www.wangzhibo.com/share/1172.html</link>
		<comments>http://www.wangzhibo.com/share/1172.html#comments</comments>
		<pubDate>Thu, 19 Apr 2012 14:09:17 +0000</pubDate>
		<dc:creator>tarfly</dc:creator>
				<category><![CDATA[PHP/PHP框架]]></category>
		<category><![CDATA[我的作品分享]]></category>
		<category><![CDATA[ecshop]]></category>
		<category><![CDATA[ecshop 供货商]]></category>
		<category><![CDATA[供货商]]></category>

		<guid isPermaLink="false">http://www.wangzhibo.com/?p=1172</guid>
		<description><![CDATA[ecshop 来开发一个全新的后台， 屏蔽相应的功能给供货商使用。]]></description>
			<content:encoded><![CDATA[<p>今天<a href="http://www.ecshop.com">ecshop</a>社区(陈是英雄  1002404164) 一个人问我问题，说想重新复制一个admin 目录，碰到问题。不知道他这么做的用意是什么。  记得老版本的<a href="http://www.ecshop.com">ECSHOP </a>不可以自己重新定义admin 目录。<br />
现在看了下 在data/config.php 里面自己可以定义后台的目录了<br />
说下方法，<br />
1、肯定复制一个新的目录， 这里起名叫 myadmin<br />
2、复制 一份 congfig.php 这里命名为 configadmin.php<br />
3、把configadmin.php 里面的 这句话</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1172code4'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11724"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1172code4"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ADMIN_PATH'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'myadmin '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>修改成</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1172code5'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11725"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1172code5"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ADMIN_PATH'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'admin'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>4、在myadmin/includes 的 init.php  47 行左右，把引入的config.php 都改成 configadmin.php</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1172code6'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11726"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p1172code6"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/file_exists"><span style="color: #990000;">file_exists</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'../data/configadmin.php'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'../data/configadmin.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'../includes/configadmin.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>这样就可以了。</p>
<p>这样做有点复杂了， 但是没想到别的办法， 因为 PHP 的常量是不能删除或者重新定义的， 也只能这么做了 </p>
<p>订阅我博客你将获得插件的更新：<br />
<!--以下是QQ邮件列表订阅嵌入代码--><script >var nId = "adc38c7bee9bf89b635e9973aab8b0ed9b7b4dbd5283fe61",nWidth="500px",sColor="light",sText="填写您的QQ邮件地址，订阅我们最新插件的发布与老插件的升级：" ;</script><script src="http://list.qq.com/zh_CN/htmledition/js/qf/page/qfcode.js" charset="gb18030"></script></p>
<p>文章如转载，请注明：转载自：让代码飞扬-PHP<a href="http://www.wangzhibo.com/share/1172.html">[http://www.wangzhibo.com</a>/]本文链接地址： <a href="http://www.wangzhibo.com/share/1172.html">http://www.wangzhibo.com/share/1117.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wangzhibo.com/share/1172.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ecshop【十】批量添加商品评论</title>
		<link>http://www.wangzhibo.com/share/1161.html</link>
		<comments>http://www.wangzhibo.com/share/1161.html#comments</comments>
		<pubDate>Tue, 17 Apr 2012 14:33:04 +0000</pubDate>
		<dc:creator>tarfly</dc:creator>
				<category><![CDATA[PHP/PHP框架]]></category>
		<category><![CDATA[我的作品分享]]></category>
		<category><![CDATA[ecshop]]></category>
		<category><![CDATA[批量评论]]></category>

		<guid isPermaLink="false">http://www.wangzhibo.com/?p=1161</guid>
		<description><![CDATA[新站是不是还在为了评论而发愁。 是不是网站没有评论而缺少点人气啊。手动前台添加略微麻烦，
如果采集， 往往驴唇不对马嘴。 最好的解决办法就是批量添加评论。 整理在一个文档里面批量添加]]></description>
			<content:encoded><![CDATA[<p>新站是不是还在为了评论而发愁。 是不是网站没有评论而缺少点人气啊。手动前台添加略微麻烦，<br />
如果采集， 往往驴唇不对马嘴。 最好的解决办法就是批量添加评论。 整理在一个文档里面批量添加<br />
方法：<br />
1、在后台admin 目录下新建一个文件(这里就叫seo.php)内容如下</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1161code7'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11617"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
</pre></td><td class="code" id="p1161code7"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * 商品，品牌，分类 title description 插件
 * @author 无极限
 * @blog    http://www.wangzhibo.com/ecshop
 * @date    2012/4/17
*/</span>
<a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IN_ECS'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/dirname"><span style="color: #990000;">dirname</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/includes/init.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'act'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$goods_id</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/intval"><span style="color: #990000;">intval</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'goods'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$comment</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$pl</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$comment</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$count</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$icomment</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'###'</span><span style="color: #339933;">,</span><span style="color: #000088;">$pl</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$comment_type</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$id_value</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$goods_id</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$email</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'admin@epkmall.com'</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$icomment</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$icomment</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'匿名'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000088;">$user_name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$icomment</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$icomment</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$icomment</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'卖家服务态度很好！'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000088;">$comment</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/htmlspecialchars"><span style="color: #990000;">htmlspecialchars</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$icomment</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$comment_rank</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mt_rand"><span style="color: #990000;">mt_rand</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$icomment</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
             <span style="color: #000088;">$icomment</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y-m-d H:i:s'</span><span style="color: #339933;">,</span><a href="http://www.php.net/time"><span style="color: #990000;">time</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000088;">$add_time</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strtotime"><span style="color: #990000;">strtotime</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$icomment</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$ip_address</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'127.0.0.1'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$status</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$parent_id</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$user_id</span> <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;INSERT INTO &quot;</span> <span style="color: #339933;">.</span><span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'ecs'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">table</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span>
           <span style="color: #0000ff;">&quot;(comment_type, id_value, email, user_name, content, comment_rank, add_time, ip_address, status, parent_id, user_id) VALUES &quot;</span> <span style="color: #339933;">.</span>
           <span style="color: #0000ff;">&quot;('&quot;</span> <span style="color: #339933;">.</span><span style="color: #000088;">$comment_type</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;', '&quot;</span> <span style="color: #339933;">.</span><span style="color: #000088;">$id_value</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;', '<span style="color: #006699; font-weight: bold;">$email</span>', '<span style="color: #006699; font-weight: bold;">$user_name</span>', '&quot;</span> <span style="color: #339933;">.</span><span style="color: #000088;">$comment</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;', '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$comment_rank</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;', &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$add_time</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;, '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$ip_address</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;', '<span style="color: #006699; font-weight: bold;">$status</span>', '0', '<span style="color: #006699; font-weight: bold;">$user_id</span>')&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'db'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    sys_msg<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'添加评论成功'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">assign</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cat_list'</span><span style="color: #339933;">,</span> cat_list<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$goods</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cat_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$brand</span> <span style="color: #339933;">=</span> get_brand_list<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">assign</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'brand_list'</span><span style="color: #339933;">,</span> get_brand_list<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$goods</span> <span style="color: #339933;">=</span> get_goods_list<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$goods</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$count</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$goods_list</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$goods</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'goods_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$goods</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'goods_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">assign</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'goods_list'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$goods_list</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'seo.html'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>2、看到上面文件那个seo.html 了吗， 那个肯定是模板文件了</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1161code8'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11618"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
</pre></td><td class="code" id="p1161code8"><pre class="html" style="font-family:monospace;">{include file=&quot;pageheader.htm&quot;}
{insert_scripts files=&quot;../js/utils.js,selectzone.js,colorselector.js&quot;}
&lt;div class=&quot;tab-div&quot;&gt;
    &lt;form action='/admin/seo.php?act=comment' method='post'&gt;
     &lt;table align=&quot;center&quot; width=&quot;90%&quot; id=&quot;mix-table&quot; style=&quot;display: table;&quot;&gt;
                    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td class=&quot;label&quot;&gt;&amp;nbsp;&lt;/td&gt;
            &lt;td&gt; &lt;h4&gt;商品批量评论&lt;h4&gt;&lt;/td&gt;
          &lt;/tr&gt;
        &lt;tr&gt;
        &lt;!-- 关联商品 --&gt;
          &lt;!-- 商品搜索 --&gt;
&nbsp;
            &lt;td class=&quot;label&quot;&gt;商品名称：&lt;/td&gt;
            &lt;td colspan=&quot;3&quot;&gt;
              &lt;select name=&quot;cat_id1&quot;&gt;&lt;option value=&quot;0&quot;&gt;{$lang.all_category}{$cat_list}&lt;/select&gt;
              &lt;select name=&quot;brand&quot;&gt;&lt;option value=&quot;0&quot;&gt;{$lang.all_brand}{html_options options=$brand_list}&lt;/select&gt;
              &lt;select name=&quot;goods&quot;&gt;{html_options options=$goods_list}&lt;/select&gt;
              &lt;!--
              &lt;input type=&quot;button&quot; value=&quot;{$lang.button_search}&quot;  class=&quot;button&quot;
                onclick=&quot;searchGoods(sz1, 'cat_id1','brand_id1','keyword1')&quot; /&gt;
                --&gt;
            &lt;/td&gt;
          &lt;/tr&gt;
&nbsp;
          &lt;tr&gt;
          &lt;tr&gt;
            &lt;td class=&quot;label&quot;&gt;标题(title)：&lt;/td&gt;
            &lt;td&gt;&lt;textarea name=&quot;comment&quot; cols=&quot;80&quot; rows=&quot;30&quot;&gt;&lt;/textarea&gt;&lt;/td&gt;
          &lt;/tr&gt;
&nbsp;
        &lt;/tbody&gt;&lt;/table&gt;
&nbsp;
&nbsp;
&lt;/div&gt;
&lt;div class=&quot;button-div&quot;&gt;
          &lt;input type=&quot;hidden&quot; value=&quot;0&quot; name=&quot;goods_id&quot;&gt;
                    &lt;input type=&quot;submit&quot; class=&quot;button&quot; value=&quot; 确定 &quot;&gt;
          &lt;input type=&quot;reset&quot; class=&quot;button&quot; value=&quot; 重置 &quot;&gt;
          &lt;/form&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>3： 文件跟模板文件建立好了，剩下的就是你自己添加内容了<br />
内容规则：    评论内容###用户名###时间      两条评论内容之间用回车</p>
<p>4: 忘记了一点get_goods_list(&#8220;&#8221;) 这个方法只能显示 50 个产品， 如果你想显示全部产品， 可以扩展下这个方法<br />
在 admin/include/lib_main.php<br />
把下面方法加入就可以了</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1161code9'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p11619"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code" id="p1161code9"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> get_all_goods_list<span style="color: #009900;">&#40;</span><span style="color: #000088;">$filter</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$filter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">keyword</span> <span style="color: #339933;">=</span> json_str_iconv<span style="color: #009900;">&#40;</span><span style="color: #000088;">$filter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">keyword</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$where</span> <span style="color: #339933;">=</span> get_where_sql<span style="color: #009900;">&#40;</span><span style="color: #000088;">$filter</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 取得过滤条件</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">/* 取得数据 */</span>
    <span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'SELECT goods_id, goods_name, shop_price '</span><span style="color: #339933;">.</span>
           <span style="color: #0000ff;">'FROM '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'ecs'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">table</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'goods'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' AS g '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$where</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'db'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAll</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$row</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>好了，就这样，你的论坛就活了， 有生气了， 上图看效果(如果你有好的优化建议，请在下方评论)<br />
<a href="http://www.wangzhibo.com/wp-content/uploads/2012/04/04598b8ff811719c935f6da10cef5be3"><img src="http://www.wangzhibo.com/wp-content/uploads/2012/04/04598b8ff811719c935f6da10cef5be3-300x159.jpg" alt="" title="ecshop 批量评论" width="300" height="159" class="alignleft size-medium wp-image-1162" /></a></p>
<p>订阅我博客你将获得插件的更新：<br />
<!--以下是QQ邮件列表订阅嵌入代码--><script >var nId = "adc38c7bee9bf89b635e9973aab8b0ed9b7b4dbd5283fe61",nWidth="500px",sColor="light",sText="填写您的QQ邮件地址，订阅我们最新插件的发布与老插件的升级：" ;</script><script src="http://list.qq.com/zh_CN/htmledition/js/qf/page/qfcode.js" charset="gb18030"></script></p>
<p>文章如转载，请注明：转载自：让代码飞扬-PHP[<a href="http://www.wangzhibo.com/share/1161.html">http://www.wangzhibo.com</a>/]本文链接地址： <a href="http://www.wangzhibo.com/share/1161.html">http://www.wangzhibo.com/share/1117.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wangzhibo.com/share/1161.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ecshop【九】防漏单插件</title>
		<link>http://www.wangzhibo.com/share/1144.html</link>
		<comments>http://www.wangzhibo.com/share/1144.html#comments</comments>
		<pubDate>Fri, 13 Apr 2012 15:31:44 +0000</pubDate>
		<dc:creator>tarfly</dc:creator>
				<category><![CDATA[PHP/PHP框架]]></category>
		<category><![CDATA[我的作品分享]]></category>
		<category><![CDATA[ecshop 防漏单]]></category>
		<category><![CDATA[防漏单]]></category>

		<guid isPermaLink="false">http://www.wangzhibo.com/?p=1144</guid>
		<description><![CDATA[ ecshop 当你的店铺有订单了，会自动往你的手机发一个短信，提醒你有订单了。 让你时刻了解你的订单。]]></description>
			<content:encoded><![CDATA[<p>你有<a href="http://www.ecshop.com">网店系统</a>， 你是不是还在盯着后台，时刻刷新看看到底有没有订单？<br />
你是不是现在在外面外面潇洒呢，但是怕漏了订单不敢潇洒的玩？<br />
你是不是还为了购买短信业务而不愿意发钱买短信业务？<br />
你是不是还&#8230;&#8230;<br />
如果你的回答是YES ，那你继续往下读。<br />
这是这样一款插件， 当你的店铺有订单了，会自动往你的手机发一个短信，提醒你有订单了。 让你时刻了解你的订单。<br />
特点：<br />
1、插件不需要购买任何短信业务，完全免费，只要你有手机<br />
2、实时性， 几乎没有延迟，只要有订单就会收到短信<br />
3、可以设置收短信的时间，如果晚上你不想关机又不想让短信等打扰。 他完全可以做到。<br />
4、优点你自己去体会把。。。。。 拥有他你可以尽情的去泡妹子，钓凯子， 你懂得<br />
总之不管你在干什么， 你都能第一时间知道你网站有订单了<br />
<span style="color: #ff00ff;">插件售价 <strong>￥100</strong> 元人民币</span></p>
<hr /><a href="https://me.alipay.com/tarfly"><img class="alignleft size-full wp-image-1019" title="捐助我" src="http://www.wangzhibo.com/wp-content/uploads/2012/02/btn-index.png" alt="" width="159" height="37" />点击按钮向我付款</a></p>
<p>注:<br />
<span style="color: #ff0000;"> 现在付款并且订阅我的插件 你还可以获得:</span><br />
1、以后这个插件的所有升级服务<br />
2、不管你是<a href="http://wangzhibo.com/ecshop">ECSHOP </a>还是别的开源系统，这个短信业务都可以帮你安装(库存短信提醒,新用户注册提醒等等)</p>
<hr />请用QQ邮箱订阅我，我最新写的插件都将第一时间发送给你 ！(推荐QQ邮箱订阅)</p>
<p><!--以下是QQ邮件列表订阅嵌入代码--><a href="http://list.qq.com/cgi-bin/qf_invite?id=207ab4772eea643436c78dc4915846fb016dd726b47ebb62" target="_blank"><img src="http://rescdn.list.qq.com/zh_CN/htmledition/images/qunfa/manage/picMode_light_l.png" border="0" alt="填写您的邮件地址，订阅我们的精彩内容：" /></a><br />
<strong><span style="color: #0000ff;">请点击按钮或者在下面的输入框输入你的邮箱订阅我的内容(推荐QQ邮箱)</span></strong></p>
<p>文章如转载，请注明：转载自：让代码飞扬-PHP[<a href="http://www.wangzhibo.com/share/1144.html">http://www.wangzhibo.com</a>/]本文链接地址： <a href="http://www.wangzhibo.com/share/1144.html">http://www.wangzhibo.com/share/1144.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wangzhibo.com/share/1144.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ecshop【八】首页调用如何调用促销的结束时间</title>
		<link>http://www.wangzhibo.com/share/1132.html</link>
		<comments>http://www.wangzhibo.com/share/1132.html#comments</comments>
		<pubDate>Thu, 12 Apr 2012 13:06:08 +0000</pubDate>
		<dc:creator>tarfly</dc:creator>
				<category><![CDATA[PHP/PHP框架]]></category>
		<category><![CDATA[我的作品分享]]></category>
		<category><![CDATA[ecshop促销]]></category>
		<category><![CDATA[ecshop倒计时]]></category>

		<guid isPermaLink="false">http://www.wangzhibo.com/?p=1132</guid>
		<description><![CDATA[在论坛看到一个朋友问如何在首页旁边显示首页的倒及时，写了如下代码
]]></description>
			<content:encoded><![CDATA[<p>在论坛看到一个朋友问如何在首页旁边显示首页的倒及时，写了如下代码<br />
1、在include/lib_goods.lbi  里面添加一行代码,大概384行左右</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1132code10'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p113210"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p1132code10"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$goods</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$idx</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'promote_end_date'</span><span style="color: #009900;">&#93;</span>           <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m-d H:i:s'</span><span style="color: #339933;">,</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'promote_end_date'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//把这行代码加在这里</span>
<span style="color: #000088;">$goods</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$idx</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span>           <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'goods_id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>注: 关于时间格式显示请移步<a href="http://www.wangzhibo.com/php/697.html">php格式化时间(全)</a><br />
2、 好了 这样就可以在模板里面调用倒计时了 (默认模板举例子)<br />
library/recommend_promotion.lbi  文件</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1132code11'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p113211"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code" id="p1132code11"><pre class="html" style="font-family:monospace;">&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
&lt;!-- {if $promotion_goods} --&gt;
&lt;div id=&quot;sales&quot; class=&quot;f_l clearfix&quot;&gt;
      &lt;h1&gt;&lt;a href=&quot;../search.php?intro=promotion&quot;&gt;&lt;img src=&quot;images/more.gif&quot; /&gt;&lt;/a&gt;&lt;/h1&gt;
       &lt;div class=&quot;clearfix goodBox&quot;&gt;
         &lt;!--{foreach from=$promotion_goods item=goods name=&quot;promotion_foreach&quot;}--&gt;
        &lt;!--上面的foreach 是一个循环，如果你想调用过期时间只要调用就可以 下面span 标签调用的就是结束时间--&gt;
       &lt;span&gt;{$goods.promote_end_date}&lt;/span&gt;
         {if $smarty.foreach.promotion_foreach.index &lt;= 3}
           &lt;div class=&quot;goodList&quot;&gt;
&nbsp;
           &lt;a href=&quot;{$goods.url}&quot;&gt;&lt;img src=&quot;{$goods.thumb}&quot; border=&quot;0&quot; alt=&quot;{$goods.name|escape:html}&quot;/&gt;&lt;/a&gt;&lt;br /&gt;
					 &lt;p&gt;&lt;a href=&quot;{$goods.url}&quot; title=&quot;{$goods.name|escape:html}&quot;&gt;{$goods.short_name|escape:html}&lt;/a&gt;&lt;/p&gt;
           {$lang.promote_price}&lt;font class=&quot;f1&quot;&gt;{$goods.promote_price}&lt;/font&gt;
           &lt;/div&gt;
         {/if}
         &lt;!--{/foreach}--&gt;
       &lt;/div&gt;
      &lt;/div&gt;
&lt;!-- {/if} --&gt;</pre></td></tr></table></div>

<p>3 、  这样结束时间就可以掉出来了  如下图(当然如果做成倒计时的会更好)<br />
<a href="http://www.wangzhibo.com/wp-content/uploads/2012/04/f47454d1d3644127f42070181a8b9afc"><img src="http://www.wangzhibo.com/wp-content/uploads/2012/04/f47454d1d3644127f42070181a8b9afc-300x132.jpg" alt="" title="123" width="300" height="132" class="alignleft size-medium wp-image-1133" /></a></p>
<p><strong>如果你想得到我这个插件的更新， 与我新推出的插件的 最新信息，你一定要订阅我blog， 我将第一时间通知你。</strong><br />
<!--以下是QQ邮件列表订阅嵌入代码--><script >var nId = "adc38c7bee9bf89b635e9973aab8b0ed9b7b4dbd5283fe61",nWidth="500px",sColor="light",sText="填写您的QQ邮件地址，订阅我们最新插件的发布与老插件的升级：" ;</script><script src="http://list.qq.com/zh_CN/htmledition/js/qf/page/qfcode.js" charset="gb18030"></script></p>
<p>文章如转载，请注明：转载自：让代码飞扬-PHP[http://www.wangzhibo.com/]本文链接地址： http://www.wangzhibo.com/share/1117.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wangzhibo.com/share/1132.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

