info_check.asp
来自「ASP+SQL Server的图书馆管理系统」· ASP 代码 · 共 124 行
ASP
124 行
<!--#include file="ConnDB.asp"-->
<!--#include file="isAdmin.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>借阅图书信息管理</title>
<link href="style.css" rel="stylesheet">
</head>
<!--#include file="head.asp"-->
<body >
<br><p align="center">
<TABLE cellSpacing=1 cellPadding=4 width=73% height="136">
<TBODY>
<form method='POST' action='Info_Search.asp'>
借阅图书信息检索:
<select name='Class' size='1' tabindex='0' style="font-size: 9pt">
<option value='按图书名称'>按图书名称</option>
<option value='按读者姓名'>按读者姓名</option>
<option value='按借阅种类'>按借阅种类</option>
<option value='按借阅数量'>按借阅数量</option>
</select>
<input type='text' name='Name' size='11'>
<input type='submit' value='查询' name='Submit'>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from book_record where rec_flag=0 order by rec_lendlimit asc"
rs.open sql,conn,1,1
%>
<TR >
<TD >
<table align=center border="1" cellspacing="0" width="99%" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF" style='FONT-SIZE: 9pt'>
<tr >
<td width="6%" bgcolor="#FEEC85" align="center" height="34"><strong>编号</strong></td>
<td width="20%" bgcolor="#FEEC85" align="center" height="34"><strong>借阅图书名称</strong></td>
<td width="6%" bgcolor="#FEEC85" align="center" height="34"><strong>数量</strong></td>
<td width="8%" bgcolor="#FEEC85" align="center" height="34"><strong>种类</strong></td>
<td width="10%" bgcolor="#FEEC85" align="center" height="34"><strong>借阅人</strong></td>
<td width="11%" bgcolor="#FEEC85" align="center" height="34"><strong>借阅时间</strong></td>
<td width="10%" bgcolor="#FEEC85" align="center" height="34"><strong>应还时间</strong></td>
<td width="8%" bgcolor="#FEEC85" align="center" height="34"><strong>备注</strong></td>
<td width="9%" bgcolor="#FEEC85" align="center" height="34"><strong>过期(天)</strong></td>
<td width="12%" bgcolor="#FEEC85" align="center" height="34"><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="6%" align="center" height="30"><%=rs("rec_id")%></td>
<td width="20%" align="center" height="30"><%=rs("rec_bkname")%></td>
<td width="6%" align="center" height="30"><%=rs("rec_bktotal")%></td>
<td width="8%" align="center" height="30"><%=rs("rec_bktype")%></td>
<td width="10%" align="center" height="30"><%=rs("rec_rdrname")%></td>
<td width="11%" align="center" height="30"><%=rs("rec_lendtime")%></td>
<td width="10%" align="center" height="30"><%=rs("rec_lendlimit")%></td>
<td width="8%" align="center" height="30"><a href="#" title=<%=rs("rec_remark")%>><font color="#000000"><u>备注</u></font></a></td>
<td width="9%" 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="12%" align="center" height="30">
<input type="button" value="归还" onclick="if (confirm('<%=rs("rec_rdrname")%> 借的 <%=rs("rec_bktotal")%>件 <%=rs("rec_bkname")%> 确实要归还吗?')) window.location='return.asp?id=<%=rs("rec_id")%>'">
<input type="button" value="续借" onclick=" window.location='renew_info.asp?id=<%=rs("rec_id")%>'" >
</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='Info_check.asp?page=" & i & "'>"
Response.Write "[<b>" & i & "</b>]</a></td>"
Next
Response.Write "</tr></table>"
End If
End If
%>
</TBODY>
</form>
<tr>
<td><div align="center">Copyright 2007 </div></td>
</tr>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?