📄 bookinfo.asp
字号:
<!-- #include file="conn.asp" -->
<html>
<!--#include file="ADOFunctions.asp"-->
<%
if (session("username")="") then
response.Redirect("index.asp")
end if
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link rel="stylesheet" href="css/admin.css" type="text/css">
</head>
<body>
<br>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="595" height="49" align="left" valign="middle">
<p><font color="red"><%=session("username")%>
</font> :欢迎您进入图书管理系统! </p></td>
</tr>
<tr>
<td width="595" height="30" align="center"><font color="#000000" size="+1">借阅图书信息列表</font>
</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="73"><table height="12%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<tr align="center">
<td width="149" height="27" align="center"> 书号</td>
<td width="149" height="27" align="center">书名</td>
<td width="114">借阅时间</td>
<td width="115" align="center">期限</td>
<td width="114">操作</td>
</tr>
<%
sql="select * from loans where cardno='" &session("cardnumber")&"' "
set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,connstr,1,1
if not rs.bof and not rs.eof then
Page=request.QueryString("page")
if page="" then
page=1
else
page=CInt(page)
end if
rs.PageSize=10
rs.AbsolutePage=page
ShowPage=page
Dim I
I=rs.PageSize
do while not rs.eof and I>0
I=I-1
bn=rs("bookno")
bname=rs("title")
bd=rs("date")
Dim keepDays
maxLoanKeepDays=60
keepDays = maxLoanKeepDays - DateDiff("d",rs("date"),now())
if keepDays<0 then keepDays="<font color=red>超期"&ABS(keepDays)&"天</font>"
%>
<tr align="center">
<td width="149" height="27" align="center"><%=bn %></a></td>
<td width="149" height="27" align="center"><%=bname %></a></td>
<td width="114"><%= bd %></td>
<td width="115" align="center"><%= keepDays %></td>
<form name="restore" action="restore.asp?id=<%=rs("bookno")%>" method="post">
<td width="114"><input name="submit" type=submit style="background:#ffffff" value="归还"></td>
</form>
</tr>
<%
rs.movenext
loop
if rs.RecordCount<1 then
%>
<tr align="center">
<td height="27" colspan="8" class="title">对不起,您目前还没有借阅任何图书!</td>
</tr>
<%
end if
%>
</table></td>
</tr>
<tr>
<%
end if
%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -