<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<meta name="Keywords" content="{$keywords}" />
<meta name="Description" content="{$description}" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>{$page_title}</title>
<!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
<link href="{$ecs_css_path}" rel="stylesheet" type="text/css" />
{* 包含脚本文件 *}
{insert_scripts files='common.js'}
<script type="text/javascript">
function $(element) {
  return document.getElementById(element);
}
//切屏--是按钮，_v是内容平台，_h是内容库
function reg(str){
  var bt=$(str+"_b").getElementsByTagName("h2");
  for(var i=0;i<bt.length;i++){
    bt[i].subj=str;
    bt[i].pai=i;
    bt[i].style.cursor="pointer";
    bt[i].onclick=function(){
      $(this.subj+"_v").innerHTML=$(this.subj+"_h").getElementsByTagName("blockquote")[this.pai].innerHTML;
      for(var j=0;j<$(this.subj+"_b").getElementsByTagName("h2").length;j++){
        var _bt=$(this.subj+"_b").getElementsByTagName("h2")[j];
        var ison=j==this.pai;
        _bt.className=(ison?"":"h2bg");
      }
    }
  }
  $(str+"_h").className="none";
  $(str+"_v").innerHTML=$(str+"_h").getElementsByTagName("blockquote")[0].innerHTML;
}

</script>
</head>
<body>
  <div id="wrap">
    <!-- #BeginLibraryItem "/library/page_header.lbi" --><!-- #EndLibraryItem -->
    <div class="container">
    <div class="global_l">
    <!-- TemplateBeginEditable name="左边区域" -->
    <!-- #BeginLibraryItem "/library/cart.lbi" --><!-- #EndLibraryItem -->
    <!-- #BeginLibraryItem "/library/category_tree.lbi" --><!-- #EndLibraryItem -->
    
<!-- #BeginLibraryItem "/library/history.lbi" --><!-- #EndLibraryItem -->
    <!-- #BeginLibraryItem "/library/goods_fittings.lbi" --><!-- #EndLibraryItem -->
    <!-- #BeginLibraryItem "/library/goods_article.lbi" --><!-- #EndLibraryItem -->
    
