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

📄 restorebook.asp

📁 我的课程设计
💻 ASP
字号:
<!--#include file="conn.asp" -->
<!--#include file="ADOFunctions.asp"-->
<%
	if  (session("username")="") then 	
		response.Redirect("index.asp")
	end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>会员还书</title>
<link href="css/admin.css" rel="stylesheet" type="text/css">
</head>
<body>
<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>
  
</table>
<table width="97%" border="0" align="center" cellpadding="4" cellspacing="1" bordercolor="#FFFFFF">
  <tr> 
    <td>
	<form name="form1" method="post" action="restoreBook.asp">
        <table width="81%" border="1" align="center" cellpadding="4" cellspacing="1" bordercolor="#FFFFFF">
          <tr> 
            <td height="22" colspan="2" class="header"><img src="images/error.gif" width="16" height="16" border=0 align="absmiddle"> 
              归还图书提示信息</td>
          </tr>
		  <tr > 
            <td height="50" colspan="2"> <blockquote>
                <p>
                  <%
    If Request("bookno")<>"" AND IsNumeric(Request("bookno")) Then
	Dim rs,sql,cardno
	bn=Request("bookno")
	sql = "Select cardno From loans WHERE bookno='" & bn & "'"
	set rs=GetSQLRecordset(sql,"book.mdb","loans")

	If rs.BOF And rs.EOF Then
		Response.Write("<font color=red><b>错误!</b></font>编号为“"&Request("bookno")&"”的图书不存在,或没有外借。")
	Else	
		cardno = rs("cardno")
		string1="UPDATE books SET [number]=[number]+1 WHERE bookno='" & Request("bookno")&"'"
		db.execute(string1)
		db.execute("UPDATE borrowers SET lendno=lendno-1 WHERE cardno='" &session("cardnumber")&"'")
		db.execute("Delete From loans WHERE bookno='" & Request("bookno")&"'" )
		Response.Write("编号为“"&Request("bookno")&"”的图书已经回收。")
	End If
Else
	Response.Write("请输入归还的图书编号。")	
End If
%>
                </p>
              </blockquote></td>
          </tr>
		  <tr> 
            <td height="22" colspan="2" class="header"><img src="images/flag.gif" width="16" height="16" border="0" align="absmiddle"> 
            </td>
          </tr>
          <tr > 
            <td width="27%" height="50">图书编号:</td>
            <td width="73%" height="30"> <input name="bookno" type="text" id="bookno" size="40"></td>
          </tr>
        </table>
        <p align="center"> 
          <input type="submit" name="Submit" value="提 交 还 书">
        </p>
      </form>
      <br> </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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