现在我想做个分页,但是却不会执行每页的指定数
程序代码:
<%@language=vbscript codepage=936 %>
<!--#include file="../include/nAdminCheck.asp"-->
<%ConnPath="../../"%>
<!--#include file="../include/youxiconn.asp"-->
<!--#include file="../include/function.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../include/sys.css" rel="stylesheet" type="text/css">
<head>
<title>信息管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../include/pageturn.js"></script>
</head>
<body>
<div align="center" class="title"><b><font color="#FFFFFF"><br>
用户信息管理</font></b></div>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td height="20" align="center" bgcolor="f2f2f2">
<table border="0" cellspacing="0" cellpadding="0">
<form name="form1" method="get" action="userjiaose.asp">
<tr>
<td width="72" align="right">角色名:</td>
<td width="131" >
<input name="keyword" type="text" class="textinput" id="keyword" value="<%=keyword%>" size="20">
</td>
<td width="155" align="center">输入角色名字进行搜索</td>
<td width="50">
<input type="submit" name="Submit" value="检索">
</td>
<td width="310"> </td>
<td width="198"> </td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<br>
<div align="center">
<%
keyword=request("keyword")
set rs=server.createobject("adodb.recordset")
sql="select user_no,character_no,character_name,wLevel,logout_time,dwMoney from [user_character] where 1=1"
if request("keyword")<>"" then
sql=sql&" and character_name like '%"&keyword&"%'"
end if
sql=sql&" order by user_no asc"
rs.open sql,conn2,1,1
rs.PageSize=20
IF rs.Eof THEN
Response.Write("<div align=center><font><H2>数据库里没有对应的数据存在!</font></div>")
ELSE
%>
<form name="del" method="Post" action="delejiaose.asp" onSubmit="return ConfirmDel();">
<table width="100%" border="0" cellpadding="5" cellspacing="1" class="TABLEresult" align="center">
<tr class="head">
<td height="25" align="center" background="../include/sys.gif"> </td>
<td height="25" align="center" background="../include/sys.gif"><b>序列号</b></td>
<td width="15%" align="center" background="../include/sys.gif"><b>所属帐号</b></td>
<td width="17%" align="center" background="../include/sys.gif"><b>用户角色</b></td>
<td width="6%" align="center" background="../include/sys.gif"><b>等级</b></td>
<td width="18%" align="center" background="../include/sys.gif"><b>下线时间</b></td>
<td width="11%" align="center" background="../include/sys.gif"><b>身上金钱</b></td>
<td width="10%" align="center" background="../include/sys.gif"><b>操 作</b></td>
</tr>
<%
If Request("mypage")="" Then
rs.absolutepage = 1
inAbsolutePage=1
Else
rs.AbsolutePage = cint(Request("mypage"))
inAbsolutePage=cint(Request("mypage"))
End If
For i=1 to rs.PageSize
do while not rs.eof '循环开始
dim A_name
A_name=rs("user_no")
dim rs1
set rs1=conn3.execute ("select * from user_profile where user_no='"&A_name&"'") '用A的账号作为查询条件在B表里查询;
do while not rs1.eof '如果B表有多个账号对应,则再执行循环查询;
dim B_name
B_name=rs1("user_id")
%>
<tr class='Tr' onMouseOver="this.style.backgroundColor='#C6EBDE'" onMouseOut ="this.style.backgroundColor=''">
<td width="4%" align='center' bgcolor="#E2EEFE"><p><br>
</p></td>
<td width="19%" align='center' bgcolor="#E2EEFE"><%=rs("character_no")%></td>
<td align='center' bgcolor="#E2EEFE"><%=B_name%></td>
<td align='center' bgcolor="#E2EEFE"><%=rs("character_name")%></td>
<td align='center' bgcolor="#E2EEFE"><%=rs("wLevel")%></td>
<td align='center' bgcolor="#E2EEFE"><%=rs("logout_time")%></td>
<td align='center' bgcolor="#E2EEFE"><%=rs("dwMoney")%></td>
<td align='center' bgcolor="#E2EEFE"><a href="modifjiaose.asp?character_no=<%=rs("character_no")%>&character_name=<%=rs("character_name")%>">修改</a><a href="delejiaose.asp?character_no=<%=rs("character_no")%>" onClick="return confirm('您确定进行删除操作吗?')"> 删除</a></td>
</tr>
<%
rs1.movenext
loop
rs.movenext
loop
if rs.EOF then exit for
Next
%>
</table> </form>
<%
mypage()
rs.close
set rs1=nothing
set rs=nothing
END IF
%>
</div>
</body>
</html>