这是一个基于jsp的网上花店
源代码在线查看: orderinfo.jsp
System.out.println("@@@@@@@@@@1@@@@1@1");
int ordersId;
String totalPrice;
try
{
totalPrice=session.getAttribute("totalPrice").toString();
ordersId=cart.genOrder((String)session.getAttribute("name"),totalPrice);
System.out.println(ordersId+"@@@@@@@1");
%>
cart
href="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cartImage.files/css.css" type=text/css rel=stylesheet>
TD {
FONT-SIZE: 9pt; COLOR: #353535; LINE-HEIGHT: 120%
}
BODY {
FONT-SIZE: 9pt; LINE-HEIGHT: 120%
}
A:link {
COLOR: #000000; TEXT-DECORATION: none
}
A:visited {
COLOR: #000000; TEXT-DECORATION: none
}
A:active {
COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
RIGHT: 0px; COLOR: #336699; POSITION: relative; TOP: 1px; TEXT-DECORATION: none
}
.white1 {
FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #ffffff
}
.blue1 {
FONT-WEIGHT: bold; COLOR: #00addf
}
.blue2 {
FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: #00addf
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
A:link {
FONT-SIZE: 9pt; TEXT-DECORATION: none
}
UNKNOWN {
FONT-SIZE: 9pt; COLOR: #f51424
}
UNKNOWN {
COLOR: #000000
}
UNKNOWN {
FONT-SIZE: 9pt; COLOR: #000000
}
UNKNOWN {
FONT-FAMILY: Arial, Helvetica, sans-serif
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
border=0>
border=0>
src="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cartImage.files/title_r1_c1.gif" width=294 border=0 name=title_r1_c1>
href="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cart.jsp"> src="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cartImage.files/top_cart.gif" width=76 border=0> href="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/checkMyInfo.jsp"> src="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cartImage.files/top_my.gif" width=76 border=0> href="file:///C|/Tomcat%205.0/webapps/buyFlowers1/tourist/help.jsp"> src="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cartImage.files/top_faq.gif" width=76 border=0> href="file:///C|/Tomcat%205.0/webapps/buyFlowers1/index.jsp?exit=yes"> src="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cartImage.files/top_wh.gif" width=76 border=0>
border=0>
订花热线:0532-12345678
订花 Q Q:12345678
border=0 name=title_r2_c1>
src="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cartImage.files/title_r2_c2.gif" width=63 border=0 name=title_r2_c2>
alt="" src="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cartImage.files/title_r2_c10.gif" width=77 border=0
name=title_r2_c10> src="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cartImage.files/title_r2_c11.gif" width=80 border=0
name=title_r2_c11> height=27 alt="" src="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cartImage.files/title_r2_c12.gif" width=72 border=0
name=title_r2_c12> border=0 name=title_r2_c13>
订单生成成功!
width=235>
border=0>
订单号
用户名
总价
日期
java.util.HashMap cart_item=cart.getItems();
Iterator it=cart_item.keySet().iterator();
while(it.hasNext())
{
String goodsId=(String)it.next();
GoodsClass goodsClass=goods.getGoodsInfo(goodsId);
int i=Integer.parseInt(String.valueOf(cart_item.get(goodsId))); cart.saveItems(ordersId,goodsClass.getGoodsName(),""+goodsClass.getGoodsPrice(),i);
}
}
catch(Exception e)
{
e.printStackTrace();
}
%>
onClick="this.form.action='../index.jsp';this.form.submit()" type=image height=43 width=93
src="file:///C|/Tomcat%205.0/webapps/buyFlowers1/register/cartImage.files/cart01.gif" border=0 name=imageField>
name=h_price>
border=0>
color=#7f7f7f> href="file:///C|/Tomcat%205.0/webapps/buyFlowers1/admin/CheckLogin.jsp">管理员登录
Copyright © All Rights Reserved