<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<% if request("d")="add" then %>
<!--#include file="conn.asp"-->
<%
if request.Form("xs_nj")="" or request.form("xs_zy")="" or request.form("xs_bj")="" then
response.write "<script language=javascript>"
response.write "alert('^_^请详细填写查询资料!^_^');"
response.write "javascript:history.go(-1);"
response.write "</script>"
else
xs_nj=request.Form("xs_nj")
xs_zy=request.Form("xs_zy")
xs_bj=request.Form("xs_bj")
set rs=server.createobject("adodb.recordset")
sql="select * from xsqk where xs_nj='"&xs_nj&"'and xs_zy = '"&xs_zy&"' and xs_bj = '"&xs_bj&"'"
rs.open sql,conn,1,1
%>
<%
'分页设置
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
MaxPerPage=1 '###每页显示条数
dim totalPut '总页数
dim CurrentPage '当前页码
dim TotalPages '总页数
dim i,j
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>梅州市技工學校信息化管理系統</title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<style type="text/css">
<!--
.bq {font-size:16px;
line-height: 140%;
}
.STYLE7 {
font-size: 18px;
font-weight: bold;
}
.STYLE10 {font-size: 16px;}
-->
</style>
</head>
<body>
<%
if not rs.recordcount>0 then
%>
<div align="center"><p> </p><b>对不起,没有找到你想要的记录!<b><p></p><a href="index.asp">首页</a> <a href="xsqkcx.asp">继续查询</a></div>
<%
else
%>
<div align="center"><span class="STYLE7">梅州市技工学校 <%=rs("xs_nj")%> <%=rs("xs_zy")%> <%=rs("xs_bj")%> 学生基本情况查询结果</span>
<br /><a href="index.asp">首页</a> <a href="xsqkcx.asp">继续查询</a>
<br />页面:
<%
dim rsu,sqlu
'并根据记录数进行分页显示。
sqlu="select * from xsqk where xs_nj='"&xs_nj&"'and xs_zy = '"&xs_zy&"' and xs_bj = '"&xs_bj&"'order by id desc"
Set rsu= Server.CreateObject("ADODB.Recordset")
rsu.open sqlu,conn,1,1
pageno=request("page")
if MaxPerPage="" or isempty(MaxPerPage) or MaxPerPage<1 then
MaxPerPage=15
end if
rsu.pagesize=MaxPerPage '得到每页数
mpage=rsu.pagecount '得到总页数
if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
pageno=1
end if
for pno=1 to mpage
if pno=cint(pageno) then%><font color="#9999ff">【<font color="#FF0000"><b><%=pno%></b></font>】</font><%else%><font color="#9999ff">【<a href=xsqkcx.asp?d=add&id=<%=rsu("id")%>&page=<%=pno%> target="_self"><%=pno%></a>】</font><%end if%><%next%>
<table aling="center" border="1" width="841" cellpadding="2" cellspacing="0">
<tr align="center"><td><span class="STYLE10">姓名</span></td>
<td><span class="STYLE10">学号</span></td>
<td><span class="STYLE10">性别</span></td>
<td><span class="STYLE10">年龄</span></td>
<td><span class="STYLE10">民族</span></td>
<td><span class="STYLE10">入学时间</span></td>
<td><span class="STYLE10">毕业时间</span></td>
</tr>
<%
k=(totalPut-MaxPerPage*(currentPage-1))+1
do while not rs.eof
k=k-1%>
<tr align="center"><td><%=rs("xs_user") %> </td><td><%=rs("xs_xh") %> </td><td><%=rs("xs_xb")%> </td><td><%=rs("xs_nl") %> </td><td><%=rs("xs_nz")%> </td><td><%=rs("xs_lxtime")%> </td><td><%=rs("xs_bytime")%> </td>
</tr>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%></table><%end if %>
</div>
</body>
<%
rs.close
set rs=nothing
conn.close
set rs=nothing
end if
%></html>
<%else%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>梅州市技工學校信息化管理系統</title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<style type="text/css">
<!--
.STYLE2 {color: #FFFFFF}
.STYLE6 {font-size: 14px}
.bq {font-size:16px;
line-height: 140%;
}
A:link{color:#ffffff;text-decoration:none}
A:visited{color:#ffffff;text-decoration:none}
A:active{color:#ff0000;text-decoration:none}
A:hover{color:#ff0000;text-decoration:none}
.STYLE12 {color: #FF0000}
-->
</style>
</head>
<!-- #include file="top1.inc" -->
<!-- 导航条 -->
<tbody>
<tr>
<td >
<table width="778" bgcolor="#0089f7"height="30" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%"> <span class="STYLE2"><img src="images/class_ar.gif"> <span style="font-weight: bold">您当前的位置: <a href="index.asp">首页</a></span></span> <span class="STYLE2" style="font-weight: bold; color: #FFFFFF">-></span> <span class="STYLE2" style="font-weight: bold; color: #FFFFFF">学生基本情况查询</span></td>
</tr></table></td></tr></tbody>
<!-- BODY内客 1 -->
<tbody>
<div> <br/><tr><td><table width="358" border="1" align="center" cellpadding="0" cellspacing="2" bordercolor="#c4d6c4" bgcolor="#ffffff">
<tr>
<td width="358" height="26" colspan="2" background="images/main_bs.gif"><div align="center" style="font-size: 24px">
<p class="STYLE2" style="font-weight: bold">学生基本情况查询</p>
</div></td></tr>
<tr>
<td colspan="2" align="right">请注意:带有<span class="STYLE12">*</span>的项目必须填写。</td></tr>
<form action="xsqkcx.asp?d=add" method="post">
<tr><td width="25%" align="right">学生年级: </td><td><input type="text" name="xs_nj" size="12" /> <span class="STYLE12">*</span></td></tr>
<tr><td width="25%" align="right">学生专业: </td><td><input type="text" name="xs_zy" size="12" /> <span class="STYLE12">*</span></td></tr>
<tr><td width="25%" align="right">学生班级: </td><td><input type="text" name="xs_bj" size="12" /> <span class="STYLE12">*</span></td></tr>
<tr><td colspan="2" align="center"><input type="submit" value="查询"> <input type="reset" value="重置"></td></tr>
</form>
</table>
<div> <br/><br/></div></td></tr></tbody>
<!-- #include file="eof.inc" -->
<%end if%>
请问一下,可以显示分几页,但点第二页是提示找不到记录,请问是什么原因

















平板模式