<?php echo $this->fetch('header.html'); ?>

<?php echo $this->fetch('product/breadcrumb_show.html'); ?>
<div class="row">
<div class="span3">

<?php echo $this->fetch('tag_nav.html'); ?>
<table class="table table-bordered"  >
<tr>
<td><h2>相关推荐</h2></td>
</tr>
<?php $_from = $this->_var['recommendlist']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
<tr>
<td align="center" style="line-height:25px; text-align:center;"><a href="/index.php?m=show&a=default&id=<?php echo $this->_var['c']['id']; ?>"><img src="/<?php echo $this->_var['c']['imgurl']; ?>.small.jpg" style="width:200px;" alt="<?php echo $this->_var['c']['title']; ?>" title="<?php echo $this->_var['c']['title']; ?>"  /></a><br /><p><a href="/index.php?m=index&a=show&id=<?php echo $this->_var['c']['id']; ?>"><?php echo $this->_var['c']['title']; ?></a></p></td>
</tr>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
<tr>
 
</tr>

 
 

</table>
</div>

<div class="span9">
<div  >
<table   class="table table-bordered">
<tr>
<td width="47%" rowspan="5">
<div class="relative">
<img src="/<?php echo $this->_var['data']['imgurl']; ?>.middle.jpg" alt="<?php echo $this->_var['data']['title']; ?>" title="<?php echo $this->_var['data']['title']; ?>" style="max-width:400px;">
</div>
</td>
<td width="53%"><?php echo $this->_var['data']['title']; ?></td>
</tr>
<tr>
  <td><div style="float:left;" class=" btn-group"><span class="btn btn-danger loves"   url="/index.php?m=loves&a=product&id=<?php echo $this->_var['data']['id']; ?>">喜欢</span> <span class="btn"><?php echo $this->_var['data']['loves']; ?></span></div> 
  <div style="float:right" class="btn-group"><span class="btn btn-warning hates"   url="/index.php?m=hates&a=product&id=<?php echo $this->_var['data']['id']; ?>" >失望</span> <span class="btn"><?php echo $this->_var['data']['hates']; ?></span></div></td>
</tr>
<tr>
  <td>
  <div style="float:left;" class="btn-group">
  <span class="btn btn-success">积分</span>
  <span class="btn"><?php echo $this->_var['data']['grade']; ?></span>
  </div>
  </td>
</tr>
<tr>
  <td>
 <div class="btn-group" style="float:right;">
  	<span class="btn"><?php echo $this->_var['data']['price']; ?></span>
    <a href="javascript:;" onclick="orderCart_add(<?php echo $this->_var['data']['id']; ?>,1)" class="btn btn-success">加入购物车</a> 
  </div>
 </td>
</tr>
<tr>
  <td style="line-height:40px;">
  
  <div class="btn-group">
  <span class="btn btn-success">分类</span>
  <a href="/index.php?m=list&catid=<?php echo $this->_var['data']['catid']; ?>" class="btn btn-danger"><?php echo $this->_var['cat']['cname']; ?></a>
  </div>
  
  
  
  <div>
  <span class="btn btn-success" >标签</span>
  <?php $_from = $this->_var['tags']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
  <a href="/index.php?m=tags&a=show&tagname=<?php echo urlencode($this->_var['c']); ?>" class="btn"><?php echo $this->_var['c']; ?></a>
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  </div>
  
  <!--产品属性-->
  <div>
  <?php $_from = $this->_var['data']['attr']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
 
      <?php if ($this->_var['c']['attr_type'] == 1): ?>
       <input type="hidden" class="orderCart_attr_value" name="attr[<?php echo $this->_var['c']['id']; ?>]" attr_name="<?php echo $this->_var['c']['title']; ?>" id="orderCart_attr_<?php echo $this->_var['c']['id']; ?>" value="<?php echo $this->_var['c']['id']; ?>" />
            <!--唯一属性值-->
            <div class="btn-group">
                <span class="btn"><?php echo $this->_var['c']['title']; ?></span>
                <span class="btn"> 
                <?php echo $this->_var['data_attr'][$this->_var['c'][id]]; ?>  
                </span>
            </div>
      <?php else: ?>
       <input type="hidden" class="orderCart_attr_value" name="attr[<?php echo $this->_var['c']['id']; ?>]" attr_name="<?php echo $this->_var['c']['title']; ?>" id="orderCart_attr_<?php echo $this->_var['c']['id']; ?>" />
      	<div class="btn-group orderCart_attr_item" attr_id=<?php echo $this->_var['c']['id']; ?>>
       		<span class="btn btn-danger"><?php echo $this->_var['c']['title']; ?></span>   
            <?php $_from = $this->_var['data_attr'][$this->_var['c'][id]][value]; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('k', 'a_c');if (count($_from)):
    foreach ($_from AS $this->_var['k'] => $this->_var['a_c']):
?>
            <span class="btn orderCart_attr" val="<?php echo $this->_var['a_c']; ?>" ><?php if ($this->_var['c']['input_type'] == 1): ?><?php echo $this->_var['a_c']; ?><?php else: ?><?php echo $this->_var['c'][select][$this->_var['a_c']]; ?><?php endif; ?></span>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>    
             
        </div>
      <?php endif; ?>
  	
   <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  </div>
  <!--end 产品属性-->
  
  </td>
</tr>

</table>
<table class="table table-bordered">
<tr><td class="max-img"><?php echo $this->_var['data']['content']; ?></td></tr>
</table>
<div class="btn btn-danger" style="margin-bottom:10px;">用户评价</div>
<?php echo $this->fetch('comment/inc_common.html'); ?>
 
</div>
</div>

</div>
<script language="javascript">
setMaxImg(".max-img");
</script>
<?php echo $this->fetch('order_cart/fixed-cart.html'); ?> 
<?php echo $this->fetch('footer.html'); ?>