forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbookBack.jsp
More file actions
162 lines (160 loc) · 6.95 KB
/
bookBack.jsp
File metadata and controls
162 lines (160 loc) · 6.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.dao.BorrowDAO" %>
<%@ page import="com.actionForm.BorrowForm" %>
<%@ page import="com.actionForm.ReaderForm" %>
<%@ page import="java.util.*"%>
<html>
<%
ReaderForm readerForm=(ReaderForm)request.getAttribute("readerinfo");
Collection coll=(Collection)request.getAttribute("borrowinfo");
%>
<head>
<title>图书馆管理系统</title>
<link href="CSS/style.css" rel="stylesheet">
<script language="javascript">
function checkreader(form){
if(form.barcode.value==""){
alert("请输入读者条形码!");form.barcode.focus();return;
}
form.submit();
}
</script>
</head>
<body onLoad="clockon(bgclock)">
<%@include file="banner.jsp"%>
<%@include file="navigation.jsp"%>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top" bgcolor="#FFFFFF"><table width="100%" height="558" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tableBorder_gray">
<tr>
<td height="27" valign="top" style="padding:5px;" class="word_orange"> 当前位置:图书借还 > 图书归还 >>></td>
</tr>
<tr>
<td align="center" valign="top" style="padding:5px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="47" background="Images/borrowBackRenew_back.gif"> </td>
</tr>
<tr>
<td height="72" align="center" valign="top" background="Images/main_booksort_1.gif" bgcolor="#F8BF73"><table width="96%" border="0" cellpadding="1" cellspacing="1" bordercolor="#F8BF73">
<tr>
<td valign="top" bgcolor="#F8BF73"><%
int ID=0;
String name="";
String sex="";
String barcode="";
String birthday="";
String paperType="";
String paperNO="";
int number=0;
String typename="";
if(readerForm!=null){
ID=readerForm.getId().intValue();
name=readerForm.getName();
sex=readerForm.getSex();
barcode=readerForm.getBarcode();
birthday=readerForm.getBirthday();
paperType=readerForm.getPaperType();
paperNO=readerForm.getPaperNO();
number=readerForm.getNumber();
typename=readerForm.getTypename();
}
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<form name="form1" method="post" action="borrow?action=bookback">
<tr>
<td><table width="90%" height="21" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="24%" height="18" style="padding-left:7px;padding-top:7px;"><img src="Images/reader_checkbg.jpg" width="142" height="18"></td>
<td width="76%" style="padding-top:7px;">读者条形码:
<input name="barcode" type="text" id="barcode" value="<%=barcode%>" size="24">
<input name="Button" type="button" class="btn_grey" value="确定" onClick="checkreader(form1)"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="13" align="left" style="padding-left:7px;"><hr width="90%" size="1"></td>
</tr>
<tr>
<td align="center"><table width="96%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="27">姓 名:
<input name="readername" type="text" id="readername" value="<%=name%>"></td>
<td>性 别:
<input name="sex" type="text" id="sex" value="<%=sex%>"></td>
<td>读者类型:
<input name="readerType" type="text" id="readerType" value="<%=typename%>"></td>
</tr>
<tr>
<td height="27">证件类型:
<input name="paperType" type="text" id="paperType" value="<%=paperType%>"></td>
<td>证件号码:
<input name="paperNo" type="text" id="paperNo" value="<%=paperNO%>"></td>
<td>可借数量:
<input name="number" type="text" id="number" value="<%=number%>" size="17">
册
</td>
</tr>
</table></td>
</tr>
</form>
</table></td>
</tr>
<tr>
<td valign="top"><table width="100%" height="35" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#F6B83B" bgcolor="#FFFFFF">
<tr align="center" bgcolor="#e3F4F7">
<td width="24%" height="25" bgcolor="#FFF9D9">图书名称</td>
<td width="12%" bgcolor="#FFF9D9">借阅时间</td>
<td width="13%" bgcolor="#FFF9D9">应还时间</td>
<td width="14%" bgcolor="#FFF9D9">出版社</td>
<td width="12%" bgcolor="#FFF9D9">书架</td>
<td bgcolor="#FFF9D9">定价(元)</td>
<td width="12%" bgcolor="#FFF9D9"><input name="Button22" type="button" class="btn_grey" value="完成归还" onClick="window.location.href='bookBack.jsp'"></td>
</tr>
<%
int id=0;
String bookname="";
String borrowTime="";
String backTime="";
Float price=new Float(0);
String pubname="";
String bookcase="";
if(coll!=null && !coll.isEmpty()){
Iterator it=coll.iterator();
while(it.hasNext()){
BorrowForm borrowForm=(BorrowForm)it.next();
id=borrowForm.getId().intValue();
bookname=borrowForm.getBookName();
borrowTime=borrowForm.getBorrowTime();
backTime=borrowForm.getBackTime();
price=borrowForm.getPrice();
pubname=borrowForm.getPubName();
bookcase=borrowForm.getBookcaseName();
%>
<tr>
<td height="25" style="padding:5px;"> <%=bookname%></td>
<td style="padding:5px;"> <%=borrowTime%></td>
<td style="padding:5px;"> <%=backTime%></td>
<td align="center"> <%=pubname%></td>
<td align="center"> <%=bookcase%></td>
<td width="13%" align="center"> <%=price%></td>
<td width="12%" align="center"><a href="borrow?action=bookback&barcode=<%=barcode%>&id=<%=id%>&operator=<%=manager%>">归还</a> </td>
</tr>
<% }
}%>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="19" background="Images/main_booksort_2.gif"> </td>
</tr>
</table></td>
</tr>
</table>
<%@ include file="copyright.jsp"%></td>
</tr>
</table>
</body>
</html>