<!-- TemplateEndEditable -->
    </div>
    <div class="global_r">
      <!-- #BeginLibraryItem "/library/ur_here.lbi" --><!-- #EndLibraryItem -->
      <div id="goods_info">
         <div class="text_info">
           <form action="exchange.php?act=buy" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY" >
             <h1>{$goods.goods_style_name}</h1>
               <ul>
                 <!-- {if $promotion} -->
                 <li>
                   <!-- {foreach from=$promotion item=item key=key} 优惠活动-->
                   {$lang.activity}
                   <!-- {if $item.type eq "snatch"} -->
                   <a href="snatch.php" title="{$lang.snatch}" style="font-weight:100; text-decoration:underline;">[{$lang.snatch}]</a>
                   <!-- {elseif $item.type eq "group_buy"} -->
                   <a href="group_buy.php" title="{$lang.group_buy}" style="font-weight:100; text-decoration:underline;">[{$lang.group_buy}]</a>
                   <!-- {elseif $item.type eq "auction"} -->
                   <a href="auction.php" title="{$lang.auction}" style="font-weight:100; text-decoration:underline;">[{$lang.auction}]</a>
                   <!-- {elseif $item.type eq "favourable"} -->
                   <a href="activity.php" title="{$lang.favourable}" style="font-weight:100; text-decoration:underline;">[{$lang.favourable}]</a>
                   <!-- {/if} -->
                   <a href="{$item.url}" title="{$lang.$item.type} {$item.act_name}{$item.time}" style="font-weight:100; text-decoration:underline;">{$item.act_name}</a>
                   <!-- {/foreach} -->
                 </li>
                 <!-- {/if} -->
                 <!-- {if $cfg.show_goodssn} 显示商品货号-->
                 <li><span>{$lang.goods_sn}</span>{$goods.goods_sn}</li>
                 <!-- {/if} -->
                 <!-- 显示商品品牌{if $goods.goods_brand neq "" and $cfg.show_brand} -->
                 <li><span>{$lang.goods_brand}</span><a href="{$goods.goods_brand_url}">{$goods.goods_brand}</a></li>
                 <!-- {/if} -->
                 <!-- {if $cfg.show_goodsweight} -->
                 <li><span>{$lang.goods_weight}</span>{$goods.goods_weight}</li>
                 <!-- {/if} -->
                 <li>{$lang.exchange_integral}{$goods.exchange_integral}</li>
                 <!-- 开始循环所有可选属性{foreach from=$specification item=spec key=spec_key} -->
                 <li>{$spec.name}：<br />
                   <!-- {if $spec.attr_type eq 1} -->
                   <!-- {if $cfg.goodsattr_style eq 1} -->
                   <!-- {foreach from=$spec.values item=value key=key} -->
                   <label for="spec_value_{$value.id}">
                   <input type="radio" name="spec_{$spec_key}" value="{$value.id}" id="spec_value_{$value.id}" {if $key eq 0}checked{/if} />
                   {$value.label} </label><br />
                   <!-- {/foreach} -->
                   <input type="hidden" name="spec_list" value="{$key}" />
                   <!-- {else} -->
                   <select name="spec_{$spec_key}">
                   <!-- {foreach from=$spec.values item=value key=key} -->
                   <option label="{$value.label}" value="{$value.id}">{$value.label} <!-- {if $value.price gt 0} -->{$lang.plus}<!-- {elseif $value.price lt 0} -->{$lang.minus}<!-- {/if} --><!-- {if $value.price neq 0} -->{$value.format_price}<!-- {/if} --></option>
                   <!-- {/foreach} -->
                   </select>
                   <input type="hidden" name="spec_list" value="{$key}" />
                   <!-- {/if} -->
                   <!-- {else} -->
                   <!-- {foreach from=$spec.values item=value key=key} -->
                   <label for="spec_value_{$value.id}">
                   <input type="checkbox" name="spec_{$spec_key}" value="{$value.id}" id="spec_value_{$value.id}"/>
                   {$value.label}</label><br />
                   <!-- {/foreach} -->
                   <input type="hidden" name="spec_list" value="{$key}" />
                   <!-- {/if} -->
                 </li>
                 <!-- 结束循环可选属性{/foreach} -->
                 <li class="itemBtnList">
                   <input type="hidden" name="goods_id" value="{$goods.goods_id}" />
                   <input type="submit" value="" style="width:300px; height:35px; cursor:pointer; background:url(images/ljfh.gif) no-repeat 0 0; border:none;"/>
                 </li>
               </ul>
            </form>
         </div>
         <div class="img_info">
           <p class="img">
             <!-- {if $pictures}-->
               <a href="javascript:;" onclick="window.open('gallery.php?id={$goods.goods_id}'); return false;"><img src="{$goods.goods_img}" alt="{$goods.goods_name|escape:html}"/></a>
             <!-- {else} -->
               <img src="{$goods.goods_img}" alt="{$goods.goods_name|escape:html}"/>
             <!-- {/if}-->
           </p>
           <!-- #BeginLibraryItem "/library/goods_gallery.lbi" --><!-- #EndLibraryItem -->
         </div>
      </div>
      <!----- goods_attr ----->
      <div class="goods_attr module">
        <div class="caption">
          <div id="com_b">
            <h2><span>{$lang.goods_brief}</span></h2>
            <h2 class="h2bg"><span>{$lang.goods_attr}</span></h2>
         </div>
       </div>
        <p class="top"><span></span></p>
        <div class="content" id="com_v" style="padding:10px; overflow:hidden;"> </div>
           <div id="com_h" style="display:none;">
             <blockquote>
             {$goods.goods_desc}
             </blockquote>
             <blockquote>
              <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#dddddd">
                <!-- {foreach from=$properties item=property_group key=key} -->
                <tr>
                  <th colspan="2" bgcolor="#FFFFFF">{$key|escape}</th>
                </tr>
                <!-- {foreach from=$property_group item=property} -->
                <tr>
                  <td bgcolor="#FFFFFF" align="left" width="30%" class="f10" style="padding-left:10px;">[{$property.name|escape:html}]</td>
                  <td bgcolor="#FFFFFF" align="left" width="70%" style="padding-left:10px;">{$property.value|escape:html}</td>
                 </tr>
                <!-- {/foreach}-->
                <!-- {/foreach}-->
              </table>
             </blockquote>
          </div>
          <p class="bottom"><span></span></p>
           <script type="text/javascript">
             <!--
             reg("com");
             //-->
          </script>
        </div>
      <!----- end-goods_attr----->
    <!-- TemplateBeginEditable name="右边区域" -->
