📄 userorderform.jsp
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ include file="checkAdmin.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<html>
<head>
<title>
userOrderForm
</title>
</head>
<body bgcolor="#ffffff">
<center>
<h1>
订单一览
</h1>
<form method="post" action="/Web/userorderform">
<sql:setDataSource driver="sun.jdbc.odbc.JdbcOdbcDriver" url="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=C:\\MyData.mdb" var="db" scope="page"/>
<sql:query var="orderform" dataSource="${db}">select * from orderform where adminId=${sessionScope.admin.adminId} and userId=${param.userId}</sql:query>
<table border="1">
<tr>
<th>订单号</th>
<th>厂家</th>
<th>商品名字</th>
<th>数量</th>
<th>单价</th>
<th>总价</th>
<th>状态</th>
<th>送货方式</th>
<th>日期</th>
<th>付款</th>
</tr>
<c:forEach var="o" items="${orderform.rows}">
<sql:query var="merchandise" dataSource="${db}">select * from merchandise where merchandiseId=${o.merchendiseId}</sql:query>
<tr>
<td>${o.orderformId} <input type="hidden" name="orderformId" value="${o.orderformId}"/></td>
<c:forEach var="merch" items="${merchandise.rows}">
<sql:query var="factory" dataSource="${db}">select * from factory where factoryId=4</sql:query>
<td><c:forEach var="f" items="${factory.rows}">${f.display}</c:forEach></td>
<td>${merch.merchandiseName}</td>
<td>${merch.merchandiseCount}</td>
<td>${merch.merchandisePrice}元</td>
<td>${merch.merchandiseCount*merch.merchandisePrice}元</td>
</c:forEach>
<sql:query var="delivergoods" dataSource="${db}">select * from delivergoods where delivergoodsId=${o.delivergoodsId}</sql:query>
<sql:query var="orderformState" dataSource="${db}">select * from orderformState where orderformStateId=${o.orderformState}</sql:query>
<td><c:forEach var="of" items="${orderformState.rows}">${of.display}</c:forEach></td>
<td><c:forEach var="d" items="${delivergoods.rows}">${d.display}</c:forEach></td>
<td>
<script type="" language="javascript">
var time='${o.orderformTime}';
document.write(time.substring(0,4)+"-"+time.substring(4,6)+"-"+time.substring(6,8)+" "+time.substring(8,10)+":"+time.substring(10,12)+":"+time.substring(12,14));
</script>
</td>
<td>${o.orderformState==1?"<input value='付帐确认' type='submit' />":"已付帐"}</td>
</tr>
</c:forEach>
</table>
</form>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -