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

📄 list.jsp

📁 jsp+sqlserver2000+tomcat做的教材管理系统。基本功能全部实现
💻 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 + -