⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 order_view.asp

📁 网上购物系统 asp+sql server 2005
💻 ASP
字号:
<!--#include file="include/dbopenbd.asp" -->
<!--#include file="ORDER/md5.asp"-->
<%

call checklogin()
OrderNum=request("OrderNum")

dim jia
sqlinfo = "select A.ordertime,A.OrderNum,A.ProdId,A.BuyPrice,A.ProdUnit,B.PEI,B.FEI,B.OrderSum,B.status,B.memo,B.thiskou,B.Recname,B.RecPhone,B.Recmail,B.RecAddress,B.Zipcode,B.Paytype,B.Notes,b.Zipcode,b.RecName,b.RecAddress,b.RecPhone,b.CompPhone,C.ProdName "&_
          " from s_Order A,s_OrderList B,s_produc C"&_
          " where b.del<>1 and A.UserId='"&request.cookies("buyok")("userid")&"' and A.OrderNum='"&OrderNum&"' and A.OrderNum = B.OrderNum and A.ProdId=C.Prodid"
set rs=Server.Createobject("ADODB.RecordSet")

rs.Open sqlinfo,conn,1,1
if rs.eof and rs.bof  then
	mGoBack "出错了,没有这个订单号,或者您无权查看此订单!"
end if
jia=csng(rs("fei"))
userkou=csng(rs("thiskou"))
ordersum=csng(rs("OrderSum"))
status=rs("status")
RecName=rs("RecName")
RecAddress=rs("RecAddress")
Zipcode=rs("Zipcode")
RecPhone=rs("RecPhone")
CompPhone=rs("CompPhone")
%>
<HTML>
<HEAD>
<TITLE>个人订单-<%=sitename%>-<%=siteurl%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" content="<%=sitedescription%>">
<meta name="keywords" content="<%=sitekeywords%>">
<link rel="stylesheet" href="include/css.css" type="text/css">
</HEAD>
<CENTER>
<!--#include file="a_top.asp"-->
<table width=760 border=0 align=center cellpadding=0 cellspacing=0 bgcolor="#FFFFFF"  class="grayline" >
<tr> 
<td align="center" valign="top" width="185"> 
<!--#include file="user_center_menu.asp"-->
</td>
<td bgcolor="#CCCCCC" width="1"></td>
<td valign="top" bgcolor="#FfFfFf" width="570"> 
<TABLE border=0 width="100%" cellspacing="2" cellpadding="2" align=center>
<tr><td  height=30>目前位置:<a href=main.asp>首页</a> > 个人订单 </td></tr>
<tr><td width="569"  align="center" height="1" background="images/small/bgline.gif"></td></tr></table>
<br>
<table width="90%" border="1" cellpadding="4" cellspacing="0" bordercolor="#C0C0C0" align=center bordercolordark="#FFFFFF">
<tr><td colspan="4">订单号为<strong><font color=red> <%=rs("OrderNum")%> </font></strong>&nbsp;&nbsp;&nbsp;&nbsp;发生时间:<%=rs("ordertime")%><br><br>
<table border=0>
<tr><td width=100 align=right>收 货 人:&nbsp;&nbsp;</td><td><%=rs("Recname")%></td></tr>
<tr><td width=100 align=right>联系电话:&nbsp;&nbsp;</td><td><%=rs("RecPhone")%></td></tr>
<tr><td width=100 align=right>电子邮箱:&nbsp;&nbsp;</td><td><%=rs("Recmail")%></td></tr>
<tr><td width=100 align=right>收货地址:&nbsp;&nbsp;</td><td><%=rs("RecAddress")%></td></tr>
<tr><td width=100 align=right>邮政编码:&nbsp;&nbsp;</td><td><%=rs("Zipcode")%></td></tr>
<tr><td width=100 align=right>配送方式:&nbsp;&nbsp;</td><td><%=rs("pei")%></td></tr>
<tr><td width=100 align=right>配送费用:&nbsp;&nbsp;</td><td><%=formatnum(rs("fei"),2)%></td></tr>
<tr><td width=100 align=right>订单备注:&nbsp;&nbsp;</td><td><%=rs("Notes")%></td></tr>  
<tr><td width=100 align=right>客服处理:&nbsp;&nbsp;</td><td><font color=red><%=rs("memo")%></font></td></tr>
</table>
<tr bgcolor="cccccc"><td>商品名称</td><td >购买数量</td><td >结算单价</td><td  align="center"><font color="B0266D">合 计</font></td></tr>
<%
 Total = 0
 do while not rs.eof 
 Sum = csng(rs("BuyPrice"))*csng(rs("ProdUnit"))
 Total = Sum + Total '计算总金额
%>
<tr>
<td ><a href="list.asp?ProdId=<%=rs("Prodid")%>" target="_blank"><%=rs("ProdName")%></a></td>
<td ><%=rs("ProdUnit")%></td>
<td ><%=formatnum(csng(rs("BuyPrice")),2)%></td>
<td ><%=formatnum(sum,2)%></td>
</tr>
<%
rs.movenext
loop
end if
%>
<TR>
<TD colspan="4">
&nbsp;&nbsp;商品总价:<%=formatnum(total,2)%> * (折扣<%=userkou/10%>) = <%=FormatNumber(Total*userkou/10,2)%><br>                   
&nbsp;&nbsp;配送费用:<%=formatnum(jia,2)%><br>                   
&nbsp;&nbsp;总计费用:<b><font color=red><%=formatnum(ordersum,2)%> 元</font></b></td>
</TR>
<%
rs.close
set rs=nothing
%>
</TABLE><br>

