<!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_sites.php?page='+$('#page').attr('value')+'&Category=<!--Kw[$category]-->';
		}
	}
	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_sites.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_site.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="category">所属分类</option>
          </select>
        </span>
      </div>
      </form>
      <form id="form2" name="form2" method="post" action="site_all.php">
      <table width="100%" border="0">
        <tr class="table_title">
          <td width="12%" nowrap="nowrap"><a href="#" id="check_all">全选/不选</a></td>
          <td width="7%" nowrap="nowrap">编号</td>
          <td width="25%" nowrap="nowrap">站点名称</td>
          <td width="8%" nowrap="nowrap">所属分类</td>
          <td width="8%" nowrap="nowrap">颜色</td>
          <td width="7%" nowrap="nowrap">排序</td>
          <td width="8%" nowrap="nowrap">在首页？</td>
          <td width="13%" nowrap="nowrap">LOGO</td>
          <td width="12%" nowrap="nowrap">选项</td>
        </tr>
      <!--Kw[section name="sites" loop=$sites]-->
        <tr class="table_content">
          <td nowrap="nowrap"><input name="checkbox[<!--Kw[$sites[sites].ID]-->]" type="checkbox" class="ckbox" id="ck_<!--Kw[$sites[sites].ID]-->" /></td>
          <td nowrap="nowrap"><!--Kw[$sites[sites].ID]--></td>
          <td nowrap="nowrap"><a href="<!--Kw[$sites[sites].Link]-->" target="_blank"><!--Kw[$sites[sites].Name]--></a></td>
          <td nowrap="nowrap"><!--Kw[$sites[sites].Category]--></td>
          <td nowrap="nowrap"><font color="<!--Kw[$sites[sites].BoxColor]-->"><!--Kw[$sites[sites].BoxColor]--></font></td>
          <td nowrap="nowrap"><input name="order[<!--Kw[$sites[sites].ID]-->]" type="text" id="order<!--Kw[$sites[sites].ID]-->" value="<!--Kw[$sites[sites].Order]-->" size="6" maxlength="6" /></td>
          <td nowrap="nowrap"><!--Kw[if $sites[sites].IsInIndex == 0]-->不在<!--Kw[else]-->在<!--Kw[/if]--></td>
          <td nowrap="nowrap"><!--Kw[if empty($sites[sites].EntryImg)]-->未上传LOGO<!--Kw[else]--><img src="../slogo/<!--Kw[$sites[sites].EntryImg]-->.png" width="89" height="24" alt="LOGO" /><!--Kw[/if]--></td>
          <td nowrap="nowrap">
			<a href="add_sites.php?type=edit&id=<!--Kw[$sites[sites].ID]-->">修改</a> | 
            <a href="ad_sites.php?type=del&id=<!--Kw[$sites[sites].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('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>
        <span class="button"><a href="sites_index.php?page=1&Category=<!--Kw[$category]-->" target="_self">首页</a></span>
        <!--Kw[if $lastpage!=0]-->
        <span class="button"><a href="sites_index.php?page=<!--Kw[$lastpage]-->&Category=<!--Kw[$category]-->" target="_self">上一页</a></span>
		<!--Kw[/if]-->
		<!--Kw[if $nextpage<=$all]-->
        <span class="button"><a href="sites_index.php?page=<!--Kw[$nextpage]-->&Category=<!--Kw[$category]-->" target="_self">下一页</a></span>
		<!--Kw[/if]-->
        <span class="button"><a href="sites_index.php?page=<!--Kw[$all]-->&Category=<!--Kw[$category]-->" target="_self">尾页</a></span>
        <span id="goto" class="button">转到<input class="goto" name="page" type="text" id="page" />页</span>
      </div>
    <!--Kw[else]-->
  		  <!--Kw[if $is_result == "false"]-->
          没有找到相关结果。
    	  <!--Kw[/if]-->
    <!--Kw[/if]-->
    </td>
    </tr>
  </table>
</body>
</html>
