borrow return

pull/1/head
xicheny 5 years ago
parent 8fdc4ce338
commit 8cda9b3036

@ -17,8 +17,12 @@
String sql1 = "select * from borrow_card where ID =" + user; String sql1 = "select * from borrow_card where ID =" + user;
ResultSet rs1 = borrow.executeQuery(sql1); ResultSet rs1 = borrow.executeQuery(sql1);
if(session.getAttribute("manager")!=null){ if(session.getAttribute("manager")!=null){
if (rs1.next()) { if (rs1.next()) {
int cardstatus = Integer.parseInt(rs1.getString("STATUS"));
if(cardstatus!=0){
String sql2 = "select * from books where ID =" + book; String sql2 = "select * from books where ID =" + book;
ResultSet rs2 = borrow.executeQuery(sql2); ResultSet rs2 = borrow.executeQuery(sql2);
@ -77,6 +81,14 @@
</script> </script>
<% <%
} }
}else{
%>
<script>
alert('借阅证已被挂失或注销!');
window.location.href = "02borrow.jsp";
</script>
<%
}
} else { } else {
%> %>
<script> <script>

Loading…
Cancel
Save