<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<?php $this->load->view(TPL_FOLDER."header");?>
<div class=ad950>
  <script type="text/javascript" src="<?php echo site_url(CTL_FOLDER.'feed/ads/6');?>"></script>
</div>
<div class="list">
  <div class="list_right">
    <div class="list_place">
      <div class="list_place_ioc"><img src="{tpl_path}images/ioc_02.gif" align="absmiddle"/></div>
      <div class="list_place_nav">您的位置:<a href="<?php echo base_url();?>">首页</a> <?php echo $nav;?></div>
    </div>
    <div class="sitemap">
    <ul>
      <?php
	  $subcat = $catalog;
	  $i = 1;
        foreach($catalog as $row){
		if($row->parent_id == 0){
		?>
      <li>
        <p><a href="<?php echo site_url(CTL_FOLDER.'search');?>?cid=<?php echo $row->cid;?>" target="_blank" title="<?php echo $row->cat_name;?>"><?php echo $row->cat_name;?></a></p>
        <div>
          <?php
        foreach($subcat as $row1){
		if($row->id == $row1->parent_id){
		?>
          <a target="_blank" href="<?php echo site_url(CTL_FOLDER.'search'); ?>?cid=<?php echo $row1->cid;?>" title="<?php echo $row1->cat_name;?>"><?php echo $row1->cat_name;?></a> &nbsp;&nbsp; 
          <?php
		  	}
		  } ?>
        </div>
      </li>
      <?php 
	  	if($i % 2 == 0) echo '</ul><ul>';
	  	$i++;
	  	}
	  } ?>
      </ul>
      <div class="clear"></div>
    </div>
  </div>
  <div class="list_left">
    <!-- 热销商品 -->
    <div class="list_hot">
      <div class="hot_head"><span>掌柜热卖</span></div>
      <!--列表模块-->
      <div class="hot_goods">
        <?php if(isset($sale_top)){
				foreach($sale_top as $row){
			?>
        <div class="hot_lgoods_list">
          <div class="hot_lgoods_list_img" onMouseOver="this.className='hot_lgoods_list_img_hover'" onMouseOut="this.className='hot_lgoods_list_img'"> <a href="<?php echo site_url(CTL_FOLDER.'item/'.$row['num_iid']);?>" target="_blank" title="<?php $row['title'];?>"><img alt="<?php $row['title'];?>" src="<?php echo $row['pic_url'];?>_160x160.jpg" align="absmiddle"></a> </div>
          <div class="hot_lgoods_list_title"><a href="<?php echo site_url(CTL_FOLDER.'item/'.$row['num_iid']);?>" target="_blank" title="<?php $row['title'];?>"><?php echo strcut($row['title'],39);?></a> </div>
          <div class="hot_lgoods_list_price">市场价:￥<span class="hot_lgoods_list_scprice"><?php echo get_market_price($row['price']);?> </span> 元<br />
            <span class="hot_lgoods_list_tbprice">淘宝价:￥<b><?php echo $row['price'];?></b> 元</span><br />
            <?php 
					if ($row['commission_num'] >= 5){
						echo '本月热销:<span class="hot_lgoods_list_num"><b>'.$row['commission_num'].'</b></span> 件';
                }
                ?>
          </div>
        </div>
        <?php 
				}
			} ?>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
$(function(){
	$('.sitemap li').hover(function(){
		$(this).addClass('lion');
	},function(){
		$(this).removeClass('lion');
	});
})
</script>
<?php $this->load->view(TPL_FOLDER."footer");?>
