default.asp

来自「ASP+SQL Server的图书馆管理系统」· ASP 代码 · 共 124 行

ASP
124
字号
<!--#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>
<!--#include file="head.asp"-->
<body link="#000080" vlink="#080080" text="#000000">
<form>
<p align="center">
<p align="center"><b><font style="font-size: 12pt">借 阅 图 书 信 息</font></b></p><BR>
<tr>

<%
set rs=server.createobject("adodb.recordset")
sqltext="select * from book_Record where rec_flag=0 order by Rec_LendLimit desc" 
rs.open sqltext,conn,1,1
If rs.eof and rs.bof then 

   response.write "<p align='center'><font color='#ff0000'>还没任何借阅信息</font></p>"
   response.end
End if
%>     
</tr> 
                 <table align=center border="1" cellspacing="0" width="70%" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF" style='FONT-SIZE: 9pt'>
                    <tr class=main1>
                      <td width="6%" bgcolor="#FEEC85" align="center" height="29"><strong>序号</strong></td>
                      <td width="18%" bgcolor="#FEEC85" align="center" height="29"><strong>借阅图书名称</strong></td>
                      <td width="8%" bgcolor="#FEEC85" align="center" height="29"><strong>数量</strong></td>
                      <td width="10%" bgcolor="#FEEC85" align="center" height="29"><strong>种类</strong></td>
                      <td width="11%" bgcolor="#FEEC85" align="center" height="29"><strong>借阅人</strong></td>
                      <td width="13%" bgcolor="#FEEC85" align="center" height="29"><strong>借阅时间</strong></td>
                      <td width="13%" bgcolor="#FEEC85" align="center" height="29"><strong>应还时间</strong></td>
                      <td width="9%" bgcolor="#FEEC85" align="center" height="29"><strong>备注</strong></td>
                      <td width="9%" bgcolor="#FEEC85" align="center" height="29"><strong>过期(天)</strong></td>
                    </tr>
               <%
  rs.Close
    sql = "SELECT * FROM book_Record   where rec_flag=0 ORDER BY rec_lendlimit desc"
 
    rs.Open sql,Conn,1,1
  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"><%=n%></td>
                      <td width="18%" align="center" height="30" ><%=rs("Rec_bkname")%></td>
                      <td width="8%" align="center" height="30"><%=rs("Rec_bktotal")%></td>
                      <td width="10%" align="center" height="30"><%=rs("Rec_BkType")%></td>
                      <td width="11%" align="center" height="30"><%=rs("Rec_RdrName")%></td>
                      <td width="13%" align="center" height="30"><%=rs("Rec_Lendtime")%></td>
                      <td width="13%" align="center" height="30"><%=rs("Rec_LendLimit")%></td>
                      <td width="9%" 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>
                   </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='Default.asp?page=" & i & "'>"
        Response.Write "[<b>" & i & "</b>]</a></td>"
      Next
      Response.Write "</tr></table>"
    End If
  End If
%>
</form>
<tr>
      <td><div align="center">Copyright 2007 </div></td>
</tr>
</body>
</html>





















⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?