网吧会员消费查询的一个asp文件出错!
这是一个网吧会员消费查询系统的文件,“查询消费记录”是正常是,
但是“查询加钱记录”不正常,问题出在翻页,比如查询加钱记录有4页,你点下一页,就跳转到消费记录上面去了!
各位大哥帮小弟看看!小弟只是家网吧的小网管!
<td width="50%" height="26" align="center" bgcolor="#757575"><a href="info.asp"><font color="#FFFF00"><u>您的上机记录</u></font></a></td>
<td width="50%" height="26" align="center" bgcolor="#757575"><a href="info.asp?money=add"><font color="#FFFF00"><u>您的加钱记录</u></font></a></td>
</tr>
<tr>
<td width="101%" height="4" colspan="2" valign="top">
<table width="100%" cellspacing="1" height="1">
<tr><%if request.querystring("money")="add" then%>
<td width="13%" bgcolor="#757575" align="center" height="22"><font color="#FFFFFF">卡号</font></td>
<td width="20%" bgcolor="#757575" align="center" height="22"><font color="#FFFFFF">加钱时间</font></td>
<td width="19%" bgcolor="#757575" align="center" height="22"><font color="#FFFFFF">类型</font></td>
<td width="13%" bgcolor="#757575" align="center" height="22"><font color="#FFFFFF">会员类型</font></td>
<td width="18%" bgcolor="#757575" align="center" height="22"><font color="#FFFFFF">加入金额</font></td>
</tr>
<tr><%do while not rs.eof%>
<td width="13%" bgcolor="#FFFFFF" height="20"><%=rs("sCardID")%></td>
<td width="20%" bgcolor="#FFFFFF" height="20"><%=rs("dtTime")%></td>
<td width="19%" bgcolor="#FFFFFF" height="20">
<p align="center"><%=rs("sType")%></td>
<td width="13%" bgcolor="#FFFFFF" height="20">
<p align="center"><%=rs("sDis")%></td>
<td width="18%" bgcolor="#FFFFFF" height="20"><%=rs("cRemain")%></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%><%else%>
<tr>
<td width="13%" bgcolor="#757575" align="center" height="22"><font color="#FFFFFF">卡号</font></td>
<td width="20%" bgcolor="#757575" align="center" height="22"><font color="#FFFFFF">上机时间</font></td>
<td width="19%" bgcolor="#757575" align="center" height="22"><font color="#FFFFFF">下机时间</font></td>
<td width="13%" bgcolor="#757575" align="center" height="22"><font color="#FFFFFF">机器名</font></td>
<td width="18%" bgcolor="#757575" align="center" height="22"><font color="#FFFFFF">本次消费金额</font></td>
</tr>
<tr>
<%do while not rs.eof%>
<td width="13%" bgcolor="#FFFFFF" height="20"><%=rs("sCardID")%></td>
<td width="20%" bgcolor="#FFFFFF" height="20"><%=rs("dtTime1")%></td>
<td width="19%" bgcolor="#FFFFFF" height="20"><%=rs("dtTime2")%></td>
<td width="13%" bgcolor="#FFFFFF" height="20">
<p align="center"><%=rs("sCom")%></td>
<td width="18%" bgcolor="#FFFFFF" height="20"><%=rs("cReceived")%>元</td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%><%end if%>
<tr>
<td width="83%" bgcolor="#FFFFFF" colspan="5" height="1">
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<table cellspacing=1 width='100%' border=0 colspan='4' ><form method=Post action="""&filename&"""><tr><td align=center> "
if CurrentPage<2 then
response.write "共有<strong><font color=red>"&totalnumber&"</font></strong>条 <font face=Webdings>9</font> <font face=Webdings>7</font> "
else
response.write "共有<strong><font color=red>"&totalnumber&"</font></strong>条 <a href="&filename&"?page=1><font face=Webdings>9</font></a> "
response.write "<a href="&filename&"?page="¤tPage-1&"><font face=Webdings>7</font></a> "
end if
if n-currentpage<1 then
response.write "<font face=Webdings>8</font> <font face=Webdings>:</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
response.write "<font face=Webdings>8</font></a> <a href="&filename&"?page="&n&"><font face=Webdings>:</font></a>"
end if
response.write " 页次:<strong><font color=red>"¤tPage&"</font>/"&n&"</strong>页 "
response.write " <b>"&maxperpage&"</b>条/页 "
end function
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%
if request.querystring("out")="ok" then
Response.Cookies("user_name")=""
response.redirect"login.asp"
response.end
end if
%>