<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<?php $this->load->view(TPL_FOLDER."header");?>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" >
  <tr>
    <td width="3%" align="left" ><img src="{tpl_path}images/forward.jpg" /></td>
    <td width="97%" align="left" >您现在的位置：行业类目</td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:solid 1px #3C4952; margin-bottom:5px; margin-top:5px">
  <tr>
    <td height="24" align="right"  style="padding-right:10px"><a href="<?php echo site_url(CTL_FOLDER.'industry_catalog/make_industry_cache');?>">生成行业一级类目缓存</a> | <a href="<?php echo site_url(CTL_FOLDER."get_top_data/get_industry");?>">重新采集类目数据</a></td>
  </tr>
</table>
<form method="post" name="list_form" id="list_form">
<table width="100%" cellspacing="0" class="widefat">
    <thead>
      <tr id="trth">
        <th width="12%" ><input type="checkbox" onclick="check_box(this.form.rd_id)" /></th>
        <th width="20%" >类目ID</th>
        <th width="55%" id="cat_name">标题</th>
        <th width="13%">排序</th>
      </tr>
    </thead>
    <tbody  id="check_box_id">
   <?php foreach($catalog_list as $row) {?> 
      <tr>
        <td class="rdId"><input name="rd_id[]" type="checkbox" id="rd_id" value="<?php echo $row->id;?>"></td>
        <td><?php echo $row->cid;?></td>
        <td><?php
		if($row->parent_id==0)
		{
			echo "<div class='celltext'>{$row->cat_name}</div>";
		}
		else
		{
			echo str_repeat("&nbsp;&nbsp;",$row->deep_id)."|-<div class='celltext'>{$row->cat_name}</div>";
		}
        ?></td>
        <td><input name="sort<?php echo $row->id;?>" value="<?php echo $row->seqorder;?>" type="text"  id="sort<?php echo $row->id;?>" size="2" maxlength="10" dataType="Integer" msg="排序号必须为数字" title="数字越小越靠前"></td>
      </tr>
     <?php }?> 
    </tbody>
  </table>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="padding-top:5px"><select name="action_url" id="action_url">
  <option value="" style="color:#FF0000">-选择操作-</option>
  <option value="<?php echo site_url(CTL_FOLDER."industry_catalog/del_record");?>">删除</option>
  <option value="<?php echo site_url(CTL_FOLDER."industry_catalog/sort_record");?>">排序</option>
  </select>&nbsp; <input type="button" name="submit_list_button" class="button-style2" onclick="submit_list_form(this.form,this)" id="submit_list_button" value="执行操作" /> <img src="{tpl_path}images/notice.gif" class="tooltips" title="操作步骤：在左边勾选要操作的记录-->选择需要执行的操作-->点击“执行操作”按钮-->完成" /> </td>
    </tr>
</table>
</form>
<script language="javascript">
$(function(){
	$("div.celltext").edit_table({
		param:{'table':'shop_industry_catalog'}
	});
});
</script>
<?php $this->load->view(TPL_FOLDER."footer");?>