?? showdetail.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" import="wssd.*,java.util.*"%>
<jsp:useBean id="db" class="wssd.wssdDB" />
<html>
<head>
<title>查看訂單</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="../../css/style.css" rel="stylesheet" type="text/css">
<script language="javascript">
function fun(para1,para2)
{
if(para1 == 1)
{
self.location.href = "orderdeal.jsp?action=update&status=1&id="+para2;
}
if(para1 == 2)
{
self.location.href = "orderdeal.jsp?action=update&status=2&id="+para2;
}
}
</script>
</head>
<%
ArrayList list = (ArrayList)session.getAttribute("CurrentList");
if(list == null)
{
out.print("沒有記錄");
}
else
{
String id = request.getParameter("id");
if(id == null)
{
out.print("鏈接錯誤");
}
else
{
shopping sp = (shopping)list.get(Integer.parseInt(id));
%>
<table cellspacing="0" border="1" bordercolor="#000000">
<tr>
<td>訂單價格:</td>
<td><%=sp.getShoprice()%></td>
</tr>
<tr>
<td>訂單時間:</td>
<td><%=sp.getShoptime()%></td>
</tr>
<tr>
<td>訂單方式:</td>
<td><%=KeyWord.paystyle[Integer.parseInt(sp.getPaystyle())]%></td>
</tr>
<tr>
<td colspan="2">
<table>
<%
for(int j=0; j<sp.shoplist.size(); j++)
{
carTable ct = (carTable)sp.shoplist.get(j);
%>
<tr>
<td>商品名稱:</td>
<td><%=ct.getTitle()%></td>
</tr>
<tr>
<td>商品價格:</td>
<td><%=ct.getPrice()%></td>
</tr>
<%
}
%>
</table>
</td>
</tr>
<tr>
<td>訂單狀態:</td>
<td><%=KeyWord.orderStatues[Integer.parseInt(sp.getOrderstatus())]%></td>
</tr>
</table>
<table>
<tr>
<td><input type="button" class="logbutton" value="關閉" onclick="window.close()"></td>
<%
if(Integer.parseInt(sp.getOrderstatus()) == 0)
{
%>
<td><input type="button" class="logbutton" value="處理" onclick="javascript:fun(1,<%=sp.getId()%>)"></td>
<td><input type="button" class="logbutton" value="處理結束" onclick="javascript:fun(2,<%=sp.getId()%>)"></td>
<%
}
if(Integer.parseInt(sp.getOrderstatus()) == 1)
{
%>
<td><input type="button" class="logbutton" value="處理完畢" onclick="fun(2,<%=sp.getId()%>)"></td>
<%
}
%>
</tr>
</table>
<%
}
}
%>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -