<%temp_search_customer_order_list_show=site.object_p%>
<!-- object[<%=site.object_p%>]::temp_search_customer_order_list_show -->
<%
'游客查询 订单号*
'其它用户查询 用户自己的订单*
dim mode
dim sort_id
dim porperty_name
dim porperty_value
dim i
dim ok_check
'///////////////////////////////////////////////////是否有订单号
if site.temp.customer.info.reg_name = "guest" then 
	ok_check=0
	property_name=request("property_public_name")
	property_value=request("property_public_value")
	if property_name="" or property_value="" then
		site.Error.info="请输入您的订单号！"
		site.Error.location="back"
		site.Error.err()
	else
		property_name=split(property_name,"|")
		property_value=split(property_value,"|")
		for i=0 to ubound(property_name)
			if property_name(i)="mark" and property_value(i)<>"" then
				ok_check=1
				exit for
			end if
		next
	end if
	
	If ok_check=0 Then
		site.Error.info="请输入您的订单号！"
		site.Error.location="back"
		site.Error.err()
	end if
	
end if
'////////////////////////////////////////////////////

mode=request("mode")
sort_id=request("sort_id")
if sort_id="" then sort_id=0
if mode="" then mode="sort"
'///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////查询！！
if mode="sort" then
site.Error.info="您不能以这种方式查询订单！"
site.Error.location="back"
site.Error.err()
end if

if mode="property" then

	site.temp.search.property("customer_order")
	 '导航栏内容
	select_content=site.temp.search.select_content
	if site.temp.customer.info.reg_name <> "guest"  then
		if instr(select_content,"order by")=0 then
		    select_content=select_content+" and customer_name='"&site.temp.customer.info.reg_name&"'"
		else
		    select_content=replace(select_content,"order by"," and customer_name='"&site.temp.customer.info.reg_name&"' order by ")
		end if
	end if

end if
'################################################################################################################################################################
'结果分页显示

dim n_pages,n_all,n_pepage,n_page,c

n_pepage=site.object(site.object_p).qu
n_page=int(request("n_page"))
if n_page=0 then n_page=1

c_order="下订单日期$customer_order_addtime|订单金额$customer_order_money|订单种类$customer_order_kind|订单状态$customer_order_stat,升序$|降序$desc"

c="<table align=center cellpadding='0' cellspacing='0' width='98%' height='20'"&site.object(site.object_p).style&">"
c=c+"	<tr >"
c=c+"	  <td width='90%' align=left colspan=10 background='"&site.object(site.object_p).image&"/dot03.gif' height='1' ></td>"
c=c+"	</tr>"
c=c+"	<tr>"
c=c+"		<td height='30' width='15' align=right>"
c=c+"		<img border='0' src='"&site.object(site.object_p).image&"/dotblue.gif'></td>"
c=c+"		<td height='30' width='22%' style='padding-left:0'><a target=_blank href='temp.asp?tr=customer|order|detail&mark=$$customer_order_mark_children$$'>$$customer_order_mark$$</a></font></td>"
c=c+"		<td height='30' width='25%'>$$customer_order_addtime$$</td>"
c=c+"		<td height='30' width='17%'>$$customer_order_stat_description$$</td>"
c=c+"		<td height='30' width='19%'>$$customer_order_kind$$</td>"
c=c+"		<td height='30' width='13%'><font color=red>"&site.info.unit_money(1)&" $$customer_order_money$$ </font></td>"
c=c+"	</tr>"
c=c+"</table>"

c_h="<table align=center cellpadding='0' cellspacing='0' width='98%' bgcolor=#fafafa height='20'"&site.object(site.object_p).style&">"
c_h=c_h+"	<tr >"
c_h=c_h+"	  <td width='90%' align=left colspan=10 background='"&site.object(site.object_p).image&"/dot03.gif' height='1' ></td>"
c_h=c_h+"	</tr>"
c_h=c_h+"	<tr>"
c_h=c_h+"		<td height='30' width='15' align=right><img border='0' src='"&site.object(site.object_p).image&"/dotorange.gif'></td>"
c_h=c_h+"		<td height='30' width='22%' style='padding-left:0'>订单号</td>"
c_h=c_h+"		<td height='30' width='25%'>下定单日期</td>"
c_h=c_h+"		<td height='30' width='17%'>订单状态</td>"
c_h=c_h+"		<td height='30' width='19%'>订单种类</td>"
c_h=c_h+"		<td height='30' width='13%'>订单金额</td>"
c_h=c_h+"	</tr>"
c_h=c_h+"</table>"

'------------显示函数
dim ar_send(5)

ar_send(0)=n_pepage
ar_send(1)=n_page
ar_send(2)=select_content
ar_send(3)=c_order
ar_send(4)=c_h
ar_send(5)=c

n_pages=site.functions.thing_list(ar_send)
'-----------显示函数
site.temp.url_request=replace(site.temp.url_request,"&n_page="&request("n_page"),"")

response.write "<br>"
response.write "<table border='0' width='95%' cellspacing='1' cellpadding='0'"&site.object(site.object_p).style&">"
response.write "<tr>"
response.write "<td align='center' >"
response.write "<a href='"&site.temp.file_request&"?"&site.temp.url_request&"&n_page=1'><img align='absmiddle' border='0' src='"&site.object(site.object_p).image&"/btn_pre.gif' width='19' height='21' alt='第一页'></a>"
if n_page>1 then  response.write "<a href='"&site.temp.file_request&"?"&site.temp.url_request&"&n_page="&n_page-1&"'><img align='absmiddle'  border='0' src='"&site.object(site.object_p).image&"/btn_pre2.gif' width='47' height='21' alt='上一页'></a> "
response.write "一共有"&n_pages&"页&nbsp; 现在是第"&n_page&"页"

for num_page_show=1 to n_pages
response.write "[<a href='"&site.temp.file_request&"?"&site.temp.url_request&"&n_page="&num_page_show&"'>"&num_page_show&"</a>] "
next

if n_page<n_pages then  response.write "<a href='"&site.temp.file_request&"?"&site.temp.url_request&"&n_page="&n_page+1&"'><img align='absmiddle'  border='0' src='"&site.object(site.object_p).image&"/btn_next2.gif' width='46' height='21' alt='下一页'></a>"
response.write "<a href='"&site.temp.file_request&"?"&site.temp.url_request&"&n_page="&n_pages&"'><img align='absmiddle'  border='0' src='"&site.object(site.object_p).image&"/btn_next.gif' width='18' height='21' alt='最后一页'></a></td>"
response.write "</tr>"
response.write "</table>"

'结果分页显示结束
'################################################################################################################################################################
%>