<%@ LANGUAGE = VBScript.Encode %>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312" />
<TITLE>打印订单</TITLE>
<link rel="stylesheet" href="Images/Admin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/conn.asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<!--#include file="CheckAdmin.asp"-->
<%
'=====================================
'天天企业网站管理系统  TianTianCMS
'天天网络科技工作室版权所有
'官方客服中心 http://www.ip126.com
'微信公众号 ip126com
'QQ:530051328 mail:bbfhq@163.com
'=====================================
%>
<BODY>
<%
if Instr(session("AdminPurview"),"|18,")=0 then
  response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>您没有管理该模块的权限！</font></div>")
  response.end
end if
dim Result
Result=request.QueryString("Result")
dim ReplyContent,ReplyTime,ID,OrderName,goods,Remark
dim mLinkman,mCompany,mAddress,mZipCode,mTelephone,mFax,mMobile,muserqq,mEmail,mAddTime,MemID,ddhm,cash,zfqr,admincl,Payment,xn,Products_id,Products_num,amount,freight,tax,strMth,annotation

      set rs = server.createobject("adodb.recordset")
      sql="select * from TianTianCMS_Order where ID="&request.QueryString("ID")
      rs.open sql,conn,1,1
	  ddhm=rs("ddhm")
	  OrderName=rs("OrderName")
	  cash=rs("cash")
	  zfqr=rs("zfqr")
	  admincl=rs("admincl")
	  Payment=rs("Payment")
	  goods=ReStrReplace(rs("goods"))
	  Remark=ReStrReplace(rs("Remark"))
	  mLinkman=rs("Linkman")
      MemID=rs("MemID")
	  mCompany=rs("Company")
	  mAddress=rs("Address")
	  mZipCode=rs("ZipCode")
	  mTelephone=rs("Telephone")
	  mFax=rs("Fax")
	  mMobile=rs("Mobile")
	  muserqq=rs("userqq")
	  mEmail=rs("Email")
	  mAddTime=rs("AddTime")
	  ReplyContent=ReStrReplace(rs("ReplyContent"))
	  ReplyTime=rs("ReplyTime")
	  freight=rs("freight")
	  tax=rs("tax")
	  strMth=rs("strMth")
	  annotation=rs("annotation")
	  rs.close
      set rs=nothing
%>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <form name="editForm" method="post" action="OrderEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
    <tr>
      <th height="22" colspan="2">【订单打印操作员:<%response.write session("AdminName")%>】</th>
    </tr>
    <tr>
      <td width="260" class="forumRow">订单号码：<%=ddhm%></td> <td  width="260" class="forumRow">订单总金额：<%=cash%> 元</td><td  width="260" class="forumRow">订购人:<%=Guest(MemID,mLinkman)%></td>
    </tr>
	<tr>
      <td colspan='2' class="forumRow">通信地址：<%=mAddress%></td><td class="forumRow">邮政编码：<%=mZipCode%></td>
    </tr>
	<tr>
      <td colspan='2' class="forumRow">发票抬头：<%=mCompany%></td><td class="forumRow">发货方式：<%=strMth%></td>
    </tr>	<tr>
      <td class="forumRow">联系电话：<%=mTelephone%></td><td class="forumRow">手机号码：<%=mMobile%></td><td class="forumRow">联系QQ：<%=muserqq%></td>
    </tr>
	<tr>
      <td class="forumRow">订购时间：<%=mAddTime%></td><td class="forumRow">打印时间：<%=now()%></td><td class="forumRow">收款状态：<%if zfqr=1 then%>已结款<%else%><font color=red>未结款</font><%End if%></td>
    </tr>

</table>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
    <tr>
      <td class="forumRow">商家<br>注释</td>
      <td class="forumRowHighlight"><%=annotation%></td>
    </tr>
    <tr>
      <td class="forumRow">客户<br>说明</td>
      <td class="forumRowHighlight"><%=Remark%></td>
    </tr>
    <tr>
      <td width="30" class="forumRow">订购<br>产品</td>
      <td class="forumRowHighlight"><%=ReStrReplace(goods)%>运费:<%=freight%>元&nbsp;&nbsp;&nbsp;发票税款:<%=tax%>元&nbsp;&nbsp;&nbsp;订单总金额:<%=cash%>元</td>
    </tr>
    <tr>
      <td  colspan='3' align="CENTER" class="forumRow"><input type="button" name="Submit4" value="打 印" onClick="javascript:window.print()"></td>
    </tr>
</table>
</BODY>
</HTML>
<%function Guest(ID,Linkman)
  Dim rs,sql
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From TianTianCMS_Members where ID="&ID
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
    Guest=Linkman
  else
    Guest="<font color='green'>会员<a href='MemEdit.asp?Result=Modify&ID="&ID&"'>("&rs("MemName")&")</font>|"&Linkman&"</a>"
  end if
  rs.close
  set rs=nothing
end function%>