⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lent.asp

📁 management of the library
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="manage/inc/config.asp"--> 
<!--#include file="manage/inc/conn.asp"--> 
<!--#include file="chk.asp"--> 

<%
username=request.Cookies(cookieName)("username")
id=request("id")
bookid=request("bookid")
if id<>"" and bookid<>"" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from lent where username='"&username&"' and id="&id,conn,1,3
rs("ishuan")=1
rs.update
rs.close
set rs=nothing
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from content where id="&bookid,conn,1,3
rs("islent")=0
rs.update
rs.close
set rs=nothing
call msgbox("还书成功!","GoUrl","lent.asp")
end if




set rs=server.CreateObject("adodb.recordset")
rs.open "select * from lent where username='"&username&"' order by id desc",conn,1,3
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>图书馆管理系统</title>
<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>
<!--#include file="head.htm"-->


<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="left" valign="top"> <br>
      <table width="662"  border="0" cellpadding="0" cellspacing="0" align="center">
        <tr> 
          <td height="130" valign="top"> 
            <table width="98%"  border="0" cellspacing="2" cellpadding="0" align="center">
              <tr> 
                <td colspan="6"> 
                  <table border="0" cellspacing="0" cellpadding="2" width="85">
                    <tr> 
                      <td width="19"><img src="images/w.gif" width="18" height="18"></td>
                      <td width="58" class="bookinfo">借阅情况</td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr class="bookinfo"> 
                <td width="8%" class="bookinfo">序号</td>
                <td width="38%" class="bookinfo"> 书名</td>
                <td width="12%" class="bookinfo">借阅时间</td>
                <td width="14%" class="bookinfo">应还时间</td>
                <td width="14%" class="bookinfo">当前转态</td>
                <td width="14%" class="bookinfo">操作</td>
              </tr>
              <%do while not rs.eof

set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from content where id="&rs("bookid"),conn,1,3
name2=rs2("name")
rs2.close
set rs2=nothing
			  bookdata2=rs("bookdata")+30
			  %>
              <tr class="bookinfo"> 
                <td width="8%" class="bookinfo"><%=rs("id")%></td>
                <td width="38%" class="bookinfo"><a href="vpro.asp?id=<%=rs("bookid")%>"><%=name2%></a></td>
                <td width="12%" class="bookinfo"><%=year(rs("bookdata"))%>-<%=month(rs("bookdata"))%>-<%=day(rs("bookdata"))%></td>
                <td width="14%" class="bookinfo"><%=year(bookdata2)%>-<%=month(bookdata2)%>-<%=day(bookdata2)%></td>
                <td width="14%" class="bookinfo"><%if rs("ishuan")=1 then%>已还<%else%>未还<%end if%></td>
                <td width="14%" class="bookinfo"><%if rs("ishuan")=0 then%><a href=?id=<%=rs("id")%>&bookid=<%=rs("bookid")%>>还书</a><%end if%></td>
              </tr>
              <%rs.movenext
			  loop%>
              <tr> 
                <td colspan="6" align="center"></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr align="left"> 
          <td height="20" colspan="2" style="padding-left:10px;" align="left">&nbsp; 
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

<!--#include file="foot.htm"-->
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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