⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_renew_book.jsp

📁 图书管理系统,B/S,C/S都有,附有源代码
💻 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" />
<jsp:useBean id="renewBook" scope="page" class="book.renewBook" />
<!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("newBookSN");
	String readerSN = request.getParameter("newReaderSN");
	String submit = request.getParameter("submit");
	String submitConfirm = request.getParameter("submitConfirm");
	String msg_title = null;
	String msg_content = null;
	boolean showTip = false;
	boolean chkBook = false;
	if(bookSN == null){bookSN="";}else{bookSN=new String(bookSN.getBytes("ISO-8859-1"),"GBK");}
%>
	<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">
							<br />
							<%if(submit == null & submitConfirm == null){%>
							<!--输入图书编号-->
							<form id="form" name="form" method="post" action="admin_renew_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 width="100%" height="22" colspan="4" align="center" bgcolor="#6CA6D5"><strong>续借图书</strong></td>
												</tr>
												<tr bgcolor="#DCEFFA">
													<td width="100%" height="25" align="center">
														图书编号:
														<input name="newBookSN" type="text" id="newBookSN" size="20" />
													</td>
												</tr>
												<tr>
													<td width="100%" height="22" colspan="4" align="center" bgcolor="#6CA6D5">
														<input name="submit" type="submit" id="submit" value="续借" />												  													</td>
												</tr>
											</table>										</td>
									</tr>
								</table>
							</form>
							<%}%>
							<!--搜索结果-->
							<%if(submit != null){
								chkBook=Books.getOneBook(bookSN);
	  							if(chkBook){
									bookInfo bi=(bookInfo)Books.getBookList().elementAt(0);
							%>
									<br />
									<!--图书信息-->
									<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"><%=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">书&nbsp;&nbsp;名:</td>
														<td height="25"><%=bi.getBookName()%></td>
													</tr>
													<tr bgcolor="#DCEFFA">
														<td align="right" height="25">作&nbsp;&nbsp;者:</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&nbsp;S&nbsp;B&nbsp;N:</td>
														<td height="25"><%=bi.getBookISBN()%></td>
													</tr>
													<tr>
														<td colspan="3" height="15" bgcolor="#6CA6D5" align=right><a href="admin_get_one_book.jsp?bookSN=<%=bi.getBookSN()%>">详细资料</a></td>
													</tr>
												</table>											</td>
										</tr>
									</table>
									<br />
								<%}else{
									showTip=true;
									msg_title="错误";
									msg_content="图书编号为 "+bookSN+" 的图书不存在,请确认无误后再尝试!";
								}%>
								<%
								if(chkBook==true){
								%>
									<!--确认图书编号-->
									<form id="form" name="form" method="post" action="admin_renew_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 width="100%" height="22" colspan="2" align="center" bgcolor="#6CA6D5"><strong>确认资料</strong></td>
                                              </tr>
                                              <tr bgcolor="#DCEFFA">
													<td width="100%" height="25" align="center">
														图书编号:
														<input name="bookSN" type="text" id="bookSN" value="<%=bookSN%>" size="20" />
													</td>
                                              </tr>
                                              <tr>
                                                <td width="100%" height="22" colspan="2" align="center" bgcolor="#6CA6D5"><input name="submitConfirm" type="submit" id="submitConfirm" value="确认续借" />                                                </td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                      </table>
									</form>
								<%}%>
							<%}%>
							<%if(submitConfirm != null){
								if(renewBook.renewBook(request,session)){
									if(renewBook.exeRenew(request)){
										showTip = true;
										msg_title = "续借成功";
										msg_content = "续借成功,现在可以进行下一次操作!";
									}else{
										showTip = true;
										msg_title = "续借失败";
										msg_content = "无法续借,请联系高级管理员解决!";
									}
								}else{
									showTip = true;
									msg_title = "续借失败";
									msg_content = renewBook.getErrMsg();
								}
							}%>
							<%if(showTip==true){%>	
								<!--显示信息-->
								<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 width="100%" height="22" align="center" bgcolor="#6CA6D5"><strong><%=msg_title%></strong></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">&nbsp;</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">&nbsp;</td>
		</tr>
	</table>
<%}%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -