📄 rentover_info.asp
字号:
<!--#include file="../inc/adconn.asp"-->
<!--#include file="../css.asp"-->
<p>
<%
if session("admin_name")="" then
response.end
end if%>
<% set rs=server.CreateObject("adodb.recordset")
sql="select * from book where Status = 2 order by Retime desc"
rs.open sql,conn,1,3
if rs.eof then
response.write "<font color='red'>"
response.write "还没任何预定信息"
response.write "</font>"
response.end
else
rs.PageSize =10 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
i=0
end if
%>
</p>
<table width="100%" height="1" border="0" cellpadding="3" cellspacing="1" >
<tr>
<td width="100%" class="title" bgcolor="#FFFFFF"><div align="center" style="font-weight: bold; font-family: Arial, Helvetica, sans-serif; font-size: 24px">图书馆借阅记录管理</div></td>
</tr>
<tr>
<td >[<a href="rent_info.asp">借阅的图书</a>] [<a href="rentover_info.asp">预定的图书</a>] </td>
</tr>
</table>
<TABLE border="0" cellspacing="0" width="100%" cellpadding="0">
<TR>
<TD height=25 align=left bgcolor="#99FF99">>>预定图书列表</TD>
</TR>
</TABLE>
<TABLE width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#336699">
<tr height=25 >
<TD width="67" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><b>图书ID号</b></font></TD>
<TD width="153" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><b>借阅图书名</b></font></TD>
<TD width="106" align="center" background="../images/pics/tile_sub.gif"><b><font color="#FFFFFF">图书类型</font></b></TD>
<TD width="110" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><b>预定人</b></font></TD>
<TD width="110" align="center" background="../images/pics/tile_sub.gif"><b><font color="#FFFFFF">预定时间</font></b></TD>
<TD width="110" align="center" background="../images/pics/tile_sub.gif"><b><font color="#FFFFFF">状态</font></b></TD>
<TD width="110" align="center" background="../images/pics/tile_sub.gif"><b><font color="#FFFFFF">预定时间(天)</font></b></TD>
<TD width="110" align="center" background="../images/pics/tile_sub.gif"><span style="font-weight: bold"><font color="#FFFFFF">操作</font></span></TD>
</TR>
<% do while not rs.eof and i< rs.pagesize
i=i+1
%>
<tr height="15">
<td width="67" height="28" align="center" bgcolor="#ffffff"><font face="Arial"><b><%=rs("ID")%></b></font></td>
<td width="153" bgcolor="#ffffff"><a href="../book/book_view.asp?id=<%=rs("ID")%>" target="_blank"><%=rs("Title")%></a></td>
<td width="106" align="center" bgcolor="#ffffff"><%=rs("Btype")%></td>
<td width="110" align="center" bgcolor="#ffffff"><%=rs("Owner")%></td>
<td width="110" align="center" bgcolor="#ffffff"><% =rs("botime") %></td>
<td width="110" align="center" bgcolor="#ffffff"><%
if datediff("d", rs("botime"), date())<7 then response.Write "预订中"
if datediff("d", rs("botime"), date())>7 then response.Redirect("del_book.asp?id="&rs("ID"))
%>
</td>
<td width="110" align="center" bgcolor="#ffffff"> <%if datediff("d", rs("botime"), date())<0 then %>0<%else%><font color=red><%=datediff("d", rs("botime"), date())%></font><%end if%></td>
<td width="110" align="center" bgcolor="#ffffff"><a href="del_book.asp?id=<%=rs("ID")%>">取消预定</a></td>
</tr>
<%
rs.movenext
loop%>
<TR>
<TD height="30"
colSpan=8 bgcolor="#FFFFFF" id=mainfoot> <div align="center">共<font color=red><%=maxpage%></font>页 第<%=page%>页 <font color=666666>
<%if page-1>0 then%>
<a href="rentover_info.asp?page=<%=page-1%>">上一页</a>
<%else%>
<font color=666666>上一页</font>
<%end if%>
<%if page+1<=maxpage then%>
<a href="rentover_info.asp?page=<%=page+1%>">下一页</a>
<%else%>
<font color=666666>下一页</font>
<%end if%>
</font>共<% =iCount %>条记录</div></TD>
</TR>
</table>
<%rs.close
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -