📄 dealbook.jsp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- **************************************************************
**项目名称:网上书店管理端 ************************
**内容:所有图书列表 ************************
**此页作者:luic ************************
**完成日期:2004/4/26 ************************
**修改: 调试通过 ************************
**说明:本页实现书库中所有图书列表显示************************
** 通过列表管理员可以修改或者删除图书************************
** 但还没有实现列表分页功能 ************************
**************************************************************
-->
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="java.sql.*" %>
<%
String admin=(String)session.getAttribute("name");
if(admin==null||admin=="")
{
%>
<script>
alert("你尚未登录");
</script>
<%
response.sendRedirect("login.jsp"); //没有登录则转向login.jsp
}
%>
<%
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:bookStore");
Statement stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
String SQL=new String();
SQL = "select * from book";
ResultSet rs = stmt.executeQuery(SQL);
%>
<HTML><HEAD><TITLE>网上商店</TITLE>
<STYLE>HTML {
TEXT-DECORATION: none
}
A:link {
COLOR: #000000; TEXT-DECORATION: underline
}
A:active {
COLOR: #000000; TEXT-DECORATION: underline
}
A:visited {
COLOR: #000000; TEXT-DECORATION: underline
}
A:hover {
COLOR: rgb(0,147,43); TEXT-DECORATION: underline
}
EM {
FONT-SIZE: 16pt; FONT-STYLE: normal; FONT-FAMILY: CourierNew
}
A {
FONT-SIZE: 9pt
}
TD {
FONT-SIZE: 9pt
}
P {
FONT-SIZE: 9pt
}
.hh INPUT {
BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BACKGROUND-COLOR: #ffffff
}
</STYLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff
leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0">
<SCRIPT language=JavaScript>
<!--
function checkss()
{
if(checkspace(document.searchform.searchkey.value !='请输入关键字')) {
document.searchform.searchkey.focus();
alert("请输入查询关键字!");
return false;
}
if(checkspace(document.searchform.searchkey.value)) {
document.searchform.searchkey.focus();
alert("请输入查询关键字!");
return false;
}
document.searchform.submit();
}
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
//-->
</SCRIPT>
<TABLE cellSpacing=0 cellPadding=0 width=776 align=center border=0>
<TBODY>
<TR>
<TD><IMG height=63 src="images/guide_0.gif" width=238></TD>
<TD><IMG height=63 src="images/guide_1.gif" width=538></TD></TR>
<TD><IMG height=35 src="images/guide_2.gif" width=238></TD>
<TD background=images/guide_3.gif height=35>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD colSpan=2 height=10><IMG height=13 src="images/space.gif"
width=10></TD></TR>
<TR>
<TD width="8%"> </TD>
<TD width="92%"><FONT color=#ffffff>■
书库所有图书列表</FONT></TD></TR></TBODY></TABLE></TD></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=776 align=center border=0 height="524">
<TBODY>
<TD vAlign=top width=195 bgColor=#ffffff height=48>
<TABLE height=48 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<td width="98%" height="48" bgcolor="#99CC66">
<p align="left"> <font face="黑体" size="4">
功能列表 </font>
</td></TR></TBODY></TABLE></TD>
<TD vAlign=top width=581 bgColor=#ffffff height=524 rowspan="2" bordercolor="#8EEB32">
<TABLE cellSpacing=0 cellPadding=0 width="101%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; padding: 0; border-right-style:solid; border-bottom-style:solid" bordercolor="#99CC66" height="84">
<TBODY>
<tr>
<FORM id=Form1 name=searchform
action=research.jsp method=post>
<TD bgColor=#bede9e height=25 align=top>
<DIV align=center>
<IMG height=16
src="images/search.gif" width=64 align=middle>
<INPUT onfocus="this.value=''" value=请输入关键字 name=searchkey size="20">
<SELECT
id=action name=action size="1"> <OPTION value=1 selected>书 名</OPTION> <OPTION
value=2>图书编号</OPTION> </SELECT> <INPUT id=Submit1 style="BORDER-RIGHT: #333333 1px solid; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #333333 1px solid; FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-ATTACHMENT: scroll; BORDER-LEFT: #333333 1px solid; COLOR: #333333; LINE-HEIGHT: normal; BORDER-BOTTOM: #333333 1px solid; BACKGROUND-REPEAT: repeat; FONT-STYLE: normal; HEIGHT: 18px; BACKGROUND-COLOR: #cee7ef; FONT-VARIANT: normal" onclick="return checkss();" type=submit value=立即查询 name=Submit>
</DIV></TD></FORM></TR>
<TD height=58><TABLE cellSpacing=0 cellPadding=0 width="98%" align=center
border=0>
<TBODY>
<TR bgColor=#99cc66>
<TD width=52 height=24>
<DIV align=center>图书编号</DIV></TD>
<TD width=99 height=24>
<DIV align=center>图书名称</DIV></TD>
<TD width=46 height=24>
<DIV align=center>作者</DIV></TD>
<TD width=85 height=24>
<DIV align=center>出版社</DIV></TD>
<TD width=76 height=24>
<p align="center">图书类型</TD>
<TD width=44 height=24>
<DIV align=center>库存量</DIV></TD>
<TD width=64 height=24>
<DIV align=center>图书价格</DIV></TD>
<TD width=46 height=24>
<DIV align=center>修改</DIV></TD>
<TD width=46 height=24>
<DIV align=center>删除</DIV></TD></TR>
<%
while(rs.next()){
String bookID=rs.getString("bookID");
%>
<TR bgColor=#f3f3f3>
<TD width=52 height=20>
<DIV align=center><FONT color=#FF0000><%=bookID%></FONT></DIV></TD>
<TD width=99 height=20>
<DIV align=center><%=rs.getString("bookName")%></DIV></TD>
<TD width=46 height=20>
<p align="center"><%=rs.getString("bookAuthor")%></TD>
<TD width=85 height=20>
<p align="center"><%=rs.getString("publisher")%></TD>
<TD width=76 height=20>
<p align="center"><%=rs.getString("bookSort")%></TD>
<TD class=hh width=44 height=20>
<p align="center"><%=rs.getString("stockNum")%></TD>
<TD class=bb width=64 height=20>
<DIV align=center><FONT color=#000000>¥<%=rs.getDouble("bookPrice")%></FONT></DIV></TD>
<TD class=bb width=46 height=20>
<DIV align=center>
<INPUT onclick="self.open('maintainBook.jsp?id=<%=bookID%>','browseorder','width=776,height=500')" type=button value=修改 name=Button>
</DIV></TD>
<TD class=bb width=46 height=20>
<DIV align=center><INPUT onclick="self.open('delBook.jsp?id=<%=bookID%>','browseorder','width=776,height=500')" type=button value=删除 name=Button22>
</DIV></TD></TR>
<%
}
%>
</TBODY></TABLE><BR>
</TD></TBODY></TABLE></TD>
<%
rs.close();
stmt.close();
con.close();
%>
<tr>
<TD vAlign=top width=195 bgColor=#ffffff height=475>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%" id="AutoNumber1" bgcolor="#bede9e" height="324">
<tr>
<td width="100%" height="19">
<p align="center">
【 <a href="addBook.htm">添加图书</a>】</p>
</td>
</tr>
<tr>
<td width="100%" height="19">
<p align="center"> 【<a href="delRoomPre.jsp" target="mainBody">
</a><a href="dealBook.jsp">删除图书</a>】 </p>
</td>
</tr>
<tr>
<td width="100%" height="19">
<p align="center">
【 <a href="dealBook.jsp">维护图书</a>】</p>
</td>
</tr>
<tr>
<td width="100%" height="19">
<p align="center">【<a href="roomList.jsp" target="mainBody">
</a><a href="userView.jsp">用户管理</a>】</p>
</td>
</tr>
<tr>
<td width="100%" height="19">
<p align="center">【<a href="userList.jsp" target="mainBody">
</a><a href="dealOrder.jsp">订单管理</a>】</p>
</td>
</tr>
<tr>
<td width="100%" height="19">
<p align="center">【<a target="mainBody" href="updatePwd.jsp">
密码更改</a>】</p>
</td>
</tr>
<tr>
<td width="100%" height="19">
<p align="center">【<a target="mainBody" href="logout.jsp">
退出管理</a>】</p>
</td>
</tr>
</table></TD>
</tr>
</TBODY></TABLE>
<%
}
catch(Exception e)
{
out.println(e.toString());
}
%>
<TABLE cellSpacing=0 cellPadding=0 width=776 align=center border=0>
<TBODY>
<TR bgColor=#89c86a>
<TD><IMG height=1 src="images/space.gif" width=10></TD></TR>
<TR>
<TD height=1><IMG height=1 src="images/space.gif" width=10></TD></TR>
<TR bgColor=#89c86a>
<TD> </TD></TR></TBODY></TABLE>
<div align="center">
<table border="0" style="border-collapse: collapse" width="776" id="table1" cellpadding="0">
<tr>
<td>
<p align="center">
<br>
版权所有 ◎2003-2004 All rights resevered</td>
</tr>
</table>
</div>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -