<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="check.asp"-->
<%Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
Response.Expires=0
%>
<html><title>楚天世纪江湖小孩管理系统</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><LINK href="style.css" rel=stylesheet></head>
<body >
<%
If Request.QueryString("CurPage") = "" or Request.QueryString("CurPage") = 0 then
CurPage = 1
Else
CurPage = CINT(Request.QueryString("CurPage"))
End If
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("sjjh_usermdb")
search=cstr(server.HTMLEncode(Request.QueryString("search")))
if search<>"" then
	rs.Open "select * from sjjh_baby where (bb_a like '%" & search & "%') order by bb_e desc", conn, 1,1
else
	rs.Open "select * from sjjh_baby order by bb_e desc", conn, 1,1
end if
if rs.eof and rs.bof then%>
<div align="center">对不起，暂时没有发现任何记录！！ 
  <%else
RS.PageSize=15'设置每页记录数,可修改
Dim TotalPages
TotalPages = RS.PageCount
If CurPage>RS.Pagecount Then
CurPage=RS.Pagecount
end if
RS.AbsolutePage=CurPage
rs.CacheSize = RS.PageSize'设置最大记录数
Dim Totalcount
Totalcount =INT(RS.recordcount)
StartPageNum=1
do while StartPageNum+10<=CurPage
StartPageNum=StartPageNum+10
Loop
EndPageNum=StartPageNum+9
If EndPageNum>RS.Pagecount then EndPageNum=RS.Pagecount%>
</div>
<table border="1" width="97%" cellpadding="1" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#00215a" align="center">
  <tr> 
    <td colspan="14" align=center bordercolorlight="#00215a" bgcolor="#d7ebff"><B>江湖小孩列表<br>
      </B>楚天世纪江湖小孩管理系统.</td>
    <td bordercolorlight="#00215a" align=center bgcolor="#d7ebff" width="9%"> 
      <a href="addbaby.asp" >增加小孩</a> </td>
  </tr>
    <tr align="center" bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';"> 
    <td bordercolorlight="#00215a">小孩姓名</td>
    <td bordercolorlight="#00215a">小孩小名</td>
    <td bordercolorlight="#00215a">小孩等级</td>
    <td bordercolorlight="#00215a">小孩爸爸</td>
    <td bordercolorlight="#00215a">小孩妈妈</td>
    <td bordercolorlight="#00215a">小孩血型</td>
    <td bordercolorlight="#00215a">小孩性别</td>
    <td bordercolorlight="#00215a">小孩状态</td>
    <td bordercolorlight="#00215a">小孩经验</td>
    <td bordercolorlight="#00215a">小孩体力</td>
    <td bordercolorlight="#00215a">小孩武功</td>
    <td bordercolorlight="#00215a">小孩攻击</td>
    <td bordercolorlight="#00215a">小孩防御</td>
    <td bordercolorlight="#00215a">杀人总数</td>
    <td bordercolorlight="#00215a">操作</td>
  </tr>
  <%I=0
p=RS.PageSize*(Curpage-1)
do while (Not RS.Eof) and (I<RS.PageSize)
p=p+1%>
  <tr align="center" bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';"> 
    <td bordercolorlight="#00215a"><%=rs("bb_a")%></td> 
    <td bordercolorlight="#00215a"><%=rs("bb_b")%></td>
      <td bordercolorlight="#00215a"><%=rs("bb_e")%></td> 
    <td bordercolorlight="#00215a"><%=rs("bb_j")%></td>
   <td bordercolorlight="#00215a"><%=rs("bb_k")%></td> 
    <td bordercolorlight="#00215a"><%=rs("bb_d")%></td>

    <td bordercolorlight="#00215a"><%=rs("bb_c")%></td> 
    <td bordercolorlight="#00215a"><%=rs("bb_h")%></td>
      <td bordercolorlight="#00215a"><%=rs("bb_n")%></td> 
    <td bordercolorlight="#00215a"><%=rs("bb_u")%></td>
   <td bordercolorlight="#00215a"><%=rs("bb_w")%></td> 
    <td bordercolorlight="#00215a"><%=rs("bb_x")%></td>
   <td bordercolorlight="#00215a"><%=rs("bb_y")%></td> 
    <td bordercolorlight="#00215a"><%=rs("bb_10")%></td>
    <td bordercolorlight="#00215a"><a href="modibaby.asp?id=<%=rs("id")%>"><font color=red>修改</font></a></td>
  </tr>
  <%I=I+1
RS.MoveNext
Loop%>
  <tr> 
    <td colspan=15 align=middle bordercolorlight="#00215a" bgcolor="#d7ebff"> <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr> 
          <form method="GET" action="babyadmin.asp">
            <td width="50%"> 　关键字： 
              <input type="text" name="search" size=15 class="input1" onfocus=this.select() onmouseover=this.focus()> 
              <input name="B1" type="submit" value="搜索" class="input1"> </td>
          </form>
          <td width="50%" align="center"> 共<%=Totalcount%>条记录 [ 
            <% if StartPageNum>1 then %>
            <a href="babyadmin.asp?CurPage=<%=StartPageNum-1%>"><<</a> 
            <%end if%>
            <% For I=StartPageNum to EndPageNum
if I<>CurPage then %>
            <a href="babyadmin.asp?CurPage=<%=I%>"><%=I%></a> 
            <% else %>
            <b><font color=#ff0000><%=I%></font></b> 
            <% end if %>
            <% Next %>
            <% if EndPageNum<RS.Pagecount then %>
            <a href="babyadmin.asp?CurPage=<%=EndPageNum+1%>">>></a> 
            <%end if%>
            ] </td>
        </tr>
      </table></td>
  </tr>
</table>
<p align=center>楚天世纪江湖</p></body></html>
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>