shoppingcart.jsp
来自「实现一个网络购物」· JSP 代码 · 共 57 行
JSP
57 行
<%@taglib uri="http://www.mmbase.org/mmbase-taglib-1.0" prefix="mm"
%><%@page language="java" contentType="text/html; charset=utf-8"
%><%@page import="java.text.*"
%><mm:cloud
><%@include file="/includes/getids.jsp"
%><%@include file="/includes/header.jsp"
%><td class="white" colspan="2" valign="top">
<%@include file="../includes/myshopheader.jsp" %>
<table cellspacing="0" cellpadding="0"><tr>
<td width="100%" style="padding-top:10px;">
<table><tr>
<td colspan="5" style="text-align:right;">
<% int shippingCosts = 350;
TreeMap products = (TreeMap) session.getAttribute("products");
if(products==null) {
products = new TreeMap();
try { session.setAttribute("products",products);
} catch(Exception e) { }
}
int donation = 0;
String donationStr = (String) session.getAttribute("donation");
if(donationStr!=null) {
try { donation = Integer.parseInt(donationStr);
} catch(Exception e) { }
}
String memberId = (String) session.getAttribute("memberid");
if(memberId==null) { memberId = ""; }
TreeMap productsIterator = (TreeMap) products.clone();
int totalSum = 0;
String [] questions = { "Name", "Address", "Zipcode", "City", "Phone", "Email" };
if(actionId.equals("proceed")) {
%><%@include file="../includes/shoppingcartform.jsp" %><%
} else if(actionId.equals("send")&&products.size()>0) {
%><%@include file="../includes/shoppingcartresult.jsp" %><%
} else {
%><%@include file="../includes/shoppingcarttable.jsp" %><%
session.setAttribute("totalcosts","" + totalSum);
}
%></td></tr></table>
</td>
<td style="padding:10px;"><%@include file="../includes/relatedlinks.jsp" %></td>
</tr></table>
</td>
<%@include file="/includes/footer.jsp"
%></mm:cloud>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?