<!--#include file="../../here99login/0.asp"-->
<!--#include file="../../conn/zkconn.asp"-->
<%
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From guestbook Order By id DESC", conn, 3, 2
if rs.eof then
response.write "暂无留言"
response.end
end if
rs.pagesize = 8
if request("page")=""  or isempty(request("page")) then
page = 1
else
page=int(request("page"))
end if
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
Rs.Move Rs.PageSize*(page-1)
end if%><html>
<head> 
<title>留言管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/css.css" type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
-->
</style><body bgcolor="#FFFFFF" text="#000000">

  <table width="600" align="center" style="TABLE-LAYOUT: fixed">
<tr valign="middle"> 
      <td width="70" height="25" align="center" bgcolor="#CCCCCC">ID</td>
      <td width="230" height="25" align="center" bgcolor="#CCCCCC">留言人</td>
      <td width="130" height="25" align="center" bgcolor="#CCCCCC">留言时间</td>
      <td width="120" align="center" bgcolor="#CCCCCC">IP</td>
      <td width="50" height="25" align="center" bgcolor="#CCCCCC">删除</td>
    </tr>
<%
i=1
do while not rs.eof and i<=rs.pagesize
%>
    <tr valign="middle"> 
      <td height="25" align="center" bgcolor="#f1f1f1"><font color="#FF0000">NO:<%=rs("id")%></font></td>
      <td height="25" bgcolor="#f1f1f1"><%=rs("name")%></td>
      <td height="25" align="center" bgcolor="#f1f1f1"><%=rs("sj")%></td>
      <td align="center" bgcolor="#f1f1f1"><font color="#666666"><%=rs("ip")%></font></td>
      
    <td height="25" align="center" bgcolor="#f1f1f1"> <a href="del.asp?del=a&id=<%=rs("id")%>">删除</a></td>
    </tr>
    <tr valign="middle"> 
      <td colspan="5" bgcolor="#f1f1f1" style="WORD-WRAP: break-word"> <%=rs("content")%> <font color="#666666"> 
        <% if rs("tel")="" then Response.Write "" else Response.Write "<br>&nbsp;【联系电话】"&rs("tel")&"" %>
        <% if rs("email")="" then Response.Write "" else Response.Write "<br>&nbsp;【电子信箱】<a href=mailto:"&rs("email")&"?subject=留言回复>"&rs("email")&"</a>" %>
        </font></td>
    </tr>
<%
i=i+1
 rs.MoveNext                                              
 loop 
%>
    
  <tr align="center" valign="middle"> 
    <form name=form method=get action=?> 
      <td height="25" colspan="5" bgcolor="#f1f1f1"> 
        <%
if rs.recordcount<>0 then
if page-1 mod 10=0 then
		p=(page-1) \ 10
	else
		p=(page-1) \ 10
	end if

	response.write "页次："& page &"/"& rs.pagecount &"页 每页"& rs.pagesize &" 共"& rs.recordcount &"条记录"&_
					" 分页："

	if p*10>0 then response.write "<a href='?page="&p*10&"' title=上十页>[&lt;&lt;]</a>   "
    uming_i=1
	for ii=p*10+1 to P*10+10
		   if ii=page then
	          response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "
		   else
		      response.write "<a href='?page="&ii&"'>["+Cstr(ii)+"]</a>   "
		   end if
		if ii=rs.pagecount then exit for
		 uming_i=uming_i+1
	next
	if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?page="&ii&"' title=下十页>[&gt;&gt;]</a>   "
response.write(" 　跳页：<input type=text name=page size=2 maxlength=3 class=wenbenkuang> <input type=submit name=Submit value=Go class=go-wenbenkuang>")
end if
rs.close
set rs=nothing%>
      </td>
    </form>
    </tr>
    
  <tr valign="middle" bgcolor="#CCCCCC"> 
    <form name="del" method="post" action="del.asp?del=b">
      <td height="25" colspan="5" align="center"> 
        <script language=javascript>
function onlyNum()
{
  if(!((event.keyCode>=48&&event.keyCode<=57)||(event.keyCode>=96&&event.keyCode<=105)))
//考虑小键盘上的数字键
    event.returnValue=false;
}
</script>
        批量删除 
        <input name="sj" type="text" class="wenbenkuang" id="sj" size="5" maxlength="3" onkeydown="onlyNum();">
      天以前留言
      <input name="2" type="submit" class="go-wenbenkuang" id="22" value="确定执行">
        &nbsp;&nbsp;&nbsp; 注:只能够输入数字</td>
    </form>
    </tr>
  </table>
</body>
</html>