?? admin_get_one_book.jsp
字號:
<%@ page contentType="text/html; charset=GBK" language="java" errorPage="" %>
<%@ page import="book.bookInfo"%>
<%request.setCharacterEncoding("GBK");%>
<jsp:useBean id="admin" scope="page" class="admin.admin" />
<jsp:useBean id="Books" scope="page" class="book.Books" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<link rel=stylesheet href="../../css/library.css" type="text/css">
<title>圖書管理系統</title>
</head>
<body>
<%
String supervisor=(String)session.getAttribute("supervisor");//從SESSION中獲取管理員ID
if(supervisor!=null){
String bookSN=request.getParameter("bookSN");//取得圖書編號
String err_title=null;
String err_msg=null;
%>
<table cellpadding="0" cellspacing="0" border="0" width="760" bgcolor="#2E79BE" align="center">
<tr>
<td>
<table cellpadding="3" cellspacing="1" border="0" width="760">
<tr>
<td colspan="2" height="22" bgcolor="#6CA6D5" align="center"><p style="font-size: 16px;"><strong>圖書管理系統</strong></p></td>
</tr>
<tr bgcolor="#DCEFFA">
<td width="130" height="30" align="left" valign="top"><%@include file="admin_left.jsp"%></td>
<td width="630" align="center" valign="middle">
<%
if (bookSN!=null) {
if(Books.getOneBook(bookSN)){
bookInfo bi=(bookInfo)Books.getBookList().elementAt(0);
%>
<br />
<table cellpadding=0 cellspacing=0 border=0 width=550 bgcolor="#2E79BE" align="center" style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr>
<td colspan="3" height="22" bgcolor="#6CA6D5" align="center"><strong>圖書基本信息</strong></td>
</tr>
<tr bgcolor="#DCEFFA">
<td width="130" align="right" height="25">圖書編號:</td>
<td width="285" height="25"><%=bi.getBookSN()%></td>
<td width="135" height="32" rowspan="5" align="center">
<a onClick="window.open('../BookPicture/<%=bi.getBookSN()%>.jpg','','')" style="cursor: hand;"><img src="../BookPicture/resize/<%=bi.getBookSN()%>.jpg" alt="點擊看大圖~" align="absmiddle" /></a>
</td>
</tr>
<tr bgcolor="#D8FAFA">
<td width="143" height="25" align="right">書 名:</td>
<td height="25"><%=bi.getBookName()%></td>
</tr>
<tr bgcolor="#DCEFFA">
<td align="right" height="25">作 者:</td>
<td height="25"><%=bi.getBookAuthor()%></td>
</tr>
<tr bgcolor="#D8FAFA">
<td align="right" height="25">出版社:</td>
<td height="25"><%=bi.getBookPress()%></td>
</tr>
<tr bgcolor="#DCEFFA">
<td align="right" height="25">I S B N:</td>
<td height="25"><%=bi.getBookISBN()%></td>
</tr>
<tr>
<td colspan="2" height="15" bgcolor="#6CA6D5" align=right>
<a href="admin_update_book.jsp?bookSN=<%=bi.getBookSN()%>">修改圖書信息</a>
</td>
<td height="15" bgcolor="#6CA6D5" align=right>
<a href="admin_del_book.jsp?bookSN=<%=bi.getBookSN()%>">刪除圖書</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<table cellpadding="0" cellspacing="0" border="0" width="550" bgcolor="#2E79BE" align="center" style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">
<tr>
<td>
<table cellpadding="3" cellspacing="1" border="0" width="100%">
<tr>
<td colspan="4" height="22" bgcolor="#6CA6D5" align="center"><strong>圖書詳細信息</strong></td>
</tr>
<tr bgcolor="#DCEFFA">
<td width="130" height="25" align="right">圖書分類:</td>
<td width="145" height="25" align="left"><%=bi.getBookClass()%></td>
<td width="130" height="25" align="right">單 價:</td>
<td width="145" height="25" align="left"><%=bi.getBookPrice()%></td>
</tr>
<tr bgcolor="#D8FAFA">
<td height="25" align="right">借閱等級:</td>
<td height="25" align="left"><%=bi.getBookLevel()+"級"%></td>
<td height="25" align="right">圖書狀態:</td>
<td height="25" align="left"><%=(bi.getBookIn().equals("1"))?"在庫":"不在庫"%></td>
</tr>
<tr bgcolor="#DCEFFA">
<td height="25" align="right">備 注:</td>
<td height="25" colspan="3" align="left"><%=bi.getBookComment()%></td>
</tr>
<%
if(bi.getBookIn().equals("不在庫")){
if(Books.getBorrow(bookSN)){
%>
<tr bgcolor="#D8FAFA">
<td height="25" align="right">讀者編號:</td>
<td height="25" align="left"><%=Books.getReaderSN()%></td>
<td height="25" align="right">讀者姓名:</td>
<td height="25" align="left"><%=Books.getReaderName()%></td>
</tr>
<tr bgcolor="#DCEFFA">
<td height="25" align="right">借書日期:</td>
<td height="25" align="left"><%=Books.getBD()%></td>
<td height="25" align="right">還書日期:</td>
<td height="25" align="left"><%=Books.getRD()%></td>
</tr>
<%
}
}
%>
<tr>
<td colspan="4" height="15" bgcolor="#6CA6D5" align="center"> </td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<%
}else{
err_title="沒有記錄";
err_msg="對不起,您所查詢的圖書編號為"+bookSN+"的圖書不存在,請確認您輸入的圖書編號是否正確!";
}
}else{
err_title="圖書編號為空";
err_msg="對不起,您的查詢的圖書編號為空,無法進行查詢!";
}
%>
<%if(err_title!=null){%>
<table cellpadding="0" cellspacing="0" border="0" width="550" bgcolor="#2E79BE" align="center" style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">
<tr>
<td>
<table cellpadding="3" cellspacing="1" border="0" width="100%">
<tr>
<td width="100%" height="22" align="center" bgcolor="#6CA6D5"><%=err_title%></td>
</tr>
<tr bgcolor="#DCEFFA">
<td height="30" align="center"><%=err_msg%></td>
</tr>
</table>
</td>
</tr>
</table>
<%}%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="20" bgcolor="#6CA6D5" align="center"> </td>
</tr>
</table>
<%}else{%>
<table cellpadding="0" cellspacing="0" border="0" width="760" bgcolor="#2E79BE" align="center">
<tr>
<td>
<table cellpadding="3" cellspacing="1" border="0" width="760">
<tr>
<td height="22" bgcolor="#6CA6D5" align="center"><p style="font-size: 16px;"><strong>圖書管理系統</strong></p></td>
</tr>
<tr bgcolor="#DCEFFA">
<td height="30" align="center">對不起,您尚未登錄!</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="20" bgcolor="#6CA6D5" align="center"> </td>
</tr>
</table>
<%}%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -