www.gusucode.com > 运动用品商城网站系统源代码程序 > print.asp
<!--#include file="conn.asp"--> <%if Request.Cookies("venshop")("user_name")="" and Request.Cookies("venshop")("guest")="" then response.write "您还没有定购任何产品,或者您您的登录超时。 <a href=login.asp>登录</a> <a href=reg.asp>注册</a>" response.end elseif Request.Cookies("venshop")("user_name")<>"" then user_name=Request.Cookies("venshop")("user_name") elseif Request.Cookies("venshop")("guest")<>"" then user_name=Request.Cookies("venshop")("guest") end if set rs=server.createobject("adodb.recordset") sql="select * from venshop_sub where sub_name='"&user_name&"' and sub_id="&request("sub_id") rs.open sql,conn,1,1 if rs.eof then response.write "没有此订单信息" response.end rs.close set rs=nothing end if user_name=rs("sub_name") zt=rs("sub_zt") sub_number=rs("sub_number") zp_id=rs("zp_id") zp_name=rs("zp_name") zp_price=rs("zp_price") zp_full=rs("zp_full") %><title>订单详情<%=sub_number%></title> <%Response.ContentType = "application/msword" response.AddHeader "content-disposition", "inline; filename="&sub_number&".doc"%> <table border="0" width="600" cellspacing="1" cellpadding="5" bgcolor="#808080"><tr> <td bgcolor="#EEEEEE" colspan="4" align="center">定单号:<font color="#FF0000"><%=rs("sub_number")%><%sub_number=rs("sub_number")%></font> 日期:<font color="#808080"><%=rs("sub_date")%></font> 用户名:<%=rs("sub_name")%></td></tr> <tr><td bgcolor="#FFFFFF" colspan="4"> <table border="0" cellpadding="0" cellspacing="0"> <tr><td height="23">订单状态:</td> <td width="150" height="23"><%if rs("sub_zt")=0 then response.write "无效订单"%> <%if rs("sub_zt")=1 then response.write "未处理"%> <%if rs("sub_zt")=-1 then response.write "已处理等待客户付款"%> <%if rs("sub_zt")=2 then response.write "已付款等待发货"%> <%if rs("sub_zt")=3 then response.write "已收款发货中"%> <%if rs("sub_zt")=4 then response.write "已发货注意收货"%> <%if rs("sub_zt")=5 then response.write "已收货(归档)"%> <%i=rs("sub_zt")%></td> <td height="23">下单时间:</td> <td height="23" width="200"><%=rs("sub_date")%></td></tr> <%if rs("sub_zt1")<>"" and rs("sub_date1")<>"" then%> <tr><td height="23">处理时间:</td> <td width="150" height="23"><%=rs("sub_date1")%></td> <td height="23">处理说明:</td> <td height="23" width="200"><%=rs("sub_zt1")%></td></tr> <%end if%> <%if rs("sub_zt2")<>"" and rs("sub_date2")<>"" then%> <tr><td height="23">付款时间:</td><td width="150" height="23"><%=rs("sub_date2")%></td><td height="23">付款说明:</td><td height="23" width="200"><%=rs("sub_zt2")%></td></tr> <%end if%><%if rs("sub_zt3")<>"" and rs("sub_date3")<>"" then%> <tr><td height="23">收款时间:</td><td width="150" height="23"><%=rs("sub_date3")%></td><td height="23">收款说明:</td><td height="23" width="200"><%=rs("sub_zt3")%></td></tr> <%end if%><%if rs("sub_zt4")<>"" and rs("sub_date4")<>"" then%> <tr><td height="23">发货时间:</td><td width="150" height="23"><%=rs("sub_date4")%></td><td height="23">发货说明:</td><td height="23" width="200"><%=rs("sub_zt4")%></td></tr> <%end if%><%if rs("sub_zt5")<>"" and rs("sub_date5")<>"" then%> <tr><td height="23">到货时间:</td><td width="150" height="23"><%=rs("sub_date5")%></td><td height="23">到货说明:</td><td height="23" width="200"><%=rs("sub_zt5")%></td></tr> <%end if%> </table> </td></tr> <tr><td bgcolor="#F0F0F0" colspan="4">订 货 人:<b><%=rs("sub_from")%></b></td></tr> <tr><td bgcolor="#FFFFFF" colspan="4"><table border="0" width="600" cellspacing="0" cellpadding="0" id="table1"> <tr><td bgcolor="#FFFFFF" height="23" width="65%">地 址:<%=rs("sub_fromadds")%> </td><td bgcolor="#FFFFFF" height="23"> 邮编:<%=rs("sub_frompost")%></td></tr> <tr><td bgcolor="#FFFFFF" height="23" width="65%">邮 箱:<%=rs("sub_frommail")%></td><td bgcolor="#FFFFFF" height="23">电话:<%=rs("sub_fromtel")%></td></tr> </table></td></tr> <tr><td bgcolor="#F0F0F0" colspan="4">收 货 人:<b><%=rs("sub_to")%></b></td></tr> <tr><td bgcolor="#FFFFFF" colspan="4"><table border="0" width="600" cellspacing="0" cellpadding="0" id="table1"> <tr><td bgcolor="#FFFFFF" height="23" width="65%">收货地址:<%=rs("sub_adds")%> </td> <td bgcolor="#FFFFFF" height="23">邮编:<%=rs("sub_post")%></td></tr> <tr><td bgcolor="#FFFFFF" height="23" width="65%">邮 箱:<%=rs("sub_mail")%></td> <td bgcolor="#FFFFFF" height="23">电话:<%=rs("sub_tel")%></td></tr> </table></td></tr> <tr><td height="20" bgcolor="#F0F0F0" colspan="4">到货时间:<%=rs("sub_totime")%></td></tr> <tr><td height="20" bgcolor="#FFFFFF" colspan="4"><table border="0" width="600" cellspacing="0" cellpadding="0" id="table1"> <tr><td height="20" bgcolor="#FFFFFF" width="50%">付款方式:<%=rs("sub_payname")%></td> <td height="20" bgcolor="#FFFFFF" width="50%">送货方式:<%=rs("sub_psname")%></td></tr> <tr> <td height="20" bgcolor="#FFFFFF" width="50%" colspan="2">需要发票:<%if rs("sub_fapiao")=1 then%>需要(抬头:<%=rs("sub_taitou")%>)<%else%>不需要<%end if%></td></tr> <%if fapiao=1 then%><tr> <td height="20" bgcolor="#FFFFFF" width="50%" colspan="2">缺货处理:<%if rs("sub_quehuo")=1 then%>等待到货<%else%>从订单取消<%end if%></td></tr> <%end if%> <tr><td height="20" bgcolor="#FFFFFF" colspan="2">其它说明:<%=rs("sub_other")%></td></tr> </table></td></tr> <tr bgcolor="#f0f0f0"><td colspan="4"> <p align="center">订购货物列表</p></td></tr> <tr bgcolor="#f7f7f7"><td align="center">货物名称</td><td align="center">单价</td><td align="center">备注</td><td align="center">合计</td></tr> <%set rsp=server.createobject("adodb.recordset") sql="select * from venshop_basket where sub_number='"&sub_number&"' and user_name='"&user_name&"' and basket_check=1" rsp.open sql,conn,1,1 if rsp.eof then response.write "没有此订单信息" else do while not rsp.eof%> <tr><td bgcolor="#FFFFFF" align="center"><%=rsp("hw_name")%></td> <td bgcolor="#FFFFFF" align="center"><%=fuhao%> <%=rsp("hw_price")%> <%=danwei%></td> <td bgcolor="#FFFFFF" align="center"><%=rsp("kxa")%> <%=rsp("kxb")%></td> <td bgcolor="#FFFFFF" align="center"><%=fuhao%> <%=rsp("hw_price")*rsp("basket_count")%> <%=danwei%></td></tr> <%totalcash=totalcash+rsp("hw_price")*rsp("basket_count") totaljifen=totaljifen+rsp("hw_jifen")*rsp("basket_count") totalw=totalw+(rsp("basket_count")*trim(rsp("hw_weight"))) totaly=totaly+(rsp("basket_count")*trim(rsp("hw_yunfei"))) totalc=totalc+rsp("basket_count") rsp.movenext loop rsp.close set rsp=nothing%> <%set rsp=server.createobject("adodb.recordset") sql="select * from venshop_user where username='"&user_name&"'" rsp.open sql,conn,1,1 if rsp.eof then zhekou=100 usertype_name="一般用户" zhekouyu="不享受折扣价" rsp.close set rsp=nothing else usertype=rsp("user_type") rsp.close set rsp=nothing set rsp=server.createobject("adodb.recordset") sql="select * from venshop_usertype where usertype_id="&usertype&"" rsp.open sql,conn,1,1 if rsp.eof then zhekou=100 usertype_name="一般用户" zhekouyu="不享受折扣价" else zhekou=rsp("usertype_zhekou") usertype_name=rsp("usertype_name") zhekouyu="享受原价"&zhekou&"%的折扣价" end if rsp.close set rsp=nothing end if%> <%if totalcash*zhekou/100>=zp_full and zp_id>0 then%> <tr><td bgcolor="#FFFFFF" align="center"><%=zp_name%></td> <td bgcolor="#FFFFFF" align="center"><%=fuhao%> 0 <%=danwei%></td> <td bgcolor="#FFFFFF" align="center">赠品</td> <td bgcolor="#FFFFFF" align="center"><%=fuhao%> 0 <%=danwei%></td> </tr> <%end if%> <tr><td bgcolor="#FFFFFF" colspan="4" align="right"> <p style="line-height: 200%; margin-left:5px; margin-right:15px; margin-top:5px; margin-bottom:5px"> 共 <span class="price"><%=totalc%></span> 件商品 价格总计:<span class="price"><%=fuhao%> <%=totalcash%> <%=danwei%></span> 您是:<font color="#0000FF"><%=usertype_name%></font>(<%=zhekouyu%>)<br> 收货方式:<%=rs("sub_psname")%> 附加费用:<%=rs("sub_yunfei")%><br> 折后总计:<%totalcash=checkshui(totalcash*zhekou/100+rs("sub_yunfei"),shuidian,rs("sub_fapiao"))%><span class="price"><%=fuhao%> <%=FormatNum(totalcash)%> <%=danwei%></span> <%if rs("sub_fapiao")=1 then%>(索要发票需要加收<%=shuidian%>%的税点)<%end if%> 获得积分:<%=totaljifen%></p> </td></tr><%end if%> </table> <%rs.close set rs=nothing conn.close set conn=nothing%>