1
+ <%@ page language =" java" contentType =" text/html; charset=EUC-KR"
2
+ pageEncoding =" EUC-KR" import =" java.util.*, book.*" errorPage =" books_error.jsp" %>
3
+ <% request. setCharacterEncoding(" euc-kr" ); % >
4
+
5
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
6
+ <html >
7
+ <script language =JavaScript >
8
+ function checkS (status ) {
9
+ if (status== 1 ){
10
+ alert (" 대출 중입니다" );
11
+ document .form1 .action .value = " list" ;
12
+ document .form1 .submit ();
13
+ }
14
+ else
15
+ {document .form1 .action .value = " lent" ;
16
+ document .form1 .submit ();}
17
+ }
18
+
19
+ </script >
20
+ <head >
21
+ <meta http-equiv =" Content-Type" content =" text/html; charset=EUC-KR" >
22
+ <title >도서 대여</title >
23
+ </head >
24
+ <body >
25
+ <jsp:useBean id =" books" class =" book.Books" />
26
+ <jsp:useBean id =" bb" class =" book.BookBean" />
27
+ <jsp:setProperty name =" books" property =" *" />
28
+ <center >
29
+ <h2 >도서 선택</h2 >
30
+ <hr >
31
+ <%
32
+ int s= books. getStatus();
33
+ Books book = bb. getBook(books. getCode());
34
+ String code= book. getCode();
35
+ session. setAttribute(" code" ,code);
36
+ % >
37
+ [<a href =Bookscontrol_admin.jsp?action =mlist >도서목록으로</a >]
38
+ <form name =form1 method =post action =lent_control.jsp >
39
+ <input type =hidden name =" action" value =" lent" >
40
+ <table cellpadding =5 cellspacing =0 border =" 1" >
41
+ <tr >
42
+ <td bgcolor =" #99CC00" >책제목</td >
43
+ <td ><%= book. getTitle() % > </td >
44
+ </tr >
45
+ <tr >
46
+ <td bgcolor =" #99CC00" >저자</td >
47
+ <td ><%= book. getWriter() % > </td >
48
+ </tr >
49
+ <tr >
50
+ <td bgcolor =" #99CC00" >출판사</td >
51
+ <td ><%= book. getPublisher() % > </td >
52
+ </tr >
53
+ <tr >
54
+ <td bgcolor =" #99CC00" >도서코드</td >
55
+ <td ><%= book. getCode() % > </td >
56
+ </tr >
57
+ <tr >
58
+ <td bgcolor =" #99CC00" >비고</td >
59
+ <td ><%= book. getContents() % > </td >
60
+ </tr >
61
+
62
+ <tr >
63
+ <td colspan =2 align =center ><input type =" button" value =" 대출" onClick =" checkS('<%= book. getStatus() % > ')" ></td >
64
+ </tr >
65
+ </table >
66
+ </form >
67
+ </center >
68
+ </body >
69
+ </html >
0 commit comments