www.gusucode.com > 运动用品商城网站系统源代码程序 > feyok/ad_create.asp
<!--#include file="conn.asp"--> <!--#include file="ad_chk.asp"--> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <% if Request.Cookies("venshop")("admin_class")<>0 and Request.Cookies("venshop")("admin_class")<>2 then response.write "你没有这个权限!" response.end end if %> <% set rs=server.createobject("adodb.recordset") sql="select * from venshop_sub where 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") sub_psname=rs("sub_psname") sub_yunfei=rs("sub_yunfei") sub_fapiao=rs("sub_fapiao") 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") %> <%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="5" 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="5"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td height="23" width="100">订单状态:</td> <td width="200" 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" width="100">下单时间:</td> <td height="23" width="200"><%=rs("sub_date")%></td></tr> <%if rs("sub_zt1")<>"" and rs("sub_date1")<>"" then%> <tr><td height="23" width="100">处理时间:</td> <td width="200" height="23"><%=rs("sub_date1")%></td> <td height="23" width="100">处理说明:</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" width="100">付款时间:</td><td width="200" height="23"><%=rs("sub_date2")%></td> <td height="23" width="100">付款说明:</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" width="100">收款时间:</td><td width="200" height="23"><%=rs("sub_date3")%></td> <td height="23" width="100">收款说明:</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" width="100">发货时间:</td><td width="200" height="23"><%=rs("sub_date4")%></td> <td height="23" width="100">发货说明:</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" width="100">到货时间:</td><td width="200" height="23"><%=rs("sub_date5")%></td> <td height="23" width="100">到货说明:</td><td height="23" width="200"><%=rs("sub_zt5")%></td></tr> <%end if%> </table> </td></tr> <tr><td bgcolor="#F0F0F0" colspan="5">订 货 人:<b><%=rs("sub_from")%></b></td></tr> <tr><td bgcolor="#FFFFFF" colspan="5"><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="5">收 货 人:<b><%=rs("sub_to")%></b></td></tr> <tr><td bgcolor="#FFFFFF" colspan="5"><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 bgcolor="#F0F0F0" colspan="5">到货时间:<%=rs("sub_totime")%></td></tr> <tr><td bgcolor="#FFFFFF" colspan="5"><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 fapiao=1 then%><%if rs("sub_fapiao")=1 then%>需要(抬头:<%=rs("sub_taitou")%>)<%else%>不需要<%end if%><%else%>不提供<%end if%></td></tr> <tr> <td height="20" bgcolor="#FFFFFF" width="50%" colspan="2">缺货处理:<%if rs("sub_quehuo")=1 then%>等待到货<%else%>从订单取消<%end if%></td></tr> <tr><td height="20" bgcolor="#FFFFFF" colspan="2">其它说明:<%=rs("sub_other")%></td></tr> </table></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> <%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("basket_count")%></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 user_type 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">1</td> <td bgcolor="#FFFFFF" align="center">赠品</td> <td bgcolor="#FFFFFF" align="center"><%=fuhao%> 0 <%=danwei%></td> </tr> <%end if%> <tr><td bgcolor="#FFFFFF" colspan="5" 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> 收货方式:<%=sub_psname%> 附加费用:<%=sub_yunfei%><br> 折后总计:<%totalcash=checkshui(totalcash*zhekou/100+sub_yunfei,shuidian,sub_fapiao)%><span class="price"><%=fuhao%> <%=FormatNum(totalcash)%> <%=danwei%></span><%if sub_fapiao=1 then%>(索要发票需要加收<%=shuidian%>%的税点)<%end if%> 获得积分:<%=totaljifen%> </td></tr><%end if%> </table> <%rs.close set rs=nothing conn.close set conn=nothing%>