forked from xiaobaidemu/OrderFoodSystem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathordershow.jsp
More file actions
120 lines (117 loc) · 3.11 KB
/
Copy pathordershow.jsp
File metadata and controls
120 lines (117 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="t.o.bean.orderBean" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<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">
-->
<link rel="stylesheet" type="text/css" href="css/all.css">
</head>
<style type="text/css">
body{
margin:0px;
padding:0px;
background-color:#f4e7bd;
}
#loginbg{
width:100%;
height:166px;
background-image:url(images/top.jpg);
}
#login{
width:1000px;
height:166px;
background-image:url(images/12.jpg);
}
#content{
width:800px;
height:450px;
margin-top:10px;
}
.STYLE1 {
font-family: "楷体";
font-size: 15px;
font-weight: bold;
}
.STYLE2 {
font-family: "新宋体";
font-size: 18px;
font-style: italic;
font-weight: bold;
color: #7e8901;
}
table{
margin-top: 20px;
}
#zj{
color: red;
font-size: 15px;
}
</style>
<script type="text/javascript">
function ordercolor(){
var a = document.getElementsByTagName("tr");
var size = a.length;
for(var i=0;i<size;i++){
if(a[i].id == "orderlist" && i%2==1){
a[i].style.backgroundColor = "#f4cd7f";
}
}
}
</script>
<body onload="ordercolor();">
<center>
<div id="loginbg">
<div id="login" >
</div>
</div>
<div id="content">
<table width="80%">
<tr><td colspan="3" ><img src="images/ckorder.jpg"/></td></tr>
<tr><td><table width="100%" style="border:2px #f4cd7f solid;">
<tr><td width="">订单号</td><td>订单状态</td><td>订单物品</td></tr>
<%
ArrayList<orderBean> orderList = (ArrayList<orderBean>)session.getAttribute("ordershow");
orderBean orderbean;
if(orderList.size()==0){
%><tr id="orderlist"><td colspan="5" align="center">没有订单</td></tr><%
}
else{
int size = orderList.size();
for(int i = 0;i<size;i++){
orderbean = orderList.get(i);
String food = orderbean.getOrder_food();
String newfood = "";
newfood = newfood+food.substring(0,food.indexOf("元")+1)+"<br>";
while(food.indexOf(";")!=-1){
food = food.substring(food.indexOf("元")+1,food.lastIndexOf("元")+1);
if(food.indexOf(";")==-1){
newfood = newfood+food.substring(0,food.indexOf("元")+1);
}else
newfood = newfood+food.substring(0,food.indexOf("元")+1)+"<br>";
}
%>
<tr id="orderlist"><td><%=orderbean.getOrder_no() %></td><td><%=orderbean.getOrder_state() %></td>
<td><%=newfood %></td></tr>
<%
}
}
%></table></td></tr>
</table>
<br/><br/><br/>
</div>
</center>
</body>
</html>