<!-- #BeginLibraryItem "/library/goods_tags.lbi" -->
<div class="module goods_list" id="goods_tags">
  <div class="caption"><span>{$lang.goods_tag}</span></div>
  <p class="top"><span></span></p>
  <div class="content">
    <form name="tagForm" action="javascript:;" onSubmit="return submitTag(this)" id="tagForm">
        <p id="ECS_TAGS" style="margin-bottom:5px; padding:0 10px;">
          <!-- 标记{foreach from=$tags item=tag}-->
          <a href="search.php?keywords={$tag.tag_words|escape:url}">{$tag.tag_words|escape:html}[{$tag.tag_count}]</a>
          <!-- 结束标记{/foreach} -->
        </p>
        <p style="margin-bottom:10px; padding:0 10px;">
          <input type="text" class="input_1" style="margin:0px; width:300px;" name="tag" id="tag" size="35" />
          <input type="submit" value="Append" class="button_2" style="border:none; position:relative; top:-0px!important;" />
          <input type="hidden" name="goods_id" value="{$goods.goods_id}"  />
        </p>
        <script type="text/javascript">
                //<![CDATA[
                {literal}
                /**
                 * 用户添加标记的处理函数
                 */
                function submitTag(frm)
                {
                  try
                  {
                    var tag = frm.elements['tag'].value;
                    var idx = frm.elements['goods_id'].value;

                    if (tag.length > 0 && parseInt(idx) > 0)
                    {
                      Ajax.call('user.php?act=add_tag', "id=" + idx + "&tag=" + tag, submitTagResponse, "POST", "JSON");
                    }
                  }
                  catch (e) { alert(e); }

                  return false;
                }

                function submitTagResponse(result)
                {
                  var div = document.getElementById('ECS_TAGS');

                  if (result.error > 0)
                  {
                    alert(result.message);
                  }
                  else
                  {
                    try
                    {
                      div.innerHTML = '';
                      var tags = result.content;

                      for (i = 0; i < tags.length; i++)
                      {
                        div.innerHTML += '<a href="search.php?keywords='+tags[i].word+'">' +tags[i].word + '[' + tags[i].count + ']<\/a>&nbsp;&nbsp; ';
                      }
                    }
                    catch (e) { alert(e); }
                  }
                }
                {/literal}
                //]]>
                </script>
      </form>
  </div>
  <p class="bottom"><span></span></p>
</div>
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/bought_goods.lbi" -->
<!-- {if $bought_goods} -->
<div class="module goods_list">
  <div class="caption"><span style="overflow:visible;white-space:nowrap;">{$lang.shopping_and_other}</span></div>
  <p class="top"><span></span></p>
  <div class="content">
     <ul class="goods_grid">
      <!--{foreach from=$bought_goods item=goods}-->
      <li style="height:120px;">
        <p class="img"><a href="{$goods.url}"><img src="{$goods.goods_thumb}" alt="{$goods.goods_name}"  class="goodsimg" /></a></p>
        <p class="name"><a href="{$goods.url}" title="{$goods.goods_name}">{$goods.short_name}</a></p>
        <p class="price" style="font-weight:normal;">
          <!-- {if $goods.promote_price neq 0} -->
          {$goods.formated_promote_price}
          <!-- {else} -->
          {$goods.shop_price}
          <!-- {/if} -->
        </p>
      </li>
    <!-- {/foreach} -->
    </ul>
  </div>
  <p class="bottom"><span></span></p>
</div>
<!-- {/if} -->
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/comments.lbi" -->
{insert_scripts files='transport.js,utils.js'}
<div id="ECS_COMMENT">{* ECSHOP 提醒您：动态载入comments_list.lbi，显示评论列表和评论表单 *}{insert name='comments' type=$type id=$id}</div>

 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/goods_related.lbi" -->
<!-- {if $related_goods} -->
<div class="goods_list module">
  <div class="caption"><span>{$lang.releate_goods}</span></div>
  <p class="top"><span></span></p>
  <div class="content">
    <ul class="goods_grid">
    <!--{foreach from=$related_goods item=releated_goods_data}-->
      <li style="height:130px;">
      <p class="img"><a href="{$releated_goods_data.url}"><img src="{$releated_goods_data.goods_thumb}" alt="{$releated_goods_data.goods_name}" class="B_blue" /></a></p>
      <p class="name"><a href="{$releated_goods_data.url}" title="{$releated_goods_data.goods_name}">{$releated_goods_data.short_name}</a></p>
      <p class="price">
      <!-- {if $releated_goods_data.promote_price neq 0} -->
      {$lang.promote_price}{$releated_goods_data.formated_promote_price}
      <!-- {else} -->
      {$releated_goods_data.shop_price}
      <!-- {/if} -->
      </p>
      </li>
    <!--{/foreach}-->
    </ul>
  </div>
  <p class="bottom"><span></span></p>
</div>
<!-- {/if} -->

 <!-- #EndLibraryItem -->
<!-- TemplateEndEditable -->
    </div>
   </div>
    <!-- #BeginLibraryItem "/library/help.lbi" --><!-- #EndLibraryItem -->
    <!-- #BeginLibraryItem "/library/page_footer.lbi" --><!-- #EndLibraryItem -->
  </div>
</body>
</html>