<%
set rs=conn.execute("select * from s_Orderlist where ordernum='"&ordernum&"'")
if rs.eof and rs.bof then mGoBack "出错了,没有这个订单号!"

%>

<%if status<3 then

Set rs = conn.Execute("select * from pay") 
pay= rs("pay")
payid=rs("payid")
paykey=rs("paykey")
set rs=nothing
%>
<table border=0 width=100%><tr>
<%
if pay<>"0" then

	alipay_name=ordernum & "号订单在线支付"
	alipay_body="以下金额("& total & "元)已包含配送费用"

	total        =        replace(cstr(formatnumber(ordersum,2)),",","")
        s1           =        "0001"		  '命令码
        s2           =        alipay_name	  '商品名称
        s21          =        alipay_body	  '商品描述
        s3           =        ordernum		  '订单号
        s4           =        ordersum		  '金额
        s5           =        "1"		  '支付类型
        s6           =        "1"		  '购买数量
        s7           =        "1"		  '发货方式
        s8           =        "0.00"        	  '邮费
        s9           =        "0.00"        	  '邮费
        s10          =        "true"        	  '只读
        s11          =        notes		  '买家留言
        s12          =        ""		  '买家Email
        s13          =        ucase(RecName)	  '买家姓名
        s14          =        RecAddress	  '买家地址
        s15          =        Zipcode		  '买家邮编
        s16          =        RecPhone		  '买家电话
        s17          =        CompPhone		  '买家手机
        sellerEmail  =        payid		  '卖家EMAIL
	s18    	     =        "2088002028987185"  'partner
        key          =        paykey
	str2CreateAc = "cmd" & s1 & "subject" & s2
	str2CreateAc = str2CreateAc & "body" & s21
	str2CreateAc = str2CreateAc & "order_no" & s3
	str2CreateAc = str2CreateAc & "price" & s4
	str2CreateAc = str2CreateAc & "type" & s5
	str2CreateAc = str2CreateAc & "number" & s6
	str2CreateAc = str2CreateAc & "transport" & s7
	str2CreateAc = str2CreateAc & "ordinary_fee" & s8
	str2CreateAc = str2CreateAc & "express_fee" & s9
	str2CreateAc = str2CreateAc & "readonly" & s10
	str2CreateAc = str2CreateAc & "buyer_msg" & s11
	str2CreateAc = str2CreateAc & "seller" & sellerEmail
	str2CreateAc = str2CreateAc & "buyer" & s12
	str2CreateAc = str2CreateAc & "buyer_name" & s13
	str2CreateAc = str2CreateAc & "buyer_address" & s14
	str2CreateAc = str2CreateAc & "buyer_zipcode" & s15
	str2CreateAc = str2CreateAc & "buyer_tel" & s16
	str2CreateAc = str2CreateAc & "buyer_mobile" & s17
	str2CreateAc = str2CreateAc & "partner" & s18
	str2CreateAc = str2CreateAc & key
	itemURL = "https://www.alipay.com/payto:" & sellerEmail & "?cmd=" & s1
	itemURL = itemURL & "&subject=" & Server.URLEncode(s2)
	itemURL = itemURL & "&body=" & Server.URLEncode(s21)
	itemURL = itemURL & "&order_no=" & s3
	itemURL = itemURL & "&price=" & s4
	itemURL = itemURL & "&type=" & s5
	itemURL = itemURL & "&number=" & s6
	itemURL = itemURL & "&transport=" & s7
	itemURL = itemURL & "&ordinary_fee=" & s8
	itemURL = itemURL & "&express_fee=" & s9
	itemURL = itemURL & "&readonly=" & s10
	itemURL = itemURL & "&buyer_msg=" & s11
	itemURL = itemURL & "&buyer=" & s12
	itemURL = itemURL & "&buyer_name=" & s13
	itemURL = itemURL & "&buyer_address=" & s14
	itemURL = itemURL & "&buyer_zipcode=" & s15
	itemURL = itemURL & "&buyer_tel=" & s16
	itemURL = itemURL & "&buyer_mobile=" & s17
	itemURL = itemURL & "&partner=" & s18
	itemURL = itemURL & "&ac=" & MD5(str2CreateAc)
	'response.Write(itemURL)
%>

<td align=center width=50%>
<form method="post" action=<%=itemURL%> target=new><input type=submit  value="使用“支付宝”付款"></form>
</td>
<%end if%>
<td align=center height=50>
<form method="post" action="fukuan.asp" target=new><input type=submit  value="查看付款方法"></form></td></tr>
</table>
<%end if%>


  </TD>
</TR>
</TABLE>
<!--#include file="a_bottom.asp"-->
</center>
</BODY>
</HTML>
<%
set conn=nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -