<?php echo $this->fetch('header.html'); ?>
<style type="text/css">
table .c2 td{background-color:#F8F8F8;}
table .c3 td{background-color:#FBFDE5;}
</style>
<div class="row">
<div class="span12">
<?php echo $this->fetch('category/nav.html'); ?>
<form method="post" action="<?php echo APPADMIN; ?>?m=admin_category&a=sort">
<table class="table table-bordered" width="100%">
<tr>
	<td width="5%">ID</td>
    <td width="20%">名称</td>
    <td width="10%">排序</td>
    <td width="20%">类型</td>
    <td width="10%">导航</td>
    <td width="5%">投稿</td>
    <td width="5%">可采集</td>
    <td width="5%">显示</td>
    <td width="26%">操作</td>
</tr>

<?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
<tr>
	<td><?php echo $this->_var['c']['id']; ?></td>
    <td><a href="<?php if ($this->_var['c']['link_url']): ?><?php echo $this->_var['c']['link_url']; ?><?php else: ?>/index.php?m=list&a=default&catid=<?php echo $this->_var['c']['id']; ?><?php endif; ?>" target="_blank"><?php echo $this->_var['c']['cname']; ?></a></td>
    <td><input type="text" name="orderindex[<?php echo $this->_var['c']['id']; ?>]" value="<?php echo $this->_var['c']['orderindex']; ?>"   class="w50" /></td>
    <td><?php echo $this->_var['type_list'][$this->_var['c']['type_id']]; ?></td>
    <td><?php if ($this->_var['c']['is_tag'] == 1): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&is_tag=2" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&is_tag=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&is_tag=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&is_tag=2"><?php endif; ?></td>
    <td><?php if ($this->_var['c']['user_add'] == 1): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&user_add=2" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&user_add=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&user_add=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&user_add=2"><?php endif; ?></td>
    <td><?php if ($this->_var['c']['is_stole'] == 1): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&is_stole=2" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&is_stole=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&is_stole=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&is_stole=2"><?php endif; ?></td>
    <td><?php if ($this->_var['c']['status']): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&status=0" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&status=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&status=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['c']['id']; ?>&status=0"><?php endif; ?></td>
    <td> <a href="<?php echo APPADMIN; ?>?m=admin_product&catid=<?php echo $this->_var['c']['id']; ?>" >管理商品</a> 
    <a href="<?php echo APPADMIN; ?>?m=admin_category&a=add&id=<?php echo $this->_var['c']['id']; ?>">编辑</a>
     
    <a href="/index.php?m=tao&a=stole&keyword=<?php echo urlencode($this->_var['c']['cname']); ?>" target="_blank" >搜淘宝</a> 
    <a href="javascript:;" class="delete" url="<?php echo APPADMIN; ?>?m=admin_category&a=delete&id=<?php echo $this->_var['c']['id']; ?>" >删除</a>
     </td>
</tr>
<?php if ($this->_var['c']['child']): ?>
<?php $_from = $this->_var['c']['child']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'cc');if (count($_from)):
    foreach ($_from AS $this->_var['cc']):
?>
<tr class="c2">
	<td><?php echo $this->_var['cc']['id']; ?></td>
    <td>|__<a href="<?php if ($this->_var['cc']['link_url']): ?><?php echo $this->_var['cc']['link_url']; ?><?php else: ?>/index.php?m=list&a=default&catid=<?php echo $this->_var['cc']['id']; ?><?php endif; ?>" target="_blank"><?php echo $this->_var['cc']['cname']; ?></a></td>
    <td><input type="text" name="orderindex[<?php echo $this->_var['cc']['id']; ?>]"  value="<?php echo $this->_var['cc']['orderindex']; ?>"  class="w50" /></td>
    <td><?php echo $this->_var['type_list'][$this->_var['cc']['type_id']]; ?></td>
    <td><?php if ($this->_var['cc']['is_tag'] == 1): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&is_tag=2" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&is_tag=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&is_tag=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&is_tag=2"><?php endif; ?></td>
    <td><?php if ($this->_var['cc']['user_add'] == 1): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&user_add=2" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&user_add=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&user_add=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&user_add=2"><?php endif; ?></td>
    <td><?php if ($this->_var['cc']['is_stole'] == 1): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&is_stole=2" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&is_stole=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&is_stole=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&is_stole=2"><?php endif; ?></td>
    <td><?php if ($this->_var['cc']['status']): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&status=0" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&status=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&status=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['cc']['id']; ?>&status=0"><?php endif; ?></td>
    <td> <a href="<?php echo APPADMIN; ?>?m=admin_product&catid=<?php echo $this->_var['cc']['id']; ?>" >管理商品</a> 
    <a href="<?php echo APPADMIN; ?>?m=admin_category&a=add&id=<?php echo $this->_var['cc']['id']; ?>">编辑</a>
     
    <a href="/index.php?m=tao&a=stole&keyword=<?php echo urlencode($this->_var['cc']['cname']); ?>" target="_blank" >搜淘宝</a> 
    <a href="javascript:;" class="delete" url="<?php echo APPADMIN; ?>?m=admin_category&a=delete&id=<?php echo $this->_var['cc']['id']; ?>" >删除</a>
     </td>
</tr>

<?php $_from = $this->_var['cc']['child']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'ccc');if (count($_from)):
    foreach ($_from AS $this->_var['ccc']):
