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

📄 print.asp

📁 wanzhengban 完整版 wanzhengban 完整版
💻 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>"
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 sub where sub_name='"&user_name&"' and sub_id="&request("sub_id")
rs.open sql,conn,1,1
if rs.eof then
    response.write "没有此订单信息"
    rs.close
else
totime=rs("sub_totime")
sub_pay=rs("sub_pay")
sub_ps=rs("sub_ps")
user_name=rs("sub_name")
zt=rs("sub_zt")
sub_number=rs("sub_number")
%><title>订单详情<%=sub_number%></title>
<%Response.ContentType = "application/msword"
response.AddHeader "content-disposition", "inline; filename="&sub_number&".doc"%>
<table border="0" width="550" cellspacing="1" cellpadding="3" bgcolor="#808080"><tr> 
<td bgcolor="#EEEEEE" colspan="5">定单号:<b><%=rs("sub_number")%></b><%sub_number=rs("sub_number")%>
<br>日期:<font color="#808080"><%=rs("sub_date")%></font>&nbsp;&nbsp;
用户名:<%=rs("sub_name")%></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">订单状态:<%if rs("sub_zt")=0 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 "已收货(归档)"%></td></tr>
<tr><td bgcolor="#F0F0F0" colspan="5">订 货 人:<b><%=rs("sub_from")%></b></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">地&nbsp;&nbsp;&nbsp; 址:<%=rs("sub_fromadds")%></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">邮&nbsp;&nbsp;&nbsp; 编:<%=rs("sub_frompost")%></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">邮&nbsp;&nbsp;&nbsp; 箱:<%=rs("sub_frommail")%></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">电&nbsp;&nbsp;&nbsp; 话:<%=rs("sub_fromtel")%></td></tr>
<tr><td bgcolor="#F0F0F0" colspan="5">收 货 人:<b><%=rs("sub_to")%></b></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">收货地址:<b><%=rs("sub_adds")%></b></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">邮&nbsp;&nbsp;&nbsp; 编:<%=rs("sub_post")%></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">邮&nbsp;&nbsp;&nbsp; 箱:<b><%=rs("sub_mail")%></b></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">电&nbsp;&nbsp;&nbsp; 话:<b><%=rs("sub_tel")%></b></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">到货时间:<%set rsp=server.CreateObject("adodb.recordset")
rsp.open "select * from totime where id="&totime&"",conn,1,1
if rsp.eof and rsp.bof then
response.write "没有选择"
else%><%=rsp("totime")%><%
end if
rsp.close
%></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">付款方式:<%rsp.open "select * from pay where pay_id="&sub_pay&"",conn,1,1
if rsp.eof and rsp.bof then
response.write "没有选择"
else%><%=rsp("pay_name")%><%
end if
rsp.close
%></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">送货方式:<%rsp.open "select * from ps where ps_id="&sub_ps&"",conn,1,1
if rsp.eof and rsp.bof then
response.write "没有选择"
else%><%=rsp("ps_name")%><%
end if
rsp.close
%></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">需要发票:<%if rs("sub_fapiao")=1 then%>需要<%else%>不需要<%end if%></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">缺货处理:<%if rs("sub_fapiao")=1 then%>等待到货<%else%>从订单取消<%end if%></td></tr>
<tr><td bgcolor="#FFFFFF" colspan="5">其它说明:<%=rs("sub_other")%></td></tr>
<tr bgcolor="#f0f0f0"><td colspan="5"> <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><td align="center">合计</td></tr>
<%sql="select * from basket where sub_number='"&sub_number&"'"
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"><%=rsp("hw_price")%> 元</td>
  <td bgcolor="#FFFFFF" align="center"><%=rsp("basket_count")%></td>
  <td bgcolor="#FFFFFF" align="center"><%=rsp("kxa")%>&nbsp;<%=rsp("kxb")%></td>
  <td bgcolor="#FFFFFF" align="center"> <%=rsp("hw_price")*rsp("basket_count")%>元</td></tr>
<%totalcash=totalcash+rsp("hw_price")*rsp("basket_count")
totaljifen=totaljifen+rsp("hw_jifen")*rsp("basket_count")
rsp.movenext
loop
rsp.close%>
<tr><td bgcolor="#FFFFFF" colspan="5" align="right"><p style="margin-right: 10px; line-height:150%">
<%sql="select * from [user] where username='"&user_name&"'"
rsp.open sql,conn,1,1
if rsp.eof then
zhekou=100
usertype_name="一般用户"
rsp.close
else
usertype=rsp("user_type")
rsp.close
sql="select * from usertype where usertype_id="&usertype&""
rsp.open sql,conn,1,1
if rsp.eof then
zhekou=100
usertype_name="一般用户"
else
zhekou=rsp("usertype_zhekou")
usertype_name=rsp("usertype_name")
end if
rsp.close
end if
rsp.open "select * from ps where ps_id="&sub_ps&"",conn,1,1
if rsp.eof and rsp.bof then
pei_name="没有选择收货方式"
ps_fei=0
else
ps_name=rsp("ps_name")
ps_fei=rsp("ps_fei")
end if
rsp.close
%><%=usertype_name%>享受折扣<%=zhekou%>% 收货方式:<%=ps_name%> 附加费用:<%=ps_fei%><br>价格总计<%totalcash=totalcash*zhekou/100+ps_fei%><%=totalcash%>元&nbsp; 
积分总计:<%=totaljifen%> 
</td></tr>
<%end if%></table>
<%rs.close
set rs=nothing
conn.close
set conn=nothing
end if%>

⌨️ 快捷键说明

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