订单源代码order.jsp
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page session="true" %>
<%
String username = (String)session.getAttribute("username");
if ( username == null || username.equals("") ){
response.sendRedirect("login.jsp?msg=nologin");
}
%>
<%@ page import="cdshop.cd.cd "%>
<%@ page import="cdshop.util.*" %>
<%@ page import="cdshop.cd.allorder" %>
<%@ page import="cdshop.run.op_cd" %>
<jsp:useBean id="myIndentlist" scope="page" class="cdshop.run.op_buy" />
<jsp:useBean id="mycd" scope="page" class="cdshop.run.op_cd" />
<jsp:useBean id="user" scope="page" class="cdshop.run.op_user" />
<%
String mesg = "";
long Id=0;
String indentNo = request.getParameter("orderno");
if( (indentNo==null)|| indentNo.equals("")) {
mesg = "你要查看的订单清单不存在!";
} else {
try {
Id = Long.parseLong(request.getParameter("id"));
if (!myIndentlist.getAllorder(indentNo)){
mesg = "你要查看的订单清单不存在!";
}
} catch (Exception e){
mesg = "你要查看的订单清单不存在!";
}
}
%>
<html>
<head>
<title>在线CD Shop 查看订购清单资料</title>
<link rel="stylesheet" href="cds.css" type="text/css">
</head>
<body bgcolor="#FFCC99" text="#000000" onload="javascript:window.focus();" >
<div align="center">
<% if(!mesg.equals("")){
out.println(mesg);
} else {
%>
<p>在线CD Shop CD订单<%= indentNo %> 清单:</p>
<table width="95%" border="1" cellspacing="1" cellpadding="1" bordercolor="#CC9966">
<tr align="center">
<td>CD名称</td>
<td>歌手名</td>
<td>CD类别</td>
<td>单价(元)</td>
<td>会员价(元)</td>
<td>数量</td>
</tr>
<%
for (int i=0; i<myIndentlist.getOrder_list().size();i++){
allorder idList = (allorder) myIndentlist.getOrder_list().elementAt(i);
//out.print(idList.getcdNo());
if (mycd.getOnecd((int)idList.getcdNo()) ){
cd bk = (cd) mycd.getcdlist().elementAt(0);
%>
<tr align="center">
<td><%= dataFormat.toString(bk.getcdName()) %></td>
<td><%= dataFormat.toString(bk.getSinger()) %></td>
<td><%= dataFormat.toString(bk.getClassname()) %></td>
<td><%= bk.getPrice() %></td>
<td><font color=red><%= (((int)(10*(bk.getPrice()*user.getUserRate((String) session.getAttribute("userid"))))/10.0)) %>元</font></td>
<td><%= idList.getAmount() %></td>
</tr>
<%
}
}%>
</table>
<% } %>
<br><p><a href="javascript:window.close()">关闭窗口</a></p>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="center">在线CD Shop版权所有<br>
CopyRight@2003 <br>
Email:<a href="mailto:sss@sss.com">sss@sss.com</a></td>
</tr>
</table>
</div>
</body>
</html>