?? maintainbooks.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 bookID=(String)session.getAttribute("id"); //取圖書的編號
String bookName=request.getParameter("bookName"); //取修改后的圖書姓名
String publisher=request.getParameter("bookPublisher"); //取修改后的圖書出版社
String pubDate=request.getParameter("pubDate"); //取出版日期
String bookAuthor=request.getParameter("bookAuthor"); //取作者
String edition=request.getParameter("edition"); //取語種
String bookSort=request.getParameter("bookSort"); //取分類
String stockNum=request.getParameter("stockNum"); //取庫存量
String bookPrice=request.getParameter("bookPrice"); //取價格
double bookPrice1=Double.parseDouble(bookPrice); //將String類型的轉化為double類型
String contentIntroduction=request.getParameter("contentIntroduction"); //取內容簡介
int flag=1;
String url=new String();
url="jdbc:odbc:bookStore";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection(url);
Statement stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
String SQL=new String();
SQL = "select * from book where bookID='" +bookID+ "'";
ResultSet rs = stmt.executeQuery(SQL);
if(!rs.next()) {
flag=0;
rs.close();
}
else{
String bookUpd="update book set bookName='"+bookName+"',publisher='"+publisher+"',pubDate='"+pubDate+"',bookAuthor='"+bookAuthor+"',edition='"+edition+"',bookSort='"+bookSort+"',stockNum='"+stockNum+"',contentIntroduction='"+contentIntroduction+"',bookPrice='"+bookPrice1+"' where bookID='"+bookID+"'";
stmt.executeUpdate(bookUpd);
stmt.close();
con.close();
}
if(flag==0){
%>
<script>
alert("數據庫更新失敗!");
</script>
<%
}
%>
<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="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff
leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0">
<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></TR></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="518">
<TBODY>
<TD vAlign=top width=581 bgColor=#ffffff height=414 rowspan="2" bordercolor="#8EEB32">
<FORM name=cityform onsubmit="return checkform(this)" action=""
method=post>
<INPUT type=hidden size=60 value=1
name=ADMINSTAR> <INPUT type=hidden value=167 name=userid>
<TABLE cellSpacing=1 cellPadding=5 width="100%" align=center vAlign=top border=0>
<TBODY>
<TR bgColor=#99cc66>
<TD colSpan=2 height=28>
<DIV align=center>修改后的圖書信息</DIV></TD></TR>
<TR>
<TD width="25%" bgColor=#99cc66>
<DIV align=right>圖書編號:</DIV></TD>
<TD class=hh width="75%" bgColor=#ffffff><FONT color=#ff3333>
<%=bookID%></FONT></TD></TR>
<TR>
<TD width="25%" bgColor=#99cc66>
<DIV align=right>圖書名稱:</DIV></TD>
<TD class=hh width="75%" bgColor=#ffffff><FONT color=#ff3333>
<%=bookName%></FONT></TD></TR>
<TR>
<TD width="25%" bgColor=#99cc66>
<DIV align=right>出版社:</DIV></TD>
<TD class=hh width="75%" bgColor=#ffffff><FONT color=#ff3333>
<%=publisher%></FONT></TD></TR>
<TR>
<TD width="25%" bgColor=#99cc66>
<DIV align=right>出版日期:</DIV></TD>
<TD class=hh width="75%" bgColor=#ffffff><FONT color=#ff3333>
<%=pubDate%></FONT></TD></TR>
<TR>
<TD width="25%" bgColor=#99cc66>
<DIV align=right>圖書作者:</DIV></TD>
<TD class=hh width="75%" bgColor=#ffffff><FONT color=#ff3333>
<%=bookAuthor%></FONT></TD></TR>
<TR>
<TD width="25%" bgColor=#99cc66>
<DIV align=right>edition:</DIV></TD>
<TD class=hh width="75%" bgColor=#ffffff>
<FONT color=#ff3333> <%=edition%></FONT></TD></TR>
<TR>
<TD width="25%" bgColor=#99cc66>
<DIV align=right>圖書類型:</DIV></TD>
<TD class=hh width="75%" bgColor=#ffffff><FONT color=#ff3333>
<%=bookSort%></FONT></TD></TR>
<TR>
<TD width="25%" bgColor=#99cc66>
<DIV align=right>庫存量:</DIV></TD>
<TD class=hh width="75%" bgColor=#ffffff><FONT color=#ff3333>
<%=stockNum%></FONT></TD></TR>
<TR>
<TD width="25%" bgColor=#99cc66>
<DIV align=right>市場價:</DIV></TD>
<TD class=hh width="75%" bgColor=#ffffff><FONT color=#ff3333>
<%=bookPrice%></FONT></TD></TR>
<TR>
<TD width="25%" bgColor=#99cc66>
<DIV align=right>內容提要:</DIV></TD>
<TD class=hh width="75%" bgColor=#ffffff><FONT color=#ff3333> <%=contentIntroduction%></FONT></TD></TR>
</TBODY></TABLE></FORM><BR></TD></TR></TBODY></TABLE></TD></TR>
<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">
【 <a href="addBook.htm">添加圖書</a>】
</td>
</tr>
<tr>
<td width="100%" height="19">
【<a href="delRoomPre.jsp" target="mainBody">
</a><a href="dealBook.jsp">刪除圖書</a>】
</td>
</tr>
<tr>
<td width="100%" height="19">
【<a href="modifyRoomPre.jsp" target="mainBody">
</a><a href="dealBook.jsp">維護圖書</a>】
</td>
</tr>
<tr>
<td width="100%" height="19">
【<a href="roomList.jsp" target="mainBody">
</a><a href="userView.jsp">用戶管理</a>】
</td>
</tr>
<tr>
<td width="100%" height="19">
【<a href="userList.jsp" target="mainBody">
</a><a href="dealOrder.jsp">訂單管理</a>】
</td>
</tr>
<tr>
<td width="100%" height="19"> 【<a target="mainBody" href="updatePwd.jsp">
密碼更改</a>】
</td>
</tr>
<tr>
<td width="100%" height="19"> 【<a target="mainBody" href="logout.jsp">
退出管理</a>】
</td>
</tr>
</table></TD>
</tr>
</TBODY></TABLE>
<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 + -