<!-- #include file="include/con_shop.asp" -->
<%
tit="订单查询"

call web_head(0,0,0,0,0)
call shop_load(0,0,0)
'----------------------------左边 开始----------------------------
call shop_left()
call shop_left_nsort(0)
'----------------------------左边 结束----------------------------
call web_center(0)
'----------------------------中间 开始----------------------------
call order_search()
if action="search" then 
  call order_search_list()
end if

sub order_search_list()
%>
  <table cellspacing=1 cellpadding=4 class=table>
  <tr align=center>
  <td class=td width='6%'>序号</td>
  <td class=td width='24%'>订 单 号</td>
  <td class=td width='14%'>收货人</td>
  <td class=td width='12%'>订购金额</td>
  <td class=td width='16%'>订购时间</td>
  <td class=td width='12%'>支付方式</td>
  <td class=td width='10%'>支付否</td>
  <td class=td width='6%'>查看</td>
  </tr>
<%
  dim tim,ordernum,sqladd
  keyword=code_search(request.querystring("keyword"))
  sqladd=" where ordernum='"&keyword&"'"
  i=1
  sql="select id,ordernum,nname,tim,prices,ispayment,ispay from shop_orders "&sqladd&" order by id desc"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    ordernum=rs("ordernum")
    tim=rs("tim")
%>
  <tr class=bg_td align=center>
  <td><%response.write i%></td>
  <td align=left><a href='shop_order_view.asp?ordernum=<%response.write ordernum%>'><%response.write ordernum%></a></td>
  <td align=left><%response.write rs("nname")%></td>
  <td align=right><%response.write fm_price(rs("prices"),1)%></td>
  <td><font alt='<%response.write joekoe_cms.time_type(tim,2)%>' class=tims><%response.write joekoe_cms.time_type(tim,3)%></td>
  <td>
<%
    if rs("ispayment") then
      response.write "在线支付"
    else
      response.write "<font class=gray>其它方式</font>"
    end if
%> 
  </td>
  <td>
<%
    if rs("ispay") then
      response.write "<font class=red>已支付</font>"
    else
      response.write "<font class=gray>未支付</font>"
    end if
%>
  </td>
  <td><a href='shop_order_view.asp?ordernum=<%response.write ordernum%>'>详细</a></td>
  </tr>
<%
    i=i+1
    rs.movenext
  loop
  rs.close
%>
  </table>
<%
end sub

response.write ukong
'----------------------------中间 结束----------------------------
call shop_end()
call web_end(0,0)

sub order_search()
  response.write vbcrlf&shop_bar_top("订单搜索",0,1)
  response.write ukong
%>
<table border=0>
<form name=shop_order_sea_frm action='shop_order.asp' method=get onsubmit="javascript:frm_submitonce(this);">
<input type=hidden name=action value='search'>
<tr>
<td><%response.write img_skin("new")%></td>
<td width=5></td>
<td>订单号：</td>
<td width=5></td>
<td><input type=text name=keyword value='请输入订单号' onfocus="if (value =='请输入订单号'){value =''}" onblur="if (value ==''){value='请输入订单号'}" size=15 maxlength=20></td>
<td width=5></td>
<td><input type=submit value='搜索订单'></td>
<td width=20></td>
<td><font class=red2>请输入您在购买时生成的订单号</font></td>
</tr></form></table>
<%  
  response.write vbcrlf&shop_bar_end("",0)
end sub
%>