?? restorebook.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 + -