?? admin_add_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 submit = request.getParameter("submit");
String bookSN = request.getParameter("bookSN");//取得圖書編號
String msg_title = null;
String msg_content = 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 (submit == null) {%>
<br />
<form id="form" name="form" method="post" action="admin_add_book.jsp">
<table cellpadding=0 cellspacing=0 border=0 width=550 bgcolor="#2E79BE" align="center"">
<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="143" align="right" height="25">圖書編號:</td>
<td width="285" height="25" align="left">
<input name="bookSN" type="text" id="bookSN" value="<%=Books.createBookSN()%>" size="20" readonly />
</td>
<td width="135" height="32" rowspan="5" align="center">
<a onClick="window.open('admin_upload_book_picture.html','','')" style="cursor: hand;"><img src="../BookPicture/book.png" alt="點擊添加圖書照片!" width="90" height="120" align="absmiddle" /></a> </td>
</tr>
<tr bgcolor="#D8FAFA">
<td width="143" height="25" align="right">書 名:</td>
<td height="25" align="left">
<input name="bookName" type="text" id="bookName" size="20" /> </td>
</tr>
<tr bgcolor="#DCEFFA">
<td align="right" height="25">作 者:</td>
<td height="25" align="left">
<input name="bookAuthor" type="text" id="bookAuthor" size="20" /> </td>
</tr>
<tr bgcolor="#D8FAFA">
<td align="right" height="25">出版社:</td>
<td height="25" align="left">
<input name="bookPress" type="text" id="bookPress" size="20" /> </td>
</tr>
<tr bgcolor="#DCEFFA">
<td align="right" height="25">I S B N:</td>
<td height="25" align="left">
<input name="bookISBN" type="text" id="bookISBN" size="20" /> </td>
</tr>
<tr>
<td colspan="3" height="15" bgcolor="#6CA6D5" align=right> </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">
<select name="bookClass" size="1" id="bookClass">
<option value="A 馬列、毛鄧">A 馬列、毛鄧</option>
<option value="B 哲學、宗教">B 哲學、宗教</option>
<option value="C 社會科學總論">C 社會科學總論</option>
<option value="D 政治、法律">D 政治、法律</option>
<option value="E 軍事">E 軍事</option>
<option value="F 經濟">F 經濟</option>
<option value="G 文化科學、教育、體育">G 文化科學、教育、體育</option>
<option value="H 語言、文字">H 語言、文字</option>
<option value="I 文學">I 文學</option>
<option value="J 藝術">J 藝術</option>
<option value="K 歷史、地理">K 歷史、地理</option>
<option value="N 自然科學總論">N 自然科學總論</option>
<option value="O 數理科學和化學">O 數理科學和化學</option>
<option value="P 天文學、地球科學">P 天文學、地球科學</option>
<option value="Q 生物科學">Q 生物科學</option>
<option value="R 醫藥、衛生">R 醫藥、衛生</option>
<option value="S 農業科學">S 農業科學</option>
<option value="T 工業技術">T 工業技術</option>
<option value="TB 一般工業技術">TB 一般工業技術</option>
<option value="TF 冶金工業">TF 冶金工業</option>
<option value="TG 金屬學與金屬工藝">TG 金屬學與金屬工藝</option>
<option value="TH 機械、儀表工業">TH 機械、儀表工業</option>
<option value="TM 電工技術">TM 電工技術</option>
<option value="TN 無線電">TN 無線電</option>
<option value="TP 自動化、計算機技術">TP 自動化、計算機技術</option>
<option value="TQ 化學工業">TQ 化學工業</option>
<option value="TS 輕工業、手工業">TS 輕工業、手工業</option>
<option value="TU 建筑科學">TU 建筑科學</option>
<option value="U 交通運輸">U 交通運輸</option>
<option value="V 航空、航天">V 航空、航天</option>
<option value="X 環境、安全安全科學">X 環境、安全安全科學</option>
<option value="Z 綜合性圖書" selected="selected">Z 綜合性圖書</option>
</select>
</td>
<td width="130" height="25" align="right">單 價:</td>
<td width="145" height="25" align="left">
<input name="bookPrice" type="text" id="bookPrice" size="20" />
</td>
</tr>
<tr bgcolor="#D8FAFA">
<td height="25" align="right">借閱權限:</td>
<td height="25" align="left">
<select name="bookLevel" size="1" id="bookLevel">
<option value="1">1級</option>
<option value="2">2級</option>
<option value="3">3級</option>
<option value="4">4級</option>
<option value="5">5級</option> </select>
</td>
<td height="25" align="right">圖書狀態:</td>
<td height="25" align="left">
<select name="bookIn" size="1" id="bookIn">
<option value="1">在庫</option> </select>
</td>
</tr>
<tr bgcolor="#DCEFFA">
<td height="25" align="right">備 注:</td>
<td height="25" colspan="3" align="left">
<input name="bookComment" type="text" id="bookComment" size="50" /></td>
</tr>
<tr>
<td colspan="4" height="15" bgcolor="#6CA6D5" align="center"> </td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<input name="submit" type="submit" id="submit" value="確 定">
</form>
<%}%>
<%if(submit != null){
if(Books.addBook(request,session)){
msg_title = "添加圖書成功";
msg_content = "添加圖書成功,請再次檢查圖書信息是否正確錄入!";
//自動跳轉
response.setHeader("Refresh","2;url=admin_get_one_book.jsp?bookSN="+bookSN);
}else{
msg_title = "添加圖書失敗";
msg_content = Books.getErrMsg();
}
}%>
<%if(msg_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"><%=msg_title%></td>
</tr>
<tr bgcolor="#DCEFFA">
<td height="30" align="center"><%=msg_content%></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 + -