📄 checkconfirm.jsp
字号:
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link rel="stylesheet" href="lvzhi.css" type="text/css">
<STYLE type=text/css>TD {
FONT-SIZE: 12px; FONT-FAMILY: "宋体"
}
</STYLE>
</head>
<body bgcolor="#FFFFFF" topmargin="0">
<%@include file="top.jsp"%> <br>
<%
dim cartstr
cartstr = getCartFromCookie()
if (cartstr=NULL or cartstr ="") then
%>
<TABLE width=760 cellspacing=0 cellpadding=0 border=0 align="center">
<TR>
<TD align="center">
你购物车中没有一件商品,请先购物!
</TD>
</TR>
</TABLE>
<%
else
dim payName,payPhone,payAddress,payMemo,sendMonth,sendDay,payEmail
dim recName,recPhone,recAddress,recMemo,recSay,recEmail,whosend,whosendtxt,recSaytxt
payName=request("MypayName")
payPhone=request("payPhone")
payAddress=request("payAddress")
payMemo=request("payMemo")
sendMonth=request("sendMonth")
sendDay=request("sendDay")
payEmail=request("payEmail")
recName=request("recName")
recPhone=request("recPhone")
recAddress=request("recAddress")
recMemo=request("recMemo")
recEmail=request("recEmail")
recSay=request("recSay")
whosend=request("whosend")
dim myrec
myrec=request("myrec")
if (myrec="1") then
recName=payName
recPhone=payPhone
recAddress=payAddress
recEmail=payEmail
end if
if (recSay="0") then
recSaytxt="小姐"
else
if (recSay="0") then
recSaytxt="女士"
esle
recSaytxt="先生"
end if
end if
if (whosend="0") then
whosendtxt=payName+"送"
else
whosendtxt="某人送"
end if
ShowCart("no")
dim sendFee,sendID
sendID=request("send")
sendFee=15
if (sendID="1") then
sendFee=10
end if
if (sendID="2") then
sendFee=15
end if
if (sendID="3") then
sendFee=20
end if
if (sendID="4") then
sendFee=30
end if
%>
<br>
<%
//生成订单
dim conn,sql,userautoid,totalpay,realpay
totalpay =lvzhicarttotalmoney+sendFee
realpay =totalpay
userautoid=session("userautoid")
if (userautoid=null or userautoid<=0) then
userautoid=-1
end if
//保存付款人,收货人信息
shopopendatabase conn
sql = "insert into myorder(payName, payPhone, payEmail, payAddress, payMemo, recName, recPhone, recAddress, recMemo, recSay, sendFee,sendArea,totalpay,realpay,userid,comefrom)"
sql = sql &" values('"&payName&"','"&payPhone&"','"&payEmail&"','"&payAddress&"','"&payMemo&"','"&recName&"','"&recPhone&"','"&recAddress&"','"&recMemo&"',"&recSay&","&sendFee&","&sendID&","&totalpay&","&realpay&","&userautoid&","&comefrom&")"
conn.execute(sql)
set rs=conn.execute("select @@IDENTITY as newIDValue FROM myorder")
dim orderid
orderid=rs("newIDValue")
//保存明细
dim cartnumstr
Dim MyProductArray(20), MyNumArray(20),totalnum,MyProductArrayTmp,MyNumArrayTmp
cartstr = getCartFromCookie()
cartnumstr=getCartNumFromCookie()
if (cartstr=NULL or cartstr ="") then
cartstr =""
end if
if (cartnumstr=NULL or cartnumstr ="") then
cartnumstr =""
end if
MyProductArrayTmp = Split(cartstr, ",",-1,1)
MyNumArrayTmp = Split(cartnumstr, ",",-1,1)
dim n
For n =LBound(MyProductArrayTmp) to UBound(MyProductArrayTmp)
MyProductArray(n)=MyProductArrayTmp(n)
MyNumArray(n)=MyNumArrayTmp(n)
Next
totalnum=getCartTotalNumFromCookie()
if (totalnum=NULL or totalnum="") then
totalnum=0
end if
dim productid,productname,productprice,quantity,query,rs,dbc,i,IsExist
n=0
shopopendatabase dbc
query = "select autoid,name,salePrice from product where autoid in (" & cartstr & ")"
set rs = dbc.execute(query)
Do WHILE not rs.EOF and n<10
productprice=rs("salePrice")
productname=rs("name")
productid=rs("autoid")
IsExist="false"
For i = 0 to CInt(totalnum)-1
if (MyProductArray(i) =CStr(productid)) then
IsExist="true"
exit for
end if
Next
if (IsExist="true") then
quantity=MyNumArray(i)
sql="insert into orderitem( productid,productname,productprice,quantity,orderid)"
sql = sql &" values("&productid& ",'"&productname&"',"&productprice&","&quantity&","&orderid&")"
conn.execute sql
end if
n=n+1
rs.movenext
Loop
closerecordset rs
shopclosedatabase dbc
shopclosedatabase conn
dim lvzhicarttotalmoney
lvzhicarttotalmoney=Request.Cookies("lvzhicarttotalmoney")
//清除购物车
setCartToCookie "","",0,0
%>
<TABLE width=760 cellspacing=0 cellpadding=0 border=0 align="center">
<tr bgcolor="#DDFFFF" ><td colspan=2> <b>订单号码:<font color=red><%=orderid%></font></b></td></tr>
<tr><td>
<TABLE width=380 cellspacing=0 cellpadding=0 border=1 align="center">
<TR>
<TD align="center" colspan=2 bgcolor="#FFDDFF">
付款人信息
</TD>
</TR>
<TR><TD width=100> 姓名:</td><td align="left"> <%=payName%></td></TR>
<TR><TD> 电话:</td><td align="left"> <%=payPhone%></td></TR>
<TR><TD> 地址:</td><td align="left"> <%=payAddress%></td></TR>
<TR><TD> EMAIL:</td><td align="left"> <%=payEmail%></td></TR>
<TR><TD> 送货日:</td><td align="left"> <%=sendMonth%>月<%=sendDay%>日</td></TR>
<TR><TD> 特殊要求:</td><td align="left"> <%=payMemo%></td></TR>
</table>
</td><td>
<TABLE width=380 cellspacing=0 cellpadding=0 border=1 align="center">
<TR><TD align="center" colspan=2 bgcolor="#FFDDFF"> 收货人信息 </TD>
</TR>
<TR><TD> 姓名:</td><td align="left"> <%=recName%><%=recSaytxt%></td></TR>
<TR><TD> 电话:</td><td align="left"> <%=recPhone%></td></TR>
<TR><TD> 地址:</td><td align="left"> <%=recAddress%></td></TR>
<TR><TD> EMAIL:</td><td align="left"> <%=recEmail%></td></TR>
<TR><TD> 送货名义:</td><td align="left"> <%=whoSendtxt%></td></TR>
<TR><TD> 特殊说明:</td><td align="left"> <%=recMemo%></td></TR>
</TABLE>
</td>
</table>
<br>
<TABLE width=760 cellspacing=0 cellpadding=0 border=0 align="center">
<TR>
<TD align="right">
送货费用:
</TD>
<TD align="center">
<%=sendFee%>元
</TD>
</TR>
<TR bgcolor="#DDFFDD">
<TD align="right" >
费用总计:
</TD>
<TD align="center">
<font color=red><%=(lvzhicarttotalmoney+sendFee)%></font>元
</TD>
</TR>
<%
if (comefrom<>"0") then
%>
<TR bgcolor="#FFDDDD">
<TD align="right" >
来自联盟:
</TD>
<TD align="center">
<font color=red><%=(comefrom)%></font>
</TD>
</TR>
<%
end if
%>
</TABLE>
<br>
<%
end if
%>
<TABLE width=760 cellspacing=0 cellpadding=0 border=0 align="center">
<TR>
<TD align="center">
一般在24小时内,电话同你联系,确认后上门收款和发货!<br>
有什么特殊需要,请联系我们客服务,电话:83347533,13910250117
</TD>
</TR>
<TR>
<TD align="center">
<a href="index.asp"><img border=0 src="images/gouwu111.gif"></a>
</TD>
</TR>
</TABLE>
<%@include file="buttom.jsp"%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -