<!--#include file="../Start.asp"-->
<!--#include file="../Include/PowerEasy.Orders.asp"-->
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005－2009 佛山市动易网络科技有限公司 版权所有
'**************************************************************

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>订单查询</title>
<link href="Images/shop.css" rel="stylesheet" type="text/css">
</head>

<body>
<%if trim(request("Action"))<>"Search" then%>
<form name='myform' action='OrderForm.asp' method='post'>
<table width="400" border="0" align="center" cellpadding="5" cellspacing="1" class="border">
  <tr>
    <td colspan="2" align="center" class="title">订单查询</td>
  </tr>
  <tr class="tdbg">
    <td align="right">订单编号：</td>
    <td><input name="OrderFormNum" type="text" id="OrderFormNum" size="20" maxlength="20"></td>
  </tr>
  <tr class="tdbg">
    <td align="right">收货人姓名：</td>
    <td><input name="ContacterName" type="text" id="ContacterName" size="20" maxlength="20"></td>
  </tr>
  <tr class="tdbg">
    <td colspan="2">说明：<br>
    &nbsp;&nbsp;&nbsp;&nbsp;这里只能查询非会员的订单。订单编号和收货人姓名必须完全正确才能找得到。<br>
&nbsp;&nbsp;&nbsp;    如果您是会员，请登录后进入会员控制面板查询自己的订单。</td>
  </tr>
  <tr align="center" class="tdbg">
    <td colspan="2"><input name="Action" type="hidden" id="Action" value="Search">
    <input type="submit" name="Submit" value=" 提交 "></td>
  </tr>
</table>
</form>
<%
Else
    Dim OrderFormNum, ContacterName
    Dim rsOrder, sqlOrder, OrderFormID
    
    OrderFormNum = Trim(Request("OrderFormNum"))
    ContacterName = Trim(Request("ContacterName"))
    If OrderFormNum = "" Then
        FoundErr = True
        Response.Write "<li>请输入订单编号！</li>"
        Response.End
    Else
        OrderFormNum = ReplaceBadChar(OrderFormNum)
    End If
    If ContacterName = "" Then
        FoundErr = True
        Response.Write "<li>请输入收货人姓名！</li>"
        Response.End
    Else
        ContacterName = ReplaceBadChar(ContacterName)
    End If
    
    sqlOrder = "select OrderFormID from PE_OrderForm where UserName='' and OrderFormNum='" & OrderFormNum & "' and ContacterName='" & ContacterName & "'"
    Set rsOrder = Conn.Execute(sqlOrder)
    If rsOrder.BOF And rsOrder.EOF Then
        FoundErr = True
        Response.Write "<li>找不到指定的订单！</li>"
    Else
        Response.Write GetOrderInfo(rsOrder(0), "", False, 0)
    End If
    rsOrder.Close
    Set rsOrder = Nothing
End If
%>
</body>
</html>
<%
Call CloseConn
%>
