<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[SEO]]></title> 
<link>http://www.laohucheng.com/index.php</link> 
<description><![CDATA[厦门SEO - 厦门SEO公司-SEO网站优化 - 老虎城]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[SEO]]></copyright>
<item>
<link>http://www.laohucheng.com/post/423/</link>
<title><![CDATA[ecmall 增加市场价，登录可见]]></title> 
<author>noel &lt;babysir@qq.com&gt;</author>
<category><![CDATA[Ecshop/Ecmall/Smarty]]></category>
<pubDate>Tue, 02 Mar 2010 05:10:12 +0000</pubDate> 
<guid>http://www.laohucheng.com/post/423/</guid> 
<description>
<![CDATA[ 
	到数据库里面找到 ecm_goods这张表 然后添加字段market_price<br/><br/>在languages/sc-utf-8/common.lang.php&nbsp;&nbsp;添加&nbsp;&nbsp;语言 'market_price'&nbsp;&nbsp;&nbsp;&nbsp; => '市 场 价','login_visitor' => '登录可见',<br/><br/>在根目录app/my_goods.app.php&nbsp;&nbsp;<br/>查找 function _get_post_data 大概1663行&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在'tags'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; => trim($_POST['tags']), 下面添加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'market_price'&nbsp;&nbsp;&nbsp;&nbsp; =>floatval($_POST['market_price']),<br/>查找&nbsp;&nbsp;$goods_info = array&nbsp;&nbsp;大概在1638行&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在 'price' => 1, 上面添加&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'market_price' =>'',<br/><br/><br/>完成以上步骤后, 调用的代码是&#123;$lang.market_price&#125;:&nbsp;&nbsp;<!--市场价--><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;$goods.market_price&#124;price&#125;&nbsp;&nbsp;<!--价格显示--><br/>商品详细页面那 市场价的展示,你们自己加上面的代码...<br/>继续&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在themes/mall/default/my_goods.form.html<br/>大概 70行&nbsp;&nbsp; 找到<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; price&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number&nbsp;&nbsp;&nbsp;&nbsp; : true<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;,<br/>在这句话的上面添加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; market_price&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number&nbsp;&nbsp;&nbsp;&nbsp; : true<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;,&nbsp;&nbsp;&nbsp;&nbsp;//判断市场价只能为数字;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>这个页面 100行左右(其实就在上面代码的下面一点点) 找到&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; price&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number&nbsp;&nbsp;&nbsp;&nbsp; : '&#123;$lang.number_only&#125;'<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#125;,<br/>在这句话的上面添加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;market_price&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number&nbsp;&nbsp;&nbsp;&nbsp; : '&#123;$lang.number_only&#125;'&nbsp;&nbsp;//输出错误提示信息<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#125;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>再这个页面 287行左右&nbsp;&nbsp;找到<br/><br/><div class="code">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;li&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;h2&nbsp;&nbsp;ectype=&quot;no_spec&quot;&gt;&#123;$lang.price&#125;: &lt;/h2&gt;</div>在它的上面 添加&nbsp;&nbsp; <br/><br/><br/><div class="code">&lt;li&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2&nbsp;&nbsp;ectype=&quot;no_spec5&quot;&gt;&#123;$lang.market_price&#125;: &lt;/h2&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;arrange&quot;&nbsp;&nbsp;ectype=&quot;no_spec5&quot;&gt;&lt;input name=&quot;market_price&quot; value=&quot;&#123;$goods.market_price&#125;&quot; type=&quot;text&quot; class=&quot;text width_short&quot; /&gt;&lt;/div&gt;<br/>&lt;/li&gt;</div><br/>=================<br/>登录可见<br/><br/><div class="code">&lt;!--&#123;if $visitor.user_id&#125;--&gt;&lt;span class=&quot;fontColor3&quot; ectype=&quot;goods_price&quot;&gt;&#123;$goods._specs.0.price&amp;#124;price&#125;&lt;/span&gt;&lt;!--&#123;else&#125;--&gt;&lt;span&gt;&lt;a href=&quot;&#123;url index.php?app=member&amp;act=login&amp;ret_url=&#125;&quot;&gt;&#123;$lang.login_visitor&#125;&lt;/a&gt;&lt;/span&gt;&lt;!--&#123;/if&#125;--&gt;&lt;br /&gt;</div>
]]>
</description>
</item><item>
<link>http://www.laohucheng.com/post/422/</link>
<title><![CDATA[ecmall二次开发，ecshop二次开发，模板]]></title> 
<author>noel &lt;babysir@qq.com&gt;</author>
<category><![CDATA[厦门资讯 老虎城]]></category>
<pubDate>Wed, 27 Jan 2010 02:50:06 +0000</pubDate> 
<guid>http://www.laohucheng.com/post/422/</guid> 
<description>
<![CDATA[ 
	ecmall二次开发，ecshop二次开发，模板ecmall二次开发，ecshop二次开发，模板<br/>Tags - <a href="http://www.laohucheng.com/tags/ecmall%25E4%25BA%258C%25E6%25AC%25A1%25E5%25BC%2580%25E5%258F%2591/" rel="tag">ecmall二次开发</a> , <a href="http://www.laohucheng.com/tags/ecshop%25E4%25BA%258C%25E6%25AC%25A1%25E5%25BC%2580%25E5%258F%2591/" rel="tag">ecshop二次开发</a>
]]>
</description>
</item><item>
<link>http://www.laohucheng.com/post/421/</link>
<title><![CDATA[ecmall 多系统商城]]></title> 
<author>noel &lt;babysir@qq.com&gt;</author>
<category><![CDATA[Ecshop/Ecmall/Smarty]]></category>
<pubDate>Thu, 21 Jan 2010 05:51:36 +0000</pubDate> 
<guid>http://www.laohucheng.com/post/421/</guid> 
<description>
<![CDATA[ 
	ecmall 二次开发<br/>&nbsp;&nbsp;<a href="http://www.5dlm.com" target="_blank">http://www.5dlm.com</a>
]]>
</description>
</item><item>
<link>http://www.laohucheng.com/post/420/</link>
<title><![CDATA[ ECSHOP 出现  XMlHttpRequest status:[500] Unknow status 这个错误啊？]]></title> 
<author>noel &lt;babysir@qq.com&gt;</author>
<category><![CDATA[Ecshop/Ecmall/Smarty]]></category>
<pubDate>Thu, 24 Dec 2009 05:49:21 +0000</pubDate> 
<guid>http://www.laohucheng.com/post/420/</guid> 
<description>
<![CDATA[ 
	 ECSHOP 出现&nbsp;&nbsp;XMlHttpRequest status:[500] Unknow status 这个错误啊？<br/><br/>/admin/templates/top.htm 的这个文件<br/><br/>&#123;insert_scripts files=”../js/transport.js”&#125;<br/>这个之间的删除<br/></head><br/><br/>也就是下面这段代码删除...<br/><br/><div class="code">&lt;script type=”text/javascript”&gt;<br/>onload = function()<br/>&#123;<br/>Ajax.call(‘index.php?is_ajax=1&amp;act=license’,”, start_sendmail_Response, ‘GET’, ‘JSON’);<br/>&#125;<br/>/**<br/>* 帮助系统调用<br/>*/<br/>function web_address()<br/>&#123;<br/>var ne_add = parent.document.getElementById(‘main-frame’);<br/>var ne_list = ne_add.contentWindow.document.getElementById(’search_id’).innerHTML;<br/>ne_list.replace(‘-’, ”);<br/>var arr = ne_list.split(‘-’);<br/>window.open(‘help.php?al=’+arr&#91;arr.length - 1&#93;,’_blank’);<br/>&#125;<br/><br/>/**<br/>* 授权检测回调处理<br/>*/<br/>function start_sendmail_Response(result)<br/>&#123;<br/>// 运行正常<br/>if (result.error == 0)<br/>&#123;<br/>var str = ”;<br/>if (result&#91;&#039;content&#039;&#93;&#91;&#039;auth_str&#039;&#93;)<br/>&#123;<br/>str = ‘&lt;a href=”javascript:void(0);” target=”_blank”&gt;’ + result&#91;&#039;content&#039;&#93;&#91;&#039;auth_str&#039;&#93;;<br/>if (result&#91;&#039;content&#039;&#93;&#91;&#039;auth_type&#039;&#93;)<br/>&#123;<br/>str += ‘&#91;&#039; + result&#91;&#039;content&#039;&#93;&#91;&#039;auth_type&#039;&#93; + ‘&#93;’;<br/>&#125;<br/>str += ‘&lt;/a&gt; ‘;<br/>&#125;<br/><br/>document.getElementById(‘license-div’).innerHTML = str;<br/>&#125;<br/>&#125;<br/><br/>function modalDialog(url, name, width, height)<br/>&#123;<br/>if (width == undefined)<br/>&#123;<br/>width = 400;<br/>&#125;<br/>if (height == undefined)<br/>&#123;<br/>height = 300;<br/>&#125;<br/><br/>if (window.showModalDialog)<br/>&#123;<br/>window.showModalDialog(url, name, ‘dialogWidth=’ + (width) + ‘px; dialogHeight=’ + (height+5) + ‘px; status=off’);<br/>&#125;<br/>else<br/>&#123;<br/>x = (window.screen.width – width) / 2;<br/>y = (window.screen.height – height) / 2;<br/><br/>window.open(url, name, ‘height=’+height+’, width=’+width+’, left=’+x+’, top=’+y+’, toolbar=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, modal=yes’);<br/>&#125;<br/>&#125;<br/><br/>function ShowToDoList()<br/>&#123;<br/>try<br/>&#123;<br/>var mainFrame = window.top.frames&#91;&#039;main-frame&#039;&#93;;<br/>mainFrame.window.showTodoList(adminId);<br/>&#125;<br/>catch (ex)<br/>&#123;<br/>&#125;<br/>&#125;<br/>&#123;/literal&#125;<br/><br/>var adminId = “&#123;$admin_id&#125;”;<br/>&lt;/script&gt;</div>
]]>
</description>
</item><item>
<link>http://www.laohucheng.com/post/419/</link>
<title><![CDATA[ecshop关于邮件模板翻译的函数]]></title> 
<author>noel &lt;babysir@qq.com&gt;</author>
<category><![CDATA[Ecshop/Ecmall/Smarty]]></category>
<pubDate>Tue, 24 Nov 2009 03:41:29 +0000</pubDate> 
<guid>http://www.laohucheng.com/post/419/</guid> 
<description>
<![CDATA[ 
	ecshop关于邮件模板翻译的函数<br/><br/><br/><div class="code">&#123;$user_name&#125;您好！&lt;br&gt;<br/>&lt;br&gt;<br/>您已经进行了密码重置的操作，请点击以下链接(或者复制到您的浏览器):&lt;br&gt;<br/>&lt;br&gt;<br/>&lt;a href=&quot;&#123;$reset_email&#125;&quot; target=&quot;_blank&quot;&gt;&#123;$reset_email&#125;&lt;/a&gt;&lt;br&gt;<br/>&lt;br&gt;<br/>以确认您的新密码重置操作！&lt;br&gt;<br/>&lt;br&gt;<br/>&#123;$shop_name&#125;&lt;br&gt;<br/>&#123;$send_date&#125;</div><br/> <br/>//以上代码 可以通过<br/>$email_content = $smarty->fetch("str:$email_content");<br/>//赋值得到变量里面的值
]]>
</description>
</item><item>
<link>http://www.laohucheng.com/post/418/</link>
<title><![CDATA[ecshop缓存函数]]></title> 
<author>noel &lt;babysir@qq.com&gt;</author>
<category><![CDATA[Ecshop/Ecmall/Smarty]]></category>
<pubDate>Tue, 24 Nov 2009 03:41:11 +0000</pubDate> 
<guid>http://www.laohucheng.com/post/418/</guid> 
<description>
<![CDATA[ 
	ecshop缓存函数<br/><br/>/**<br/>* 读结果缓存文件<br/>*<br/>* @params&nbsp;&nbsp;string&nbsp;&nbsp;$cache_name<br/>*<br/>* @return&nbsp;&nbsp;array&nbsp;&nbsp; $data<br/>*/<br/>function read_static_cache($cache_name)<br/>&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;if ((DEBUG_MODE & 2) == 2)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return false;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;static $result = array();<br/>&nbsp;&nbsp;&nbsp;&nbsp;if (!empty($result[$cache_name]))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $result[$cache_name];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$cache_file_path = ROOT_PATH . '/temp/static_caches/' . $cache_name . '.php';<br/>&nbsp;&nbsp;&nbsp;&nbsp;if (file_exists($cache_file_path))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;include_once($cache_file_path);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result[$cache_name] = $data;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $result[$cache_name];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return false;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&#125;<br/>/**<br/>* 写结果缓存文件<br/>*<br/>* @params&nbsp;&nbsp;string&nbsp;&nbsp;$cache_name<br/>* @params&nbsp;&nbsp;string&nbsp;&nbsp;$caches<br/>*<br/>* @return<br/>*/<br/>function write_static_cache($cache_name, $caches)<br/>&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;if ((DEBUG_MODE & 2) == 2)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return false;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$cache_file_path = ROOT_PATH . '/temp/static_caches/' . $cache_name . '.php';<br/>&nbsp;&nbsp;&nbsp;&nbsp;$content = "<?php&#92;r&#92;n";<br/>&nbsp;&nbsp;&nbsp;&nbsp;$content .= "&#92;$data = " . var_export($caches, true) . ";&#92;r&#92;n";<br/>&nbsp;&nbsp;&nbsp;&nbsp;$content .= "?>";<br/>&nbsp;&nbsp;&nbsp;&nbsp;file_put_contents($cache_file_path, $content, LOCK_EX);<br/>&#125;
]]>
</description>
</item><item>
<link>http://www.laohucheng.com/post/417/</link>
<title><![CDATA[把ECSHOP的升级提醒删除]]></title> 
<author>noel &lt;babysir@qq.com&gt;</author>
<category><![CDATA[Ecshop/Ecmall/Smarty]]></category>
<pubDate>Tue, 24 Nov 2009 03:40:47 +0000</pubDate> 
<guid>http://www.laohucheng.com/post/417/</guid> 
<description>
<![CDATA[ 
	把ECSHOP的升级提醒删除<br/>删除ECSHOP版本更新提醒信息<br/><br/>打开 <br/><br/>admin/index.php 删除如下<br/><br/>if (gmtime() - $_SESSION['last_check'] > (3600 * 12))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;include_once(ROOT_PATH . 'includes/cls_transport.php');<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ecs_version = VERSION;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ecs_lang = $_CFG['lang'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ecs_release = RELEASE;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$php_ver = PHP_VERSION;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$mysql_ver = $db->version();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$order['stats'] = $db->getRow('SELECT COUNT(*) AS oCount, IFNULL(SUM(order_amount), 0) AS oAmount' .<br/>&nbsp;&nbsp;&nbsp;&nbsp;' FROM ' .$ecs->table('order_info'));<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ocount = $order['stats']['oCount'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$oamount = $order['stats']['oAmount'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$goods['total']&nbsp;&nbsp; = $db->GetOne('SELECT COUNT(*) FROM ' .$ecs->table('goods').<br/>&nbsp;&nbsp;&nbsp;&nbsp;' WHERE is_delete = 0 AND is_alone_sale = 1 AND is_real = 1');<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$gcount = $goods['total'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ecs_charset = strtoupper(EC_CHARSET);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ecs_user = $db->getOne('SELECT COUNT(*) FROM ' . $ecs->table('users'));<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ecs_template = $db->getOne('SELECT value FROM ' . $ecs->table('shop_config') . ' WHERE code = &#92;'template&#92;'');<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$style = $db->getOne('SELECT value FROM ' . $ecs->table('shop_config') . ' WHERE code = &#92;'stylename&#92;'');<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($style == '')<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$style = '0';<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ecs_style = $style;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$shop_url = urlencode($ecs->url());<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$apiget = "ver= $ecs_version &lang= $ecs_lang &release= $ecs_release &php_ver= $php_ver &mysql_ver= $mysql_ver &ocount= $ocount &oamount= $oamount &gcount= $gcount &charset= $ecs_charset &usecount= $ecs_user &template= $ecs_template &style= $ecs_style &url= $shop_url ";<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$t = new transport;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$api_comment = $t->request('http://api.ecshop.com/checkver.php', $apiget);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$api_str = $api_comment["body"];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $api_str;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;
]]>
</description>
</item><item>
<link>http://www.laohucheng.com/post/416/</link>
<title><![CDATA[ecshop中调用smarty的foreach-iteration函数]]></title> 
<author>noel &lt;babysir@qq.com&gt;</author>
<category><![CDATA[Ecshop/Ecmall/Smarty]]></category>
<pubDate>Tue, 24 Nov 2009 03:40:19 +0000</pubDate> 
<guid>http://www.laohucheng.com/post/416/</guid> 
<description>
<![CDATA[ 
	<strong>ecshop中调用smarty的foreach-iteration函数</strong><br/>&nbsp;&nbsp;ecshop中的模板技术确实不错,ecshop的smarty也写的很好,foreach标签是ecshop中smarty用的最多的一个标签了。而foreach中的iteration非常有用。<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;iteration其实是foreach循环中的下标,而且从1开始.直接循环。所以在ecshop销售排行中，很多人用这个来区分销售的图标.他是foreach下name的键值.&#123;foreach name=top_goods from=$top_goods item=goods&#125;<br/> <br/><div class="code"><br/>&nbsp;&nbsp; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gbk&quot;&gt;<br/>&lt;div class=&quot;mod2&quot;&gt;<br/> &lt;h1&gt;&lt;span class=&quot;left&quot;&gt;&lt;/span&gt;&lt;span class=&quot;right&quot;&gt;&lt;/span&gt;销售排行&lt;/h1&gt;<br/> &lt;!-- &#123;foreach name=top_goods from=$top_goods item=goods&#125;--&gt;<br/>&nbsp;&nbsp;&lt;ul class=&quot;top10 clearfix&quot;&gt;<br/> &lt;li&gt;&lt;img src=&quot;../images/top_&#123;$smarty.foreach.top_goods.iteration&#125;.gif&quot; class=&quot;iteration&quot; /&gt;<br/> &lt;!-- &#123;if $smarty.foreach.top_goods.iteration&lt;2&#125;--&gt;<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;table width=&quot;185&quot; border=&quot;0&quot;&gt;<br/>&nbsp;&nbsp;&lt;tr&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;a href=&quot;&#123;$goods.url&#125;&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;&#123;$goods.thumb&#125;&quot; alt=&quot;&#123;$goods.name&amp;#124;escape:html&#125;&quot; class=&quot;topimg&quot; height=&quot;80px&quot; width=&quot;80px&quot; /&gt;&lt;/a&gt;&lt;/td&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;售价：&lt;font class=&quot;f1&quot;&gt;&#123;$goods.price&#125;&lt;/font&gt;&lt;/td&gt;<br/>&nbsp;&nbsp;&lt;/tr&gt;<br/>&lt;/table&gt;<br/> <br/> <br/> <br/> &lt;!-- &#123;/if&#125; --&gt; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&#123;if $smarty.foreach.top_goods.iteration&lt;4&#125;class=&quot;iteration1&quot;&#123;/if&#125;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href=&quot;&#123;$goods.url&#125;&quot; title=&quot;&#123;$goods.name&amp;#124;escape:html&#125;&quot; target=&quot;_blank&quot;&gt;&#123;$goods.short_name&#125;&lt;/a&gt;&lt;br /&gt;<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;<br/>&nbsp;&nbsp; &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;<br/>&nbsp;&nbsp;&lt;!-- &#123;/foreach&#125; --&gt;<br/>&lt;/div&gt;<br/> </div>&nbsp;&nbsp;&nbsp;&nbsp;这个是ecshop销售排行的模板,他通过巧妙使用foreach来实现了图标的对应<br/><div class="code">.&gt;&lt;img src=&quot;../images/top_&#123;$smarty.foreach.top_goods.iteration&#125;.gif&quot; class=&quot;iteration&quot; /&gt;</div>
]]>
</description>
</item><item>
<link>http://www.laohucheng.com/post/415/</link>
<title><![CDATA[ECSHOP前台添加搜索问题功能]]></title> 
<author>noel &lt;babysir@qq.com&gt;</author>
<category><![CDATA[Ecshop/Ecmall/Smarty]]></category>
<pubDate>Tue, 24 Nov 2009 03:39:46 +0000</pubDate> 
<guid>http://www.laohucheng.com/post/415/</guid> 
<description>
<![CDATA[ 
	ECSHOP前台添加搜索问题功能<br/> <br/> <br/>//lib_main.php<br/>function assign_comment($id, $type, $type2=0, $page = 1,$search=false)<br/>&#123;<br/>&nbsp;&nbsp;if($search)&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$comment_where = (!empty($type2)) ? " AND content LIKE '%" . mysql_like_quote($type2) . "%' " : '';<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;else&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$comment_where=&nbsp;&nbsp;(!empty($type2)) ? " AND comment_type2 = '".$type2."'" : '';<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;/* 取得评论列表 */<br/>&nbsp;&nbsp;&nbsp;&nbsp;$count = $GLOBALS['db']->getOne('SELECT COUNT(*) FROM ' .$GLOBALS['ecs']->table('comment').<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " WHERE id_value = '$id' AND comment_type = '$type' $comment_where&nbsp;&nbsp;AND status = 1 AND parent_id = 0");<br/>&nbsp;&nbsp;&nbsp;&nbsp;$size&nbsp;&nbsp;= !empty($GLOBALS['_CFG']['comments_number']) ? $GLOBALS['_CFG']['comments_number'] : 5;<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;$page_count = ($count > 0) ? intval(ceil($count / $size)) : 1;<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;$sql = 'SELECT * FROM ' . $GLOBALS['ecs']->table('comment') .<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" WHERE id_value = '$id' AND comment_type = '$type' $comment_where AND status = 1 AND parent_id = 0".<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' ORDER BY comment_id DESC';<br/>&nbsp;&nbsp;&nbsp;&nbsp;$res = $GLOBALS['db']->selectLimit($sql, $size, ($page-1) * $size);<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;$arr = array();<br/>&nbsp;&nbsp;&nbsp;&nbsp;$ids = '';<br/>&nbsp;&nbsp;&nbsp;&nbsp;while ($row = $GLOBALS['db']->fetchRow($res))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ids .= $ids ? ",$row[comment_id]" : $row['comment_id'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['comment_id']]['id']&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = $row['comment_id'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['comment_id']]['email']&nbsp;&nbsp;&nbsp;&nbsp;= $row['email'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['comment_id']]['comment_type2'] = $row['comment_type2'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['comment_id']]['username'] = $row['user_name'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['comment_id']]['content']&nbsp;&nbsp;= str_replace('&#92;r&#92;n', '<br />', htmlspecialchars($row['content']));<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['comment_id']]['content']&nbsp;&nbsp;= str_replace('&#92;n', '<br />', $arr[$row['comment_id']]['content']);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['comment_id']]['rank']&nbsp;&nbsp;&nbsp;&nbsp; = $row['comment_rank'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['comment_id']]['add_time'] = local_date($GLOBALS['_CFG']['time_format'], $row['add_time']);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;/* 取得已有回复的评论 */<br/>&nbsp;&nbsp;&nbsp;&nbsp;if ($ids)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$sql = 'SELECT * FROM ' . $GLOBALS['ecs']->table('comment') .<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" WHERE parent_id IN( $ids )";<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$res = $GLOBALS['db']->query($sql);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while ($row = $GLOBALS['db']->fetch_array($res))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['parent_id']]['re_content']&nbsp;&nbsp;= str_replace('&#92;n', '<br />', htmlspecialchars($row['content']));<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['parent_id']]['re_add_time'] = local_date($GLOBALS['_CFG']['time_format'], $row['add_time']);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['parent_id']]['re_email']&nbsp;&nbsp;&nbsp;&nbsp;= $row['email'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr[$row['parent_id']]['re_username'] = $row['user_name'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;/* 分页样式 */<br/>&nbsp;&nbsp;&nbsp;&nbsp;//$pager['styleid'] = isset($GLOBALS['_CFG']['page_style'])? intval($GLOBALS['_CFG']['page_style']) : 0;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$pager['page']&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = $page;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$pager['size']&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = $size;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$pager['record_count'] = $count;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$pager['page_count']&nbsp;&nbsp; = $page_count;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$pager['page_first']&nbsp;&nbsp; = "javascript:gotoPage(1,$id,$type,$type2)";<br/>&nbsp;&nbsp;&nbsp;&nbsp;$pager['page_prev']&nbsp;&nbsp;&nbsp;&nbsp;= $page > 1 ? "javascript:gotoPage(" .($page-1). ",$id,$type,$type2)" : 'javascript:;';<br/>&nbsp;&nbsp;&nbsp;&nbsp;$pager['page_next']&nbsp;&nbsp;&nbsp;&nbsp;= $page < $page_count ? 'javascript:gotoPage(' .($page + 1) . ",$id,$type,$type2)" : 'javascript:;';<br/>&nbsp;&nbsp;&nbsp;&nbsp;$pager['page_last']&nbsp;&nbsp;&nbsp;&nbsp;= $page < $page_count ? 'javascript:gotoPage(' .$page_count. ",$id,$type,$type2)"&nbsp;&nbsp;: 'javascript:;';<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;$cmt = array('comments' => $arr, 'pager' => $pager);<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;return $cmt;<br/>&#125;<br/> <br/> <br/>//comment.php<br/> <br/>&nbsp;&nbsp;/*<br/>&nbsp;&nbsp;&nbsp;&nbsp; * act 参数不为空<br/>&nbsp;&nbsp;&nbsp;&nbsp; * 默认为评论内容列表<br/>&nbsp;&nbsp;&nbsp;&nbsp; * 根据 _GET 创建一个静态对象<br/>&nbsp;&nbsp;&nbsp;&nbsp; */<br/>&nbsp;&nbsp;&nbsp;&nbsp;$cmt = new stdClass();<br/>&nbsp;&nbsp;&nbsp;&nbsp;$cmt->id&nbsp;&nbsp; = !empty($_GET['id'])&nbsp;&nbsp; ? intval($_GET['id'])&nbsp;&nbsp; : 0;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$cmt->type = !empty($_GET['type']) ? intval($_GET['type']) : 0;<br/>&nbsp;&nbsp;//$cmt->type2 = !empty($_GET['type2']) ? intval($_GET['type2']) : 0;<br/> <br/> <br/>&nbsp;&nbsp;if(isset($_GET['type2']))&#123;<br/>&nbsp;&nbsp;$cmt->type2 = !empty($_GET['type2']) ? intval($_GET['type2']) : 0;<br/>&nbsp;&nbsp;$search=false;<br/>&nbsp;&nbsp;&#125;else&#123;<br/>&nbsp;&nbsp;$cmt->type2 = !empty($_GET['keyword']) ? trim($_GET['keyword']) : 0;<br/>&nbsp;&nbsp;$cmt->type2 = iconv("UTF-8","GB2312",$cmt->type2);<br/>&nbsp;&nbsp;$search=true;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$cmt->page = !empty($_GET['page']) ? intval($_GET['page']) : 1;<br/>&#125;<br/> <br/>if ($result['error'] == 0)<br/>&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$comments = assign_comment($cmt->id, $cmt->type, $cmt->type2, $cmt->page,$search);<br/> <br/>//因为之前做了评论分频道 所以TYPE2为列表的定位 现在用来做KEYWORDS的入口给 assign_comment 函数<br/> <br/>//最后是JS<br/> <br/>&nbsp;&nbsp;function searchComment()<br/>&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var keyword =&nbsp;&nbsp;document.getElementById('zx_search').value;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (keyword.length > 0)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/> Ajax.call('comment.php?act=gotopage', 'page=' + 1 + '&id=' + &#123;$id&#125; + '&type=' + &#123;$comment_type&#125; + '&keyword=' + keyword, gotoPageResponse, 'GET', 'JSON');<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById('zx_search').focus();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&#125;
]]>
</description>
</item><item>
<link>http://www.laohucheng.com/post/414/</link>
<title><![CDATA[ECSHOP-index_get_only_article 指定获取1篇文章]]></title> 
<author>noel &lt;babysir@qq.com&gt;</author>
<category><![CDATA[Ecshop/Ecmall/Smarty]]></category>
<pubDate>Tue, 24 Nov 2009 03:39:03 +0000</pubDate> 
<guid>http://www.laohucheng.com/post/414/</guid> 
<description>
<![CDATA[ 
	ECSHOP-index_get_only_article 指定获取1篇文章<br/><br/>/**<br/>* 获得指定栏目文章内容。<br/>*<br/>* @access&nbsp;&nbsp;private<br/>* @return&nbsp;&nbsp;array<br/>*/<br/>function index_get_only_article($cat_aid)<br/>&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$sql = "SELECT title ,content FROM " .$GLOBALS['ecs']->table('article'). " WHERE article_id&nbsp;&nbsp;= ".$cat_aid." LIMIT 1";<br/>&nbsp;&nbsp;&nbsp;&nbsp;$res = $GLOBALS['db']->getAll($sql);<br/>&nbsp;&nbsp;&nbsp;&nbsp;$arr = array();<br/>&nbsp;&nbsp;&nbsp;&nbsp;foreach ($res AS $row)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr['title']&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = $row['title'];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$arr['content']&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = $row['content'];&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;return $arr;<br/>&#125;
]]>
</description>
</item>
</channel>
</rss>