PageRenderTime 76ms CodeModel.GetById 4ms RepoModel.GetById 0ms app.codeStats 0ms

/temp/compiled/goods.dwt.php

https://bitbucket.org/luxi78/fengyu
PHP | 427 lines | 369 code | 49 blank | 9 comment | 74 complexity | 28171a81eb676a51bb38a0b996bccd28 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta name="Generator" content="ECSHOP v2.7.0" />
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <meta name="Keywords" content="<?php echo $this->_var['keywords']; ?>" />
  7. <meta name="Description" content="<?php echo $this->_var['description']; ?>" />
  8. <title><?php echo $this->_var['page_title']; ?></title>
  9. <link rel="shortcut icon" href="favicon.ico" />
  10. <link rel="icon" href="animated_favicon.gif" type="image/gif" />
  11. <link href="<?php echo $this->_var['ecs_css_path']; ?>" rel="stylesheet" type="text/css" />
  12. <?php echo $this->smarty_insert_scripts(array('files'=>'common.js')); ?>
  13. <script type="text/javascript">
  14. function $(element) {
  15. return document.getElementById(element);
  16. }
  17. //??--????_v??????_h????
  18. function reg(str){
  19. var bt=$(str+"_b").getElementsByTagName("h2");
  20. for(var i=0;i<bt.length;i++){
  21. bt[i].subj=str;
  22. bt[i].pai=i;
  23. bt[i].style.cursor="pointer";
  24. bt[i].onclick=function(){
  25. $(this.subj+"_v").innerHTML=$(this.subj+"_h").getElementsByTagName("blockquote")[this.pai].innerHTML;
  26. for(var j=0;j<$(this.subj+"_b").getElementsByTagName("h2").length;j++){
  27. var _bt=$(this.subj+"_b").getElementsByTagName("h2")[j];
  28. var ison=j==this.pai;
  29. _bt.className=(ison?"":"h2bg");
  30. }
  31. }
  32. }
  33. $(str+"_h").className="none";
  34. $(str+"_v").innerHTML=$(str+"_h").getElementsByTagName("blockquote")[0].innerHTML;
  35. }
  36. </script>
  37. </head>
  38. <body>
  39. <?php echo $this->fetch('library/page_header.lbi'); ?>
  40. <?php echo $this->fetch('library/search_form.lbi'); ?>
  41. <?php echo $this->fetch('library/ur_here.lbi'); ?>
  42. <div class="block clearfix">
  43. <div id="areaLeft">
  44. <div id="goodsLtop">
  45. <div class="cartBox">
  46. <?php echo $this->fetch('library/cart.lbi'); ?>
  47. </div>
  48. <div class="Gaction clearfix">
  49. <a href="user.php"><?php echo $this->_var['lang']['label_login']; ?></a><a href="user.php?act=register"><?php echo $this->_var['lang']['label_regist']; ?></a>
  50. <a href="user.php?act=profile"><?php echo $this->_var['lang']['label_profile']; ?></a><a href="user.php?act=collection_list"><?php echo $this->_var['lang']['label_collection']; ?></a>
  51. </div>
  52. </div>
  53. <?php echo $this->fetch('library/category_tree.lbi'); ?>
  54. <?php echo $this->fetch('library/promotion_info.lbi'); ?>
  55. <?php echo $this->fetch('library/ad_position.lbi'); ?>
  56. <?php echo $this->fetch('library/history.lbi'); ?>
  57. <?php echo $this->fetch('library/goods_article.lbi'); ?>
  58. <?php echo $this->fetch('library/goods_attrlinked.lbi'); ?>
  59. </div>
  60. <div id="areaRight">
  61. <div id="goodsInfo">
  62. <span class="kokLtop"></span><span class="kokLbot"></span>
  63. <span class="kokRtop"></span><span class="kokRbot"></span>
  64. <div class="clearfix w740">
  65. <div style="background:#6633FF; height:0px; font-size:0px; overflow:hidden;">????</div>
  66. <div class="left">
  67. <?php if ($this->_var['pictures']): ?>
  68. <a href="javascript:;" onclick="window.open('gallery.php?id=<?php echo $this->_var['goods']['goods_id']; ?>'); return false;">
  69. <img src="<?php echo $this->_var['goods']['goods_img']; ?>" alt="<?php echo htmlspecialchars($this->_var['goods']['goods_name']); ?>"/>
  70. </a>
  71. <?php else: ?>
  72. <img src="<?php echo $this->_var['goods']['goods_img']; ?>" alt="<?php echo htmlspecialchars($this->_var['goods']['goods_name']); ?>"/>
  73. <?php endif; ?>
  74. <?php echo $this->fetch('library/goods_gallery.lbi'); ?>
  75. </div>
  76. <div class="right">
  77. <form action="javascript:addToCart(<?php echo $this->_var['goods']['goods_id']; ?>)" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY" >
  78. <p>
  79. <span style="float:right; width:150px; height:18px;">
  80. <?php if ($this->_var['prev_good']): ?>
  81. <a href="<?php echo $this->_var['prev_good']['url']; ?>"><img alt="prev" src="themes/clothing/images/up.gif" /></a>
  82. <?php endif; ?>
  83. <?php if ($this->_var['next_good']): ?>
  84. <a href="<?php echo $this->_var['next_good']['url']; ?>"><img alt="next" src="themes/clothing/images/down.gif" /></a>
  85. <?php endif; ?>
  86. </span>
  87. <?php echo $this->_var['goods']['goods_style_name']; ?>
  88. </p>
  89. <?php if ($this->_var['promotion']): ?>
  90. <?php $_from = $this->_var['promotion']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
  91. foreach ($_from AS $this->_var['key'] => $this->_var['item']):
  92. ?>
  93. <?php echo $this->_var['lang']['activity']; ?>
  94. <?php if ($this->_var['item']['type'] == "snatch"): ?>
  95. <a href="snatch.php" title="<?php echo $this->_var['lang']['snatch']; ?>" style="font-weight:100; color:#006bcd; text-decoration:none;">[<?php echo $this->_var['lang']['snatch']; ?>]</a>
  96. <?php elseif ($this->_var['item']['type'] == "group_buy"): ?>
  97. <a href="group_buy.php" title="<?php echo $this->_var['lang']['group_buy']; ?>" style="font-weight:100; color:#006bcd; text-decoration:none;">[<?php echo $this->_var['lang']['group_buy']; ?>]</a>
  98. <?php elseif ($this->_var['item']['type'] == "auction"): ?>
  99. <a href="auction.php" title="<?php echo $this->_var['lang']['auction']; ?>" style="font-weight:100; color:#006bcd; text-decoration:none;">[<?php echo $this->_var['lang']['auction']; ?>]</a>
  100. <?php elseif ($this->_var['item']['type'] == "favourable"): ?>
  101. <a href="activity.php" title="<?php echo $this->_var['lang']['favourable']; ?>" style="font-weight:100; color:#006bcd; text-decoration:none;">[<?php echo $this->_var['lang']['favourable']; ?>]</a>
  102. <?php endif; ?>
  103. <a href="<?php echo $this->_var['item']['url']; ?>" title="<?php echo $this->_var['lang'][$this->_var['item']['type']]; ?> <?php echo $this->_var['item']['act_name']; ?><?php echo $this->_var['item']['time']; ?>" style="font-weight:100; color:#006bcd;"><?php echo $this->_var['item']['act_name']; ?></a><br />
  104. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  105. <?php endif; ?>
  106. <?php if ($this->_var['cfg']['show_goodssn']): ?>
  107. <strong><?php echo $this->_var['lang']['goods_sn']; ?></strong><?php echo $this->_var['goods']['goods_sn']; ?><br />
  108. <?php endif; ?>
  109. <?php if ($this->_var['goods']['goods_number'] != "" && $this->_var['cfg']['show_goodsnumber']): ?>
  110. <?php if ($this->_var['goods']['goods_number'] == 0): ?>
  111. <strong><?php echo $this->_var['lang']['goods_number']; ?></strong> <font color='red'><?php echo $this->_var['lang']['stock_up']; ?></font><br />
  112. <?php else: ?>
  113. <strong><?php echo $this->_var['lang']['goods_number']; ?></strong> <?php echo $this->_var['goods']['goods_number']; ?> <?php echo $this->_var['goods']['measure_unit']; ?><br />
  114. <?php endif; ?>
  115. <?php endif; ?>
  116. <?php if ($this->_var['goods']['goods_brand'] != "" && $this->_var['cfg']['show_brand']): ?>
  117. <strong><?php echo $this->_var['lang']['goods_brand']; ?></strong><a href="<?php echo $this->_var['goods']['goods_brand_url']; ?>" ><?php echo $this->_var['goods']['goods_brand']; ?></a><br />
  118. <?php endif; ?>
  119. <?php if ($this->_var['cfg']['show_goodsweight']): ?>
  120. <strong><?php echo $this->_var['lang']['goods_weight']; ?></strong><?php echo $this->_var['goods']['goods_weight']; ?><br />
  121. <?php endif; ?>
  122. <?php if ($this->_var['cfg']['show_addtime']): ?>
  123. <strong><?php echo $this->_var['lang']['add_time']; ?></strong><?php echo $this->_var['goods']['add_time']; ?><br />
  124. <?php endif; ?>
  125. <strong><?php echo $this->_var['lang']['goods_click_count']; ?>?</strong><?php echo $this->_var['goods']['click_count']; ?><br />
  126. <?php if ($this->_var['cfg']['show_marketprice']): ?>
  127. <strong><?php echo $this->_var['lang']['market_price']; ?></strong><font class="price"><?php echo $this->_var['goods']['market_price']; ?></font><br />
  128. <?php endif; ?>
  129. <strong><?php echo $this->_var['lang']['shop_price']; ?></strong><font class="price" id="ECS_SHOPPRICE"><?php echo $this->_var['goods']['shop_price_formated']; ?></font><br />
  130. <?php $_from = $this->_var['rank_prices']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'rank_price');if (count($_from)):
  131. foreach ($_from AS $this->_var['key'] => $this->_var['rank_price']):
  132. ?>
  133. <strong><?php echo $this->_var['rank_price']['rank_name']; ?>?</strong><font class="price" id="ECS_RANKPRICE_<?php echo $this->_var['key']; ?>"><?php echo $this->_var['rank_price']['price']; ?></font><br />
  134. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  135. <strong><?php echo $this->_var['lang']['goods_rank']; ?></strong> <img src="themes/clothing/images/stars<?php echo $this->_var['goods']['comment_rank']; ?>.gif" alt="comment rank <?php echo $this->_var['goods']['comment_rank']; ?>" /><br />
  136. <?php if ($this->_var['volume_price_list']): ?>
  137. <p style="padding:8px 0; overflow:hidden; zoom:1;">
  138. <font class="f1" style="font-size:12px;"><?php echo $this->_var['lang']['volume_price']; ?>?</font><br />
  139. <table width="95%" style="float:left; font-size:12px;" border="0" cellpadding="3" cellspacing="1" bgcolor="#aad6ff">
  140. <tr>
  141. <td align="center" bgcolor="#FFFFFF"><b><?php echo $this->_var['lang']['number_to']; ?></b></td>
  142. <td align="center" bgcolor="#FFFFFF"><b>????</b></td>
  143. </tr>
  144. <?php $_from = $this->_var['volume_price_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('price_key', 'price_list');if (count($_from)):
  145. foreach ($_from AS $this->_var['price_key'] => $this->_var['price_list']):
  146. ?>
  147. <tr>
  148. <td align="center" bgcolor="#FFFFFF" style="font-weight:normal;" ><?php echo $this->_var['price_list']['number']; ?></td>
  149. <td align="center" bgcolor="#FFFFFF" style="font-weight:normal;" ><?php echo $this->_var['price_list']['format_price']; ?></td>
  150. </tr>
  151. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  152. </table>
  153. </p>
  154. <?php endif; ?>
  155. <?php if ($this->_var['goods']['is_promote'] && $this->_var['goods']['gmt_end_time']): ?>
  156. <?php echo $this->smarty_insert_scripts(array('files'=>'lefttime.js')); ?>
  157. <strong><?php echo $this->_var['lang']['promote_price']; ?></strong><font class="price"><?php echo $this->_var['goods']['promote_price']; ?></font><br />
  158. <strong><?php echo $this->_var['lang']['residual_time']; ?></strong> <font class="f1" id="leftTime"><?php echo $this->_var['lang']['please_waiting']; ?></font><br />
  159. <?php endif; ?>
  160. <strong><?php echo $this->_var['lang']['amount']; ?>?</strong><font id="ECS_GOODS_AMOUNT" class="price"></font><br />
  161. <?php if ($this->_var['goods']['give_integral'] > 0): ?>
  162. <strong><?php echo $this->_var['lang']['goods_give_integral']; ?></strong><font class="f1"><?php echo $this->_var['goods']['give_integral']; ?> <?php echo $this->_var['points_name']; ?></font><br />
  163. <?php endif; ?>
  164. <?php if ($this->_var['goods']['bonus_money']): ?>
  165. <strong><?php echo $this->_var['lang']['goods_bonus']; ?></strong><font class="shop"><?php echo $this->_var['goods']['bonus_money']; ?></font><br />
  166. <?php endif; ?>
  167. <strong><?php echo $this->_var['lang']['number']; ?>?</strong>
  168. <input name="number" type="text" id="number" value="1" size="4" onBlur="changePrice()" class="border"/><br />
  169. <?php if ($this->_var['goods']['integral'] > 0): ?>
  170. <strong><?php echo $this->_var['lang']['goods_integral']; ?></strong><font class="f1"><?php echo $this->_var['goods']['integral']; ?> <?php echo $this->_var['points_name']; ?></font><br />
  171. <?php endif; ?>
  172. <?php $_from = $this->_var['specification']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('spec_key', 'spec');if (count($_from)):
  173. foreach ($_from AS $this->_var['spec_key'] => $this->_var['spec']):
  174. ?>
  175. <strong><?php echo $this->_var['spec']['name']; ?>?</strong><br />
  176. <?php if ($this->_var['spec']['attr_type'] == 1): ?>
  177. <?php if ($this->_var['cfg']['goodsattr_style'] == 1): ?>
  178. <?php $_from = $this->_var['spec']['values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'value');if (count($_from)):
  179. foreach ($_from AS $this->_var['key'] => $this->_var['value']):
  180. ?>
  181. <label for="spec_value_<?php echo $this->_var['value']['id']; ?>">
  182. <input type="radio" name="spec_<?php echo $this->_var['spec_key']; ?>" value="<?php echo $this->_var['value']['id']; ?>" id="spec_value_<?php echo $this->_var['value']['id']; ?>" <?php if ($this->_var['key'] == 0): ?>checked<?php endif; ?> onClick="changePrice()" />
  183. <?php echo $this->_var['value']['label']; ?> [<?php if ($this->_var['value']['price'] > 0): ?><?php echo $this->_var['lang']['plus']; ?><?php elseif ($this->_var['value']['price'] < 0): ?><?php echo $this->_var['lang']['minus']; ?><?php endif; ?> <?php echo $this->_var['value']['format_price']; ?>] </label>
  184. <br />
  185. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  186. <input type="hidden" name="spec_list" value="<?php echo $this->_var['key']; ?>" />
  187. <?php else: ?>
  188. <select name="spec_<?php echo $this->_var['spec_key']; ?>" onChange="changePrice()">
  189. <?php $_from = $this->_var['spec']['values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'value');if (count($_from)):
  190. foreach ($_from AS $this->_var['key'] => $this->_var['value']):
  191. ?>
  192. <option label="<?php echo $this->_var['value']['label']; ?>" value="<?php echo $this->_var['value']['id']; ?>"><?php echo $this->_var['value']['label']; ?> <?php if ($this->_var['value']['price'] > 0): ?><?php echo $this->_var['lang']['plus']; ?><?php elseif ($this->_var['value']['price'] < 0): ?><?php echo $this->_var['lang']['minus']; ?><?php endif; ?><?php if ($this->_var['value']['price'] != 0): ?><?php echo $this->_var['value']['format_price']; ?><?php endif; ?></option>
  193. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  194. </select>
  195. <input type="hidden" name="spec_list" value="<?php echo $this->_var['key']; ?>" />
  196. <?php endif; ?>
  197. <?php else: ?>
  198. <?php $_from = $this->_var['spec']['values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'value');if (count($_from)):
  199. foreach ($_from AS $this->_var['key'] => $this->_var['value']):
  200. ?>
  201. <label for="spec_value_<?php echo $this->_var['value']['id']; ?>">
  202. <input type="checkbox" name="spec_<?php echo $this->_var['spec_key']; ?>" value="<?php echo $this->_var['value']['id']; ?>" id="spec_value_<?php echo $this->_var['value']['id']; ?>" onClick="changePrice()" />
  203. <?php echo $this->_var['value']['label']; ?> [<?php if ($this->_var['value']['price'] > 0): ?><?php echo $this->_var['lang']['plus']; ?><?php elseif ($this->_var['value']['price'] < 0): ?><?php echo $this->_var['lang']['minus']; ?><?php endif; ?> <?php echo $this->_var['value']['format_price']; ?>] </label>
  204. <br />
  205. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  206. <input type="hidden" name="spec_list" value="<?php echo $this->_var['key']; ?>" />
  207. <?php endif; ?>
  208. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  209. <div class="action">
  210. <a href="javascript:addToCart(<?php echo $this->_var['goods']['goods_id']; ?>)"><img src="themes/clothing/images/bnt_cart.gif" /></a> <a href="javascript:collect(<?php echo $this->_var['goods']['goods_id']; ?>)"><img src="themes/clothing/images/bnt_coll.gif" /></a>
  211. <?php if ($this->_var['affiliate']['on']): ?>
  212. <a href="user.php?act=affiliate&goodsid=<?php echo $this->_var['goods']['goods_id']; ?>"><img src="themes/clothing/images/bnt_tuijian.gif" /></a>
  213. <?php endif; ?>
  214. </div>
  215. </form>
  216. </div>
  217. </div>
  218. </div>
  219. <div class="goods_attr">
  220. <div class="attrTit clearfix" id="com_b">
  221. <h2><span class="attL"></span><span class="attR"></span><?php echo $this->_var['lang']['goods_brief']; ?></h2>
  222. <h2 class="h2bg"><span class="attL"></span><span class="attR"></span><?php echo $this->_var['lang']['goods_attr']; ?></h2>
  223. <h2 class="h2bg"><span class="attL"></span><span class="attR"></span><?php echo $this->_var['lang']['goods_tag']; ?></h2>
  224. <?php if ($this->_var['package_goods_list']): ?>
  225. <h2 class="h2bg" style="color:red;"><span class="attL"></span><span class="attR"></span><?php echo $this->_var['lang']['remark_package']; ?></h2>
  226. <?php endif; ?>
  227. </div>
  228. <div id="com_v" class="attr_content"></div>
  229. <div id="com_h">
  230. <blockquote>
  231. <?php echo $this->_var['goods']['goods_desc']; ?>
  232. </blockquote>
  233. <blockquote>
  234. <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#dddddd">
  235. <?php $_from = $this->_var['properties']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'property_group');if (count($_from)):
  236. foreach ($_from AS $this->_var['key'] => $this->_var['property_group']):
  237. ?>
  238. <tr>
  239. <th colspan="2" bgcolor="#FFFFFF"><?php echo htmlspecialchars($this->_var['key']); ?></th>
  240. </tr>
  241. <?php $_from = $this->_var['property_group']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'property');if (count($_from)):
  242. foreach ($_from AS $this->_var['property']):
  243. ?>
  244. <tr>
  245. <td bgcolor="#FFFFFF" align="left" width="30%" class="f1">[<?php echo htmlspecialchars($this->_var['property']['name']); ?>]</td>
  246. <td bgcolor="#FFFFFF" align="left" width="70%"><?php echo htmlspecialchars($this->_var['property']['value']); ?></td>
  247. </tr>
  248. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  249. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  250. </table>
  251. </blockquote>
  252. <blockquote>
  253. <?php echo $this->fetch('library/goods_tags.lbi'); ?>
  254. </blockquote>
  255. <?php if ($this->_var['package_goods_list']): ?>
  256. <blockquote>
  257. <?php $_from = $this->_var['package_goods_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'package_goods');if (count($_from)):
  258. foreach ($_from AS $this->_var['package_goods']):
  259. ?>
  260. <strong><?php echo $this->_var['package_goods']['act_name']; ?></strong><br />
  261. <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#dddddd">
  262. <tr>
  263. <td bgcolor="#FFFFFF">
  264. <?php $_from = $this->_var['package_goods']['goods_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods_list');if (count($_from)):
  265. foreach ($_from AS $this->_var['goods_list']):
  266. ?>
  267. <a href="goods.php?id=<?php echo $this->_var['goods_list']['goods_id']; ?>" target="_blank"><font class="f1"><?php echo $this->_var['goods_list']['goods_name']; ?></font></a> &nbsp;&nbsp;X <?php echo $this->_var['goods_list']['goods_number']; ?><br />
  268. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  269. </td>
  270. <td bgcolor="#FFFFFF">
  271. <strong><?php echo $this->_var['lang']['old_price']; ?></strong><font class="market"><?php echo $this->_var['package_goods']['subtotal']; ?></font><br />
  272. <strong><?php echo $this->_var['lang']['package_price']; ?></strong><font class="shop"><?php echo $this->_var['package_goods']['package_price']; ?></font><br />
  273. <strong><?php echo $this->_var['lang']['then_old_price']; ?></strong><font class="shop"><?php echo $this->_var['package_goods']['saving']; ?></font><br />
  274. </td>
  275. <td bgcolor="#FFFFFF">
  276. <a href="javascript:addPackageToCart(<?php echo $this->_var['package_goods']['act_id']; ?>)" style="background:transparent"><img src="themes/clothing/images/bnt_buy_1.gif" alt="<?php echo $this->_var['lang']['add_to_cart']; ?>" /></a>
  277. </td>
  278. </tr>
  279. </table>
  280. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  281. </blockquote>
  282. <?php endif; ?>
  283. </div>
  284. <script type="text/javascript">
  285. <!--
  286. reg("com");
  287. //-->
  288. </script>
  289. </div>
  290. <div class="goods_attr">
  291. <div class="attrTit clearfix" id="coms_b">
  292. <h2><span class="attL"></span><span class="attR"></span><?php echo $this->_var['lang']['releate_goods']; ?></h2>
  293. <h2 class="h2bg"><span class="attL"></span><span class="attR"></span><?php echo $this->_var['lang']['accessories_releate']; ?></h2>
  294. <h2 class="h2bg"><span class="attL"></span><span class="attR"></span><?php echo $this->_var['lang']['shopping_and_other']; ?></h2>
  295. </div>
  296. <div id="coms_v" class="attr_content clearfix"></div>
  297. <div id="coms_h">
  298. <blockquote>
  299. <?php if ($this->_var['related_goods']): ?>
  300. <?php $_from = $this->_var['related_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'releated_goods_data');if (count($_from)):
  301. foreach ($_from AS $this->_var['releated_goods_data']):
  302. ?>
  303. <div class="General_goodsBox">
  304. <a href="<?php echo $this->_var['releated_goods_data']['url']; ?>"><img src="<?php echo $this->_var['releated_goods_data']['goods_thumb']; ?>" alt="<?php echo $this->_var['releated_goods_data']['goods_name']; ?>" /></a><br />
  305. <p><a href="<?php echo $this->_var['releated_goods_data']['url']; ?>" title="<?php echo $this->_var['releated_goods_data']['goods_name']; ?>"><?php echo $this->_var['releated_goods_data']['short_name']; ?></a></p>
  306. <?php if ($this->_var['releated_goods_data']['promote_price'] != 0): ?>
  307. <?php echo $this->_var['lang']['promote_price']; ?><font class="price"><?php echo $this->_var['releated_goods_data']['formated_promote_price']; ?></font>
  308. <?php else: ?>
  309. <?php echo $this->_var['lang']['shop_price']; ?><font class="price"><?php echo $this->_var['releated_goods_data']['shop_price']; ?></font>
  310. <?php endif; ?>
  311. </div>
  312. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  313. <?php else: ?>
  314. ??<?php echo $this->_var['lang']['releate_goods']; ?>
  315. <?php endif; ?>
  316. </blockquote>
  317. <blockquote>
  318. <?php echo $this->fetch('library/goods_fittings.lbi'); ?>
  319. </blockquote>
  320. <blockquote>
  321. <?php echo $this->fetch('library/bought_goods.lbi'); ?>
  322. </blockquote>
  323. </div>
  324. <script type="text/javascript">
  325. <!--
  326. reg("coms");
  327. //-->
  328. </script>
  329. </div>
  330. <?php echo $this->fetch('library/comments.lbi'); ?>
  331. </div>
  332. </div>
  333. <?php echo $this->fetch('library/page_footer.lbi'); ?>
  334. </body>
  335. <script type="text/javascript">
  336. var goods_id = <?php echo $this->_var['goods_id']; ?>;
  337. var goodsattr_style = <?php echo empty($this->_var['cfg']['goodsattr_style']) ? '1' : $this->_var['cfg']['goodsattr_style']; ?>;
  338. var gmt_end_time = <?php echo empty($this->_var['promote_end_time']) ? '0' : $this->_var['promote_end_time']; ?>;
  339. <?php $_from = $this->_var['lang']['goods_js']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
  340. foreach ($_from AS $this->_var['key'] => $this->_var['item']):
  341. ?>
  342. var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
  343. <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  344. var goodsId = <?php echo $this->_var['goods_id']; ?>;
  345. var now_time = <?php echo $this->_var['now_time']; ?>;
  346. onload = function(){
  347. changePrice();
  348. fixpng();
  349. try {onload_leftTime();}
  350. catch (e) {}
  351. }
  352. /**
  353. * ?????????????????????
  354. */
  355. function changePrice()
  356. {
  357. var attr = getSelectedAttributes(document.forms['ECS_FORMBUY']);
  358. var qty = document.forms['ECS_FORMBUY'].elements['number'].value;
  359. Ajax.call('goods.php', 'act=price&id=' + goodsId + '&attr=' + attr + '&number=' + qty, changePriceResponse, 'GET', 'JSON');
  360. }
  361. /**
  362. * ???????
  363. */
  364. function changePriceResponse(res)
  365. {
  366. if (res.err_msg.length > 0)
  367. {
  368. alert(res.err_msg);
  369. }
  370. else
  371. {
  372. document.forms['ECS_FORMBUY'].elements['number'].value = res.qty;
  373. if (document.getElementById('ECS_GOODS_AMOUNT'))
  374. document.getElementById('ECS_GOODS_AMOUNT').innerHTML = res.result;
  375. }
  376. }
  377. </script>
  378. </html>