<!--#include file="conn.asp"--><style>
<!--
body,p,td  { font-size: 11px; color: #000000; font-family:arial; }
-->
</style>
<%
chkid(request("sub_id"))




if Request.Cookies("WrzcNethtml")("user_name")="" and Request.Cookies("WrzcNethtml")("guest")="" then
response.write ""
response.end
elseif Request.Cookies("WrzcNethtml")("user_name")<>"" then
user_name=Request.Cookies("WrzcNethtml")("user_name")
elseif Request.Cookies("WrzcNethtml")("guest")<>"" then
user_name=Request.Cookies("WrzcNethtml")("guest")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from WrzcNethtml_sub where sub_name='"&user_name&"' and sub_id="&request("sub_id")
rs.open sql,conn,1,1
if rs.eof then
response.write "No Data"
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")
sub_yunfei=rs("sub_yunfei")
sub_fapiao=rs("sub_fapiao")
sub_psname=rs("sub_psname")
usertype_name=rs("sub_usertype")
zhekou=rs("sub_zhekou")
if zhekou=100 then
zhekouyu="You Save:0%"
else
zhekouyu="You Save:"&zhekou&"%"
end if
quan_id=rs("quan_id")
quan_cash=rs("quan_cash")
quan_man=rs("quan_man")
quan_no=rs("quan_no")
quan_pass=rs("quan_pass")
fuhao=rs("fuhao")
hui=rs("hui")
danwei=rs("danwei")
bizhong=rs("bizhong")

%><title>Print <%=sub_number%></title>
<style   media=print>     
.Noprint{display:none;}     
</style>     
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">

<center class="Noprint"><input type="button" onclick="window.print();" value="Print"></center>
<table border="1" width="600" cellpadding="3" style="border-collapse: collapse" bordercolor="#000000"><tr> 
<td colspan="5" class="cartshowa">Order Number:<%=rs("sub_number")%><%sub_number=rs("sub_number")%>&nbsp;&nbsp;
Date:<font color="#808080"><%=rs("sub_date")%></font>&nbsp;&nbsp;
UserName:<%=rs("sub_name")%></td></tr>
<tr><td colspan="5" class="cartshow1">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td height="23">State:</td>
<td width="150" height="23"><%if rs("sub_zt")=0 then response.write "Invalid"%>
<%if rs("sub_zt")=1 then response.write "New Order"%>
<%if rs("sub_zt")=-1 then response.write "Waitting payment"%>
<%if rs("sub_zt")=2 then response.write "Payment Already"%>
<%if rs("sub_zt")=3 then response.write "Payment Receipted"%>
<%if rs("sub_zt")=4 then response.write "In Transit"%>
<%if rs("sub_zt")=5 then response.write "Finished"%>
<%i=rs("sub_zt")%></td>
<td height="23">Date:</td>
<td height="23" width="200"><%=rs("sub_date")%></td></tr>
<%if rs("sub_zt0")<>"" and rs("sub_date0")<>"" then%>
<tr><td height="23">Invalidate Time:</td><td width="150" height="23"><%=rs("sub_date0")%></td><td height="23">Description:</td><td height="23" width="200"><%=rs("sub_zt0")%></td></tr>
<%end if%>
<%if rs("sub_zt1")<>"" and rs("sub_date1")<>"" then%>
<tr><td height="23">Verify Time:</td><td width="150" height="23"><%=rs("sub_date1")%></td><td height="23">Description:</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">Pay Time:</td><td width="150" height="23"><%=rs("sub_date2")%></td><td height="23">Description:</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">Receipted Time:</td><td width="150" height="23"><%=rs("sub_date3")%></td><td height="23">Description:</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">Shipping Time:</td><td width="150" height="23"><%=rs("sub_date4")%></td><td height="23">Description:</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">Arrival time:</td><td width="150" height="23"><%=rs("sub_date5")%></td><td height="23">Description:</td><td height="23" width="200"><%=rs("sub_zt5")%></td></tr>
<%end if%>
</table>

</td></tr>
<tr><td colspan="5" class="cartshowa">Name:<b><%=rs("sub_to")%></b></td></tr>
<tr><td colspan="5" class="cartshow1"><table border="0" width="600" cellspacing="0" cellpadding="0" id="table1">
<tr><td height="23" width="65%">Address:<%=rs("sub_adds")%> (<%=rs("sub_city")%>,<%=rs("sub_state")%>,<%=rs("sub_country")%>)</td>
	<td height="23">Postcode:<%=rs("sub_post")%></td></tr>
<tr><td height="23" width="65%">Email:<%=rs("sub_mail")%></td>
	<td height="23">Phone number:<%=rs("sub_tel")%></td></tr>
</table></td></tr>
<tr><td height="20" colspan="5" class="cartshowa">Payment:<%=rs("sub_payname")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Shipping:<%=rs("sub_psname")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Arrival date:<%=rs("sub_totime")%></td></tr>
<tr><td height="20" colspan="5" class="cartshow1"><table border="0" width="600" cellspacing="0" cellpadding="0" id="table1">
<%if fapiao=1 then%>
<tr><td height="20" width="50%">Invoice:<%if rs("sub_fapiao")=1 then%>Yes(Company:<%=rs("sub_taitou")%>)<%else%>No<%end if%></td></tr>
<%end if%>
<tr><td height="20" width="50%">Out of stock:<%if rs("sub_quehuo")=1 then%>Wait<%else%>Delete<%end if%></td></tr>
<tr><td height="20">Message:<%=rs("sub_other")%></td></tr></table></td></tr>
<tr><td colspan="5" class="cartshowa"> <b>Products</b></td></tr>
<tr><td align="center" class="cartshow0">Product</td>
	<td align="center" class="cartshow0">Price</td>
	<td align="center" class="cartshow0">Qty</td>
	<td align="center" class="cartshow0">Type</td>
	<td align="center" class="cartshow0">Total</td>
	</tr>
<%set rsp=server.createobject("adodb.recordset")
sql="select * from WrzcNethtml_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%>
<tr bgcolor="#FFFFFF"><td colspan="5" class="cartshow1" height="20"> <p align="center">No Data</p></td></tr>
<%else
i=0
do while not rsp.eof
i=i+1
%>
<tr><td align="left" class="cartshow<%=i mod 2%>">
	<%=rsp("hw_name")%></td>
  <td align="center" class="cartshow<%=i mod 2%>"><%=fuhao%> <%=FormatNum(rsp("hw_price")*hui)%> <%=danwei%></td>
  <td align="center" class="cartshow<%=i mod 2%>"><%=rsp("basket_count")%></td>
  <td align="center" class="cartshow<%=i mod 2%>"><%=rsp("kxa")%>-<%=rsp("kxb")%></td>
  <td align="center" class="cartshow<%=i mod 2%>"><%=fuhao%> <%=FormatNum(rsp("basket_count")*rsp("hw_price")*hui)%><%=danwei%></td>
  	</tr>
<%totalcash=totalcash+rsp("hw_price")*rsp("basket_count")*hui
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%>

<%if totalcash*zhekou/100>=zp_full and zp_id>0 then
i=i+1%>
<tr><td align="left" class="cartshow<%=i mod 2%>">
	<%=zp_name%></td>
  <td align="center" class="cartshow<%=i mod 2%>"><%=fuhao%> 0 <%=danwei%></td>
  <td align="center" class="cartshow<%=i mod 2%>">1</td>
  <td align="center" class="cartshow<%=i mod 2%>">Gift</td>
  <td align="center" class="cartshow<%=i mod 2%>"><%=fuhao%> 0 <%=danwei%></td>
  	</tr>
<%end if%>
<tr><td colspan="5" align="right" class="cartshow1">
<p style="line-height: 200%; margin-left:5px; margin-right:15px; margin-top:5px; margin-bottom:5px">
Total:<span class="price"><%=totalc%></span>&nbsp;Price:<span class="price"><%=fuhao%><%=FormatNum(totalcash)%><%=danwei%></span>&nbsp;&nbsp;
<%=usertype_name%>(<%=zhekouyu%>)<br>
Shipping:<%=sub_psname%>&nbsp;&nbsp;Shipping Fee:<%=fuhao%><%=sub_yunfei*hui%><%=danwei%><br>
<%if quan_id<>0 and quan_cash<>0 then%>
Discount Voucher(<%=quan_no%>) Save:<%=fuhao%><%=quan_cash*hui%><%=danwei%><br>
<%end if%>

Subtotal:<%totalcash=checkshui(totalcash*zhekou/100+sub_yunfei*hui-quan_cash*hui,shuidian,sub_fapiao)%><span class="price"><%=fuhao%> <%=FormatNum(totalcash)%> <%=danwei%></span>
<%if rs("sub_fapiao")=1 then%>
(Need Invoice Add <%=shuidian%>%)
<%end if%>
&nbsp;&nbsp;
You Score:<%=totaljifen%>
</p>
</td></tr>
<%end if%>
</table>
<%rs.close
set rs=nothing
conn.close
set conn=nothing%>