📄 book.jsp
字号:
<%@ page language="java" contentType="text/html; charset=gb2312"
import="java.util.*" pageEncoding="gb2312" errorPage="../error.jsp"%>
<!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=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
background-image: url(MainImages/background.gif);
}
.STYLE1 {
color: #FFFFFF;
font-size: 36px;
font-weight: bold;
font-family: "宋体";
}
.STYLE58 {color: #FFFFFF}
.STYLE64 {color: #FFFFFF; font-weight: bold; font-size: 18px; }
body,td,th {
color: #FFFFFF;
}
.STYLE67 {
font-size: 18px;
font-weight: bold;
font-family: "宋体";
}
.STYLE71 { color: #FFFFFF;
font-family: "宋体";
font-size: 12px;
}
a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: none;
color: #FFFFFF;
}
a:active {
text-decoration: none;
color: #FFFFFF;
}
-->
</style>
<link href="booktable.css" rel="stylesheet" type="text/css" />
</head>
<jsp:useBean id="myRs" scope="page" class="utils.DBManager" />
<%
String userid = (String) session.getAttribute("userid");
if (userid == null)
response.sendRedirect("../index.jsp?error=2");
%>
<%
String sql = null;
String bookname = null;
String auther = null;
String publisher = null;
String detail = null;
Date pbdate = null;
Float price = null;
String bookid = null;
java.sql.ResultSet rs = null;
%>
<%
request.setCharacterEncoding("GB2312");
bookid = request.getParameter("bookid");
session.setAttribute("bookid", bookid);
if (bookid != null) {
sql = "select * from book where bookid='" + bookid + "'";
try {
rs = myRs.executeQuery(sql);
while (rs.next()) {
bookname = rs.getString("bookname");
session.setAttribute("bookname",bookname);
auther = rs.getString("auther");
publisher = rs.getString("publisher");
price = rs.getFloat("price");
detail = rs.getString("detail");
pbdate = rs.getDate("pbdate");
}
} catch (Exception e) {
e.printStackTrace();
}
if (bookid == null)
bookid = "";
if (bookname == null)
bookname = "";
if (auther == null)
auther = "";
if (publisher == null)
publisher = "";
if (pbdate == null)
pbdate = new Date();
if (price == null)
price = Float.valueOf("0");
if (detail == null)
detail = "";
}
%>
<body>
<table width="100%" border="0">
<tr>
<td width="35%"><img src="MainImages/logo.gif" width="64" height="64" /><img src="MainImages/smutitle.gif" width="268" height="64" /></td>
<td width="65%"><span class="STYLE1">教材管理系统</span></td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
<tr>
<td colspan="2"><p> </p>
</td>
</tr>
</table>
<table width="100%" height="217" border="0" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td width="13%" align="left" valign="top" background="MainImages/background.gif">
<table width="22%" border="0">
<tr>
<td><table width="23%" height="217" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="11%" align="center" background="MainImages/background.gif"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="96" height="27">
<param name="BGCOLOR" value="#306B9B" />
<param name="BGCOLOR" value="#306B9B" />
<param name="movie" value="MainImages/zhuyaogongneng.swf" />
<param name="quality" value="high" />
<embed src="MainImages/zhuyaogongneng.swf" width="96" height="27" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#306B9B" ></embed>
</object></td>
</tr>
<tr>
<td align="center" background="MainImages/background.gif"><span class="STYLE67"><a href="../Main.jsp">返回主页</a></span></td>
</tr>
<tr>
<td align="center" background="MainImages/background.gif"><span class="STYLE64"><a href="BookInfo.jsp">图书信息</a></span></td>
</tr>
<tr>
<td align="center" background="MainImages/background.gif"><span class="STYLE64"><a href="BookQuery.jsp">书号查询</a></span></td>
</tr>
<tr>
<td align="center" background="MainImages/background.gif"><span class="STYLE64"><a href="BookQuery.jsp">书名查询</a></span></td>
</tr>
<tr>
<td align="center" background="MainImages/background.gif"><span class="STYLE64"><a href="BookAdd.jsp">增加图书</a></span></td>
</tr>
<tr>
<td align="center" background="MainImages/background.gif"><span class="STYLE67"><a href="BookDel.jsp">删除图书</a></span></td>
</tr>
<tr>
<td align="center" background="MainImages/background.gif"><span class="STYLE67"><a href="BookMod.jsp">修改图书</a></span></td>
</tr>
</table></td>
</tr>
</table> <span class="STYLE58"></span></td>
<td width="87%" valign="top" background="MainImages/background.gif"><table width="100%" height="100%" border="0" class="booktable">
<tr>
<td valign="top"><form name="form1" method="post" action="">
<table width="100%" border="1" cellpadding="3" cellspacing="0">
<tr>
<td width="16%">
<label>
图书编号:
</label>
</td>
<td width="33%">
<label>
<input name="bookid" type="text" id="bookid"
value="<%=bookid%>">
</label>
</td>
<td width="18%">
图书名称:
</td>
<td width="33%">
<label>
<input name="bookname" type="text" id="bookname"
value="<%=bookname%>">
</label>
</td>
</tr>
<tr>
<td>
图书作者:
</td>
<td>
<label>
<input name="auther" type="text" id="auther"
value="<%=auther%>">
</label>
</td>
<td>
出版日期:
</td>
<td>
<label>
<input name="pbdate" type="text" id="pbdate"
value="<%=pbdate%>">
</label>
</td>
</tr>
<tr>
<td>
图书售价:
</td>
<td>
<label>
<input name="price" +i+"" type="text" id="price"
value="<%=price%>">
</label>
</td>
<td>
出版商:
</td>
<td>
<label>
<input name="publisher" type="text" id="publisher"
value="<%=publisher%>">
</label>
</td>
</tr>
<tr>
<td>
图书简介:
</td>
<td colspan="3">
<label>
<textarea name="detail" cols="80" rows="8"><%=detail%></textarea>
</label>
</td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td height="20" align="center"></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="5">
<tr>
<td><div align="center"><span class="STYLE71"><strong>Copyright©2008 </strong>上海海事大学信息053 </span></div></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -