<!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=gb2312" />
<title></title>
<link href="css/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
<script type="text/javascript" language="javascript">
<!--
$(function(){
$.each( $('.table_content'),
function(){
$(this).bind('mouseover',function(){$(this).css('background-color','#d9e8fd');});
$(this).bind('mouseout',function(){$(this).css('background-color','#e6f2fe');});
}
);
var check_all = false;
$('#check_all').bind('click',function(){
	if( check_all == false )
	{$('.ckbox').attr('checked','checked');check_all=true;}else
	{$('.ckbox').attr('checked','');check_all=false;}
});

<!--Kw[if empty ( $search )]-->
$('#goto').bind('click',function(event){
	if(event.target==this){
		var page = $('#page').attr('value');
		if(page==''||page<1||page><!--Kw[$all]-->){
			alert('请正确填写页数！');
		}else{
		document.location='ad_category.php?page='+$('#page').attr('value')+'&PID=<!--Kw[$PID]-->';
		}
	}
	event.stopPropagation();
	});
<!--Kw[/if]-->
});
function sub_chk ( type )
{
	document.getElementById('cktype').value = type;
	document.getElementById('form2').submit();
}
function bat_edit()
{
	document.getElementById('form2').action = 'bat_category.php?type=edit';
	document.getElementById('form2').submit();
}
-->
</script>
</head>

<body>
<table width="100%" border="0" cellspacing="0">
  <tr height="184">
    <td align="left" valign="top" class="table_bg">
      <form id="search" name="form1" method="post" action="search_category.php">
      <div class="boxtitle">分类列表
		<span class="search">
     	<span style="float:right; margin-right:5px;" class="button" onclick="document.getElementById('search').submit();">搜索</span>
        <input style="float:right" type="text" name="keywords" id="keywords" />
          <select style="float:right; margin-right:5px;" name="type" id="type">
            <option value="name">分类名称</option>
            <option value="id">分类编号</option>
            <option value="pid">上级分类</option>
          </select>
        </span>
      </div>
      </form>
      <form id="form2" name="form2" method="post" action="category_all.php">
      <table width="100%" border="0">
        <tr class="table_title">
          <td width="8%" nowrap="nowrap"><a href="#" id="check_all">全选/不选</a></td>
          <td width="6%" nowrap="nowrap">编号</td>
          <td width="26%" nowrap="nowrap">分类名称</td>
          <td width="6%" nowrap="nowrap">类型</td>
          <td width="8%" nowrap="nowrap">排序</td>
          <td width="7%" nowrap="nowrap">加入酷站</td>
          <td width="7%" nowrap="nowrap">是否显示</td>
          <td width="32%" nowrap="nowrap">选项</td>
        </tr>
        <!--Kw[section name="category" loop=$category]-->
        <tr class="table_content">
          <td nowrap="nowrap"><input name="checkbox[<!--Kw[$category[category].ID]-->]" type="checkbox" class="ckbox" id="ck_<!--Kw[$category[category].ID]-->" /></td>
          <td nowrap="nowrap"><!--Kw[$category[category].ID]--></td>
          <td nowrap="nowrap"><!--Kw[if $category[category].IsLink==1]--><a href="<!--Kw[$category[category].Link]-->" target="_blank"><!--Kw[$category[category].Name]--></a><!--Kw[else]--><!--Kw[$category[category].Name]--><!--Kw[/if]--></td>
          <td nowrap="nowrap"><!--Kw[if $category[category].IsLink==1]-->链接<!--Kw[else]-->分类<!--Kw[/if]--></td>
          <td nowrap="nowrap"><input name="order[<!--Kw[$category[category].ID]-->]" type="text" id="order<!--Kw[$category[category].ID]-->" value="<!--Kw[$category[category].Order]-->" size="6" maxlength="6" /></td>
          <td nowrap="nowrap"><!--Kw[if $category[category].IsInKu==1]-->是<!--Kw[else]-->否<!--Kw[/if]--></td>
          <td nowrap="nowrap"><!--Kw[if $category[category].IsOpen==1]-->显示<!--Kw[else]-->隐藏<!--Kw[/if]--></td>
          <td nowrap="nowrap">
            <a href="add_category.php?type=edit&id=<!--Kw[$category[category].ID]-->">修改</a> | 
            <a href="ad_category.php?type=del&id=<!--Kw[$category[category].ID]-->">删除</a> | 
            <a href="add_sites.php?Category=<!--Kw[$category[category].ID]-->" target="_self">添加站点</a> | 
            <a href="ad_category.php?PID=<!--Kw[$category[category].ID]-->&shangji=<!--Kw[$category[category].PID]-->">进入下级</a> |
            <a href="ad_sites.php?Category=<!--Kw[$category[category].ID]-->">管理网站</a>
          </td>
        </tr>
        <!--Kw[/section]-->
      </table>
        <input name="cktype" type="hidden" id="cktype"/>
      </form>
    <!--Kw[if empty ( $search )]-->
      <div class="info_box">共有<strong> <!--Kw[$count]--></strong> 条记录，当前第<strong> <!--Kw[$lastpage+1]--></strong> 页，共 <strong><!--Kw[$all]--></strong> 页</div>
      <div class="button_box">
        <span class="button"><a onclick="bat_edit()"  href="#" target="_self">批量修改</a></span>
        <span class="button"><a onclick="sub_chk('del')"  href="#" target="_self">删除选中</a></span>
        <span class="button"><a onclick="sub_chk('order')"  href="#" target="_self">更新排序</a></span>
		<!--Kw[if $PID!=0]-->
        <span class="button"><a href="ad_category.php?PID=<!--Kw[$shangji]-->" target="_self">返回上级</a></span>
        <!--Kw[/if]-->
        <span class="button"><a href="ad_category.php?page=1&PID=<!--Kw[$PID]-->" target="_self">首页</a></span>
        <!--Kw[if $lastpage!=0]-->
        <span class="button"><a href="ad_category.php?page=<!--Kw[$lastpage]-->&PID=<!--Kw[$PID]-->" target="_self">上一页</a></span>
		<!--Kw[/if]-->
		<!--Kw[if $nextpage<=$all]-->
        <span class="button"><a href="ad_category.php?page=<!--Kw[$nextpage]-->&PID=<!--Kw[$PID]-->" target="_self">下一页</a></span>
		<!--Kw[/if]-->
        <span class="button"><a href="ad_category.php?page=<!--Kw[$all]-->&PID=<!--Kw[$PID]-->" target="_self">尾页</a></span>
        <span id="goto" class="button">转到<input class="goto" name="page" type="text" id="page" />页</span>
<span class="button"><a href="add_category.php?PID=<!--Kw[$PID]-->" target="_self">增加分类</a></span>
      </div>
    <!--Kw[else]-->
  		  <!--Kw[if $is_result == "false"]-->
          没有找到相关结果。
    	  <!--Kw[/if]-->
    <!--Kw[/if]-->
    </td>
    </tr>
  </table>
</body>
</html>