?>
<tr class="c3">
	<td><?php echo $this->_var['ccc']['id']; ?></td>
    <td><font style="color:red">__|___</font><a href="<?php if ($this->_var['ccc']['link_url']): ?><?php echo $this->_var['ccc']['link_url']; ?><?php else: ?>/index.php?m=list&a=default&catid=<?php echo $this->_var['ccc']['id']; ?><?php endif; ?>" target="_blank"><?php echo $this->_var['ccc']['cname']; ?></a></td>
    <td><input type="text" name="orderindex[<?php echo $this->_var['ccc']['id']; ?>]"  value="<?php echo $this->_var['ccc']['orderindex']; ?>"  class="w50" /></td>
    <td><?php echo $this->_var['type_list'][$this->_var['ccc']['type_id']]; ?></td>
    <td><?php if ($this->_var['ccc']['is_tag'] == 1): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&is_tag=2" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&is_tag=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&is_tag=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&is_tag=2"><?php endif; ?></td>
    <td><?php if ($this->_var['ccc']['user_add'] == 1): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&user_add=2" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&user_add=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&user_add=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&user_add=2"><?php endif; ?></td>
    <td><?php if ($this->_var['ccc']['is_stole'] == 1): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&is_stole=2" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&is_stole=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&is_stole=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&is_stole=2"><?php endif; ?></td>
    <td><?php if ($this->_var['ccc']['status']): ?><img src="/static/images/yes.gif" class="ajax_no" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&status=0" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&status=1"><?php else: ?><img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&status=1" rurl="<?php echo APPADMIN; ?>?m=admin_category&a=change&id=<?php echo $this->_var['ccc']['id']; ?>&status=0"><?php endif; ?></td>
    <td> <a href="<?php echo APPADMIN; ?>?m=admin_product&catid=<?php echo $this->_var['ccc']['id']; ?>" >管理商品</a> 
    <a href="<?php echo APPADMIN; ?>?m=admin_category&a=add&id=<?php echo $this->_var['ccc']['id']; ?>">编辑</a>
     
    <a href="/index.php?m=tao&a=stole&keyword=<?php echo urlencode($this->_var['ccc']['cname']); ?>" target="_blank" >搜淘宝</a> 
    <a href="javascript:;" class="delete" url="<?php echo APPADMIN; ?>?m=admin_category&a=delete&id=<?php echo $this->_var['ccc']['id']; ?>" >删除</a>
     </td>
</tr>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
<?php endif; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</table>
<p><input type="submit" value="更改排序" class="btn btn-large btn-success" /></p>
</form>
<?php echo $this->_var['pagelist']; ?>
</div>
</div>

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