www.pudn.com > restrant.zip > checkOut.jsp, change:2013-12-29,size:4963b


<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 
<jsp:directive.page import="com.alex.restrantol.util.ShoppingCartUtil" /> 
<jsp:directive.page import="com.alex.restrantol.util.MealItem"/> 
<jsp:directive.page import="com.alex.restrantol.entity.UserEntity"/> 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html> 
  <head> 
 
    <title>确认订单</title> 
  
	<link rel="stylesheet" type="text/css" href="CSS/styles.css"> 
 
  </head> 
   
  <body style="background-image: url(images/mainbg.jpg)"> 
  	<jsp:include page="head.jsp"/> 
  	<div style="height:10px"></div> 
  	<div align="center"> 
  	<table height="629" > 
			<tr> 
				<td valign="top"> 
					<hr /> 
					<table width="600" cellspacing="0" cellpadding="3" style="text-align:center; border:1px #04aca6 solid;"> 
						<tr style="background-color:#04aca6;color:white"> 
							<td>编号</td><td>商品名称</td><td>单价</td><td>数量</td><td>金额</td> 
						</tr> 
						<% 
							ShoppingCartUtil cart=new ShoppingCartUtil(); 
							if(session.getAttribute("cart")!=null){ 
								cart=(ShoppingCartUtil)session.getAttribute("cart"); 
								Iterator ite=cart.getMap().values().iterator(); 
								MealItem item=null; 
								while(ite.hasNext()){ 
									item=(MealItem)ite.next(); 
						%> 
						<tr style="background-color:#FFFFFF;"> 
							<td> 
								<font color="black"><%=item.getMeal().getMealId() %></font> 
							</td> 
							<td> 
								<font color="black"><%=item.getMeal().getMealName() %></font> 
							</td> 
							<td> 
								¥<font color="black"><%=item.getMeal().getMealPrice() %></font> 
							</td> 
							<td> 
								<font color="black"><%=item.getQuantity() %></font> 
							</td> 
							<td> 
								¥<font color="black"><%=item.getMeal().getMealPrice().floatValue()*item.getQuantity() %></font> 
							</td> 
						</tr> 
						<%}} %>						 
						<tr style="background-color:#04aca6;"> 
							<td> 
								合计 
							</td><td>- 
							</td> 
							<td>-</td> 
							<td>-</td> 
							<td> 
								¥<font color="yellow"><%=cart.totalPrice() %></font> 
							</td> 
						</tr>					 
					</table> 
    <table > 
			<tr> 
				<td valign="top"> 
					<br /> 
					<div align="center"> 
						<marquee scrollamount="5" direction="left"> 
							    <font color="black">千万不要填错哦!</font> 
						</marquee> 
					</div> 
					<br /> 
					<% UserEntity user = (UserEntity)request.getSession().getAttribute("user"); %> 
					<form action="/restrant/CheckoutServlet?type=checkout" method="post"> 
						<table width="600" cellspacing="0" cellpadding="4" style="text-align:center; border:1px #04aca6 solid;color:black"> 
							<tr style="background-color:#04aca6;color:white"> 
								<td colspan="2"> 
									订单信息 
								</td> 
							</tr> 
							<tr> 
								<td><br></td> 
							</tr> 
							<tr> 
								<td width="253" align="right"> 
									姓名    
								</td> 
								<td width="347" align="left"> 
									<input type="text" name="orderName" style="width:220px;" value="<%=user.getName()%>" /> 
								</td> 
							</tr> 
							<tr> 
								<td align="right"> 
									电话    
								</td> 
								<td align="left"> 
									<input type="text" name="orderTel" style="width:220px;" value="<%=user.getTel()%>"/> 
								</td> 
							</tr> 
							<tr> 
								<td align="right"> 
									邮箱    
								</td> 
								<td align="left"> 
									<input type="text" name="orderEmail" style="width:220px;" value="<%=user.getEmail()%>"/> 
								</td> 
							</tr> 
							<tr> 
								<td align="right"> 
									地址    
								</td> 
								<td align="left"> 
									<input type="text" name="orderAddress" style="width:220px;" value="<%=user.getAddress()%>"/> 
								</td> 
							</tr> 
							<tr> 
								<td align="right"> 
									调味    
								</td> 
								<td align="left"> 
									<input type="radio" name="radiobutton" value="原味" />原味 
									<input type="radio" name="radiobutton" value="不加辣" />不加辣 
									<input type="radio" name="radiobutton" value="加辣" />加辣 
								</td> 
							</tr> 
							<tr> 
								<td align="right"> 
									备注    
								</td> 
								<td align="left"> 
									<textarea name="orderRemark" cols="30" rows="5"></textarea> 
								</td> 
							</tr> 
							<tr> 
								<td colspan="2"> 
								<br> 
									<input name="Confirm" type="submit" id="Confirm" 
										value="确认订单" style="height:30px;color:white;background-color:#04aca6;width:100px;border:10px"/> 
								</td> 
							</tr> 
								<tr> 
								<td><br></td> 
							</tr> 
						</table> 
					</form> 
				</td> 
			</tr> 
		</table> 
		</td> 
		</tr> 
		</table> 
		</div> 
		<jsp:include page="foot.jsp"/> 
  </body> 
</html>