?? list.jsp
字號:
<%@ page language="java" contentType="text/html; charset=gb2312"
import="java.util.*" pageEncoding="gb2312" errorPage="../error.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>訂單詳細信息</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
<!--
.STYLE3 {font-family: "宋體"; font-size: 18px; }
-->
</style>
<link href="style.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");
%>
<%
Integer level = (Integer) session.getAttribute("level");
int l = level.intValue();
if (level == null)
response.sendRedirect("../index.jsp?error=2");
if (!(l == 2))
response.sendRedirect("../error.jsp");
%>
<%
String sql = null;
java.sql.ResultSet rs = null;
String sql2 = null;
java.sql.ResultSet rs2 = null;
String sql3 = null;
java.sql.ResultSet rs3 = null;
String Listid = null;
String bookid = null;
String classid = null;
String bookname = null;
String classname = null;
String classid0=null;
Float price = null;
int menbers = 0;
int Lnumber = 0;
Date Ldate = null;
int checked = 0;
%>
<%
request.setCharacterEncoding("gb2312");
Listid = request.getParameter("listid");
if (Listid != null) {
session.setAttribute("Listid", Listid);
sql = "select * from List where Listid='" + Listid + "'";
try {
rs = myRs.executeQuery(sql);
} catch (Exception e) {
e.printStackTrace();
}
while (rs.next()) {
bookname = rs.getString("bookname");
bookid = rs.getString("bookid");
price = rs.getFloat("price");
classname = rs.getString("classname");
classid = rs.getString("classid");
menbers = rs.getInt("menbers");
Lnumber = rs.getInt("Lnumber");
Ldate = rs.getDate("Ldate");
checked = rs.getInt("checked");
}
}
if (bookname == null)
bookname = "";
if (classname == null)
classname = "";
if (Ldate == null)
Ldate = new Date();
if (bookid == null)
bookid = "";
if (classid == null)
classid = "";
%>
<%
sql2="select classname from class where classid='"+ classid +"'";//查找所選擇的訂單號的班級名
rs2 = myRs.executeQuery(sql2);
while (rs2.next()) {
classname=rs2.getString("classname");
}
sql3="select bookname from book where bookid='"+ bookid +"'";//查找所選擇的訂單號的書名
rs3 = myRs.executeQuery(sql3);
while (rs3.next()) {
bookname=rs3.getString("bookname");
}
%>
<body>
<table width="1024" border="0" align="center">
<tr>
<td>
<img src="MainImages/Top.jpg" width="1024" height="126">
</td>
</tr>
<tr>
<td>
<table width="1024" height="300" border="0"
background="MainImages/bg01.gif">
<tr>
<td width="192" valign="top">
<table width="100%" height="160" border="0">
<tr>
<td valign="middle">
<div align="center" class="STYLE3">
<a href="../Main.jsp">首頁</a>
</div>
</td>
</tr>
<tr>
<td valign="middle">
<div align="center" class="STYLE3">
<a href="ListInfo.jsp">定單信息</a>
</div>
</td>
</tr>
<tr>
<td valign="middle">
<div align="center" class="STYLE3">
<a href="ListQuery.jsp">定單號查詢</a>
</div>
</td>
</tr>
<tr>
<td valign="middle">
<div align="center" class="STYLE3">
<a href="ListQuery.jsp">按班級查詢</a>
</div>
</td>
</tr>
<tr>
<td valign="middle">
<div align="center" class="STYLE3">
<a href="ListQuery.jsp">按圖書名查詢</a>
</div>
</td>
</tr>
<tr>
<td valign="middle">
<div align="center" class="STYLE3">
<a href="ListDel.jsp">刪除已有定單</a>
</div>
</td>
</tr>
<tr>
<td valign="middle">
<div align="center" class="STYLE3">
<a href="ListAdd.jsp">增加新的定單</a>
</div>
</td>
</tr>
</table>
</td>
<td width="822" align="center">
<form name="form1" method="post" action="Book.jsp?type=save">
<table width="100%" border="1">
<tr>
<td width="18%">
<label>
定單編號:
</label>
</td>
<td width="32%">
<label>
<input name="bookid" type="text" id="bookid"
value="<%=Listid%>">
</label>
</td>
<td width="21%">
圖書名稱:
</td>
<td width="29%">
<label>
<input name="bookname" +i+"" type="text" id="bookname"
value="<%=bookname%>">
</label>
</td>
</tr>
<tr>
<td width="16%">
<label>
圖書編號:
</label>
</td>
<td width="33%">
<label>
<input name="bookid" +i+"" type="text" id="bookid"
value="<%=bookid%>">
</label>
</td>
<td width="18%">
班級編號:
</td>
<td width="33%">
<label>
<input name="classid" +i+"" type="text" id="classid"
value="<%=classid%>">
</label>
</td>
</tr>
<tr>
<td>
班級名稱:
</td>
<td>
<label>
<input name="auther" type="text" id="auther"
value="<%=classname%>">
</label>
</td>
<td>
圖書售價:
</td>
<td>
<label>
<input name="pbdate" type="text" id="pbdate"
value="<%=price%>">
</label>
</td>
</tr>
<tr>
<td>
班級人數:
</td>
<td>
<label>
<input name="price" +i+"" type="text" id="price"
value="<%=menbers%>">
</label>
</td>
<td>
已定貨數量:
</td>
<td>
<label>
<input name="publisher" type="text" id="publisher"
value="<%=Lnumber%>">
</label>
</td>
</tr>
<tr>
<td>
預定日期:
</td>
<td>
<label>
<input name="price2" +i+"" type="text" id="price2"
value="<%=Ldate%>">
</label>
</td>
<td>
是否已全部預定:
</td>
<td>
<input type="text" name="textfield" value="<%=checked%>">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<p align="center">
<img src="MainImages/bottom.gif" width="1024" height="80"
border="0" usemap="#Map">
</p>
</td>
</tr>
</table>
<map name="Map">
<area shape="rect" coords="521,49,605,70"
href="mailto:zhangxuebo1025@163.com" target="_blank">
</map>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -