📄 search2.asp
字号:
<!--#include file="conndb.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>借阅图书信息管理</title>
<link href="style.css" rel="stylesheet">
</head>
<body >
<br><p align="center">
<%
bo_Class=request("Class")
set rs=server.createobject("adodb.recordset")
sqltext="select * from book_record "
if bo_class="按读者证号" then
sqltext=sqltext &" where rec_rdrid ="& request("name") &" order by rec_lendlimit asc"
elseif bo_class="按读者姓名" then
sqltext=sqltext &" where rec_rdrname like '%"& request("name") &"%' order by rec_lendlimit asc"
elseif bo_class="按读者类型" then
sqltext=sqltext &" where rec_rdrtype ="& request("name") &" order by rec_lendlimit asc"
end if
rs.open sqltext,conn,1,1
%>
<form method='POST' action='Search2.asp'>
<TABLE cellSpacing=1 cellPadding=4 width=73% height="136">
<TBODY>
<TR >
<TD height="15">
<table border="1" cellpadding="0" cellspacing="0" width="682" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF" height="74">
<tr >
<td width="5%" bgcolor="#FEEC85" align="center" height="30"><strong>编号</strong></td>
<td width="18%" bgcolor="#FEEC85" align="center" height="30"><strong>借阅图书名称</strong></td>
<td width="7%" bgcolor="#FEEC85" align="center" height="30"><strong>数量</strong></td>
<td width="8%" bgcolor="#FEEC85" align="center" height="30"><strong>种类</strong></td>
<td width="12%" bgcolor="#FEEC85" align="center" height="30"><strong>借阅人</strong></td>
<td width="13%" bgcolor="#FEEC85" align="center" height="30"><strong>借阅时间</strong></td>
<td width="14%" bgcolor="#FEEC85" align="center" height="30"><strong>应还时间</strong></td>
<td width="11%" bgcolor="#FEEC85" align="center" height="30"><strong>备注</strong></td>
<td width="12%" bgcolor="#FEEC85" align="center" height="30"><strong>过期(天)</strong></td>
</tr>
<%
If rs.EOF Then
Response.Write "<tr><td colspan=11 align=center>目前还没有借阅信息。</td></tr></table>"
Else
'设置每页显示记录的数量
rs.PageSize = 8
'读取参数page,表示当前页码
iPage = CLng(Request("page"))
If iPage > rs.PageCount Then
iPage = rs.PageCount
End If
If iPage <= 0 Then
iPage = 1
End If
rs.AbsolutePage = iPage
For i=1 To rs.PageSize
n = n + 1
%>
<tr >
<td width="5%" align="center" height="30"><%=n%></td>
<td width="18%" align="center" height="30"><%=rs("rec_bkname")%></td>
<td width="7%" align="center" height="30"><%=rs("rec_bktotal")%></td>
<td width="8%" align="center" height="30"><%=rs("rec_bktype")%></td>
<td width="12%" align="center" height="30"><%=rs("rec_rdrname")%></td>
<td width="13%" align="center" height="30"><%=rs("rec_lendtime")%></td>
<td width="14%" align="center" height="30"><%=rs("rec_lendlimit")%></td>
<td width="11%" align="center" height="30"><a href="#" title=<%=rs("rec_remark")%>><font color="#000000"><u>备注</u></font></a></td>
<td width="12%" align="center" height="30"><%if DateDiff("d", rs("rec_lendlimit"), date())<0 then %>0<%else%><font color=red><%=DateDiff("d", rs("rec_lendlimit"), date())%></font><%end if%></td>
<td width="0%" align="center" height="30">
</tr>
<%
rs.MoveNext()
If rs.EOF Then
Exit For
End If
Next
%>
</table>
<p align="center">
<%
'显示页码
If rs.PageCount>1 Then
Response.Write "<table border='0'>"
Response.Write "<tr><p align=center>"
Response.Write "<td><b>分页:</b></td>"
For i=1 To rs.PageCount
Response.Write "<td><a href='Search2.asp?page=" & i & "'>"
Response.Write "[<b>" & i & "</b>]</a></td>"
Next
Response.Write "</tr></table>"
End If
End If
%>
</TBODY>
</td></tr>
</form>
<tr>
<td><div align="center">Copyright 2007 </div></td>
</tr>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -