<!--#include virtual="/show/indexhead.asp"-->

<%
if iswap="yes" then
wapurl=wapurl&"/chaxunold"
	if getistel="wap" then '手机访问 直接跳转到WAP
	%>
	<SCRIPT LANGUAGE="JavaScript">
    if(confirm("是否使用手机浏览？"))
    {
        var url="<%=wapurl%>";
         if(document.all)
         {
             var gotoLink = document.createElement('a');
             gotoLink .href = url;
             document.body.appendChild(gotoLink);
             gotoLink .click();
         }
         else 
         {
         window.location.href = url;
         }
    }
    </script>
	<%
	end if
	
end if

 
set rs2=server.CreateObject("adodb.recordset")

if SafeRequest("act")<>"" then act=SafeRequest("act")
if SafeRequestform("act")<>"" then act=SafeRequestform("act")

if SafeRequest("con")<>"" then con=SafeRequest("con")
if SafeRequestform("con")<>"" then con=SafeRequestform("con")

if SafeRequest("ka")<>"" then ka=SafeRequest("ka")



if act="qing" then
response.Cookies("ikpayddh")=""
response.Redirect "/chaxunold"
end if

%>


<SCRIPT LANGUAGE="JavaScript">
var xmlhttp;try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e){try{xmlhttp=new XMLHttpRequest();}catch (e){}}}

function chaka(dsum)
{
//alert(str);
huoqukami.innerHTML="获取中<img src='<%=ossurl%>images/jload.gif'/>";

	xmlhttp.open("get","/inc/tika/?id="+dsum+"&act=tika");
	xmlhttp.onreadystatechange=function()
	{	
		if(200==xmlhttp.status)
		{
			if(xmlhttp.responseText=="ok"){	window.document.location.href="/tika?ka="+dsum+"";}
			if(xmlhttp.responseText=="buzu"){huoqukami.innerHTML="卡密不足，联系商户补卡";}
			if(xmlhttp.responseText=="err1"){huoqukami.innerHTML="订单状态错误";}
			if(xmlhttp.responseText=="err2"){huoqukami.innerHTML="订单备注错误";}
			if(xmlhttp.responseText=="err3"){window.document.location.href="/tikaold?ka="+dsum+"";} 
		}
	};
	xmlhttp.send(null);
}
</script>




<div class="mian">
<div class="regbox conter">

<div class="nyclassbt01 conter">查询<%=maichukazhuanyi%>天以上订单 <span style="font-size:14px;"><a href="chaxun">(查询最近订单)</a></span></div>

<form name="search" method="post" action="/chaxunold">
<div class="buyform conter">
<div class="left" style="padding-left:260px; font-size:20px;">联系方式或订单号　<input name="con" id="con" type="text" class="inputkcha" onClick="this.value=''" maxlength="30" 
value=<%
if ka<>"" then response.Write server.HTMLEncode(trim(ka))   
if con<>"" then response.Write server.HTMLEncode(trim(con))
%>></div>
<input style="cursor:pointer;" class="shier_chaxun"  type="submit" name="Submit" id="tijiao" value="立即查询" />
<input name="act" type="hidden" id="act" value="cha" />
</div>
</form>


<%
if act="cha" or ka<>"" or con<>"" then
ddhstr=""
isformka="no" '是否为直接订单号查询

	if ka<>"" then	
		isformka="yes"
		ddku=getddku(ka)
		sql="select * from "&ddku&" where aydingdansum='"&trim(UCase(ka))&"'" 
	end if


	if isformka="no" then
		if trim(con)="" or  trim(con)="输入订单号或联系方式" then call PopErr("请输入查询内容")
		if mid(trim(UCase(con)),1,1)="D" and len(trim(con))=18 then
		isformka="yes"
		ddku=getddku(con)
		sql="select * from "&ddku&" where aydingdansum='"&trim(con)&"'" 
		end if
	end if



	if isformka="no" then '联系方式	查询
		
		sql2="select top 15 aylxcon,aylogdate,aydddsum from aybuylxold where aylxcon='"&trim(con)&"' order by aylogdate desc"
		rs2.open sql2,conn,1,1
		if not(rs2.bof and rs2.eof) then
		do while not(rs2.eof) 
		ddhstr=ddhstr&trim(rs2("aydddsum"))&","
		rs2.movenext
		loop
		else
		call PopErr("未找到查询内容")
		end if
		rs2.close
						
		if ddhstr<>"" then 
		ddhstr=mid(ddhstr,1,len(ddhstr)-1)
		end if
		
	end if
	

'SQL结束***************************************************************************************************************
%>	

<table border="0" align="center" cellpadding="0" cellspacing="0" class="table_style_a2">
<tr>
<th height="60" align="center" class="border_right border_bottom" >订单编号
<th align="center" class="border_bottom border_right">金额
<th align="center" class="border_right border_bottom">商品名称
<th width="150" align="center" class="border_bottom border_right">创建时间   
<th align="center" class="border_bottom border_right"><span style="color:#F60">联系商家</span>
<th align="center" class="border_bottom"><span style="color:#F60">订单状态</span>       
</tr> 

<%
zong=0
if isformka="no" then
	aykustr=split(ddhstr,",")
	zong=Ubound(aykustr)
	if zong<0 then zong=0
end if



		For sum=0 To zong
		if isformka="no" then sql="select * from "&getddku(trim(aykustr(sum)))&" where aydingdansum='"&trim(aykustr(sum))&"'" 
		
		rs.open sql,conn,1,1
		if not(rs.bof and rs.eof) then
		if ccur(DateDiff("d",rs("aydingdansj"),now()))>ccur(maichukazhuanyi) then
		'do while not rs.eof

			'获取商品名称
			lxqq=""
			rs2.open "select aygoodid,aygoodname,ayshqq from aygood where aygoodid="&clng(rs("ayddshangid"))&"" ,conn,1,1
			if not(rs2.eof) then
			sname=trim(rs2("aygoodname"))
			if trim(rs2("ayshqq"))<>"0" then lxqq=trim(rs2("ayshqq"))
			end if
			rs2.close
			'获取分类qq
			if lxqq="" then
				rs2.open "select aykafenleiid,aykafenleiqq from aykafenlei where aykafenleiid="&clng(rs("ayddfeileiid"))&"" ,conn,1,1
				if not(rs2.eof) then
				if trim(rs2("aykafenleiqq"))<>"0" then lxqq=trim(rs2("aykafenleiqq"))
				end if
				rs2.close
			end if
			'获取商户qq
			
			rs2.open "select ayqq,ayweixinid,aynameid from ayname where aynameid="&clng(rs("aydingdanuser"))&"" ,conn,1,1
			if not(rs2.eof) then
			if lxqq="" then lxqq=trim(rs2("ayqq"))
			ayweixinid=trim(rs2("ayweixinid"))
			end if
			rs2.close

			
			%>
			<tr>
			<td align="center" class="border_right border_bottom" ><%=rs("aydingdansum")%><td align="center" class="border_bottom border_right"><%=Formatnumber(rs("aydingdanzj"),2,true,-1,0)%>元</td>
			<td align="center" class="border_right border_bottom"><%if len(trim(sname))>16 then	response.Write "<span title="&trim(sname)&">"&left(sname,16)&" ··</span>":else:response.Write sname end if%></td>
			<td align="center" class="border_bottom border_right"><%=rs("aydingdansj")%></td>
			<td align="center" class="border_bottom border_right" style="color:#F60"><a style="color:#F60" href="http://wpa.qq.com/msgrd?V=1&Uin=<%=lxqq%>&Site=联系商家&Menu=yes" title="联系商家,请先加好友" target="_blank">QQ:<%=lxqq%></a><%if ayweixinid<>"" then response.Write " 微信:"&ayweixinid&""%></td>
			<td align="center" class="border_bottom">
			<%
				'未支付
				if cint(rs("aydingdanzt"))=0 then
					if cint(rs("ayddzffangshi"))=1 then%>
                	<a href=/chaxunold?ka=<%=trim(rs("aydingdansum"))%> style='color: #339900'>[刷新]</a><a href="/pay_card?id=<%=trim(rs("aydingdansum"))%>" style="color: #FF0000;">[继续支付]</a>
                    <%else
                    response.Write("未付款 <a href=/chaxunold?ka="&trim(rs("aydingdansum"))&" style='color: #339900'>[刷新]</a> ")
                	end if
				end if
			
				'支付状态
				if cint(rs("aydingdanzt"))=1 then 
					'if isnull(trim(rs("aydingdanka"))) or trim(rs("aydingdanka"))="" then%>
					<!-- <span id="huoqukami" style="color: #00CC00;font-weight:bold;font-size:14px;cursor:pointer;" onClick="chaka('<%'=trim(rs("aydingdansum"))%>')">[提取卡密]</span> -->
					<%'else
					response.Write"<img src="&ossurl&"images/s02.gif><a href=/tikaold?ka="&rs("aydingdansum")&" style='color: #00CC00;font-weight:bold;font-size:14px'>[提取卡密]</a>"
					'end if
				end if
				
				if cint(rs("aydingdanzt"))=4 then 
				response.Write "<font color=red>已付款,卡密不足<br>联系商户补卡或联系平台客服退款</font>"
				end if
			%>
			</td>
			</tr>

				  
		<%
		end if
		'rs.movenext
		'loop%>
		
		<%
		'else
		'call PopErr2("未找到该查询信息","/chaxunold")
		end if
		rs.close
		
		next

end if
%>
</table>


<br><br><br>
<div class="nyclassbt01 conter">浏览器缓存 <a href="?act=qing" style="color:#F63">[清除缓存]</a></div>

<table border="0" align="center" cellpadding="0" cellspacing="0" class="table_style_a2">
<tr>
<th height="60" align="center" class="border_right border_bottom" >订单编号
<th align="center" class="border_bottom border_right">金额
<th align="center" class="border_right border_bottom">商品名称
<th width="150" align="center" class="border_bottom border_right">创建时间   
<th align="center" class="border_bottom border_right"><span style="color:#F60">联系商家</span>
<th align="center" class="border_bottom"><span style="color:#F60">订单状态</span>       
</tr> 

<%
	czong=0
	caykustr=request.Cookies("ikpayddh")
	call Safestr(caykustr)
	
	if caykustr<>"" then
	caykustr=mid(caykustr,1,len(caykustr)-1)
	caykustr=split(request.Cookies("ikpayddh"),"|")
	czong=Ubound(caykustr)

	
				For csum=0 To czong-1
				
				cddh=split(caykustr(csum),"&")		'cddh(0)服务器标示 A  B    cddh(1) 订单号
		
				sql="select * from "&getddku(cddh(1))&" where aydingdansum='"&cddh(1)&"'" 
				
				rs.open sql,conn,1,1
				if not(rs.bof and rs.eof) then
				'do while not rs.eof
				
					'获取商品名称
					lxqq=""
					rs2.open "select aygoodid,aygoodname,ayshqq from aygood where aygoodid="&clng(rs("ayddshangid"))&"" ,conn,1,1
					if not(rs2.eof) then
					sname=trim(rs2("aygoodname"))
					if trim(rs2("ayshqq"))<>"0" then lxqq=trim(rs2("ayshqq"))
					end if
					rs2.close
					'获取分类qq
					if lxqq="" then
						rs2.open "select aykafenleiid,aykafenleiqq from aykafenlei where aykafenleiid="&clng(rs("ayddfeileiid"))&"" ,conn,1,1
						if not(rs2.eof) then
						if trim(rs2("aykafenleiqq"))<>"0" then lxqq=trim(rs2("aykafenleiqq"))
						end if
						rs2.close
					end if
					'获取商户qq
					
					rs2.open "select ayqq,ayweixinid,aynameid from ayname where aynameid="&clng(rs("aydingdanuser"))&"" ,conn,1,1
					if not(rs2.eof) then
					if lxqq="" then lxqq=trim(rs2("ayqq"))
					ayweixinid=trim(rs2("ayweixinid"))
					end if
					rs2.close
	
					
					%>
					<tr>
					<td align="center" class="border_right border_bottom" ><%=rs("aydingdansum")%><td align="center" class="border_bottom border_right"><%=Formatnumber(rs("aydingdanzj"),2,true,-1,0)%>元</td>
					<td align="center" class="border_right border_bottom"><%if len(trim(sname))>16 then	response.Write "<span title="&trim(sname)&">"&left(sname,16)&" ··</span>":else:response.Write sname end if%></td>
					<td align="center" class="border_bottom border_right"><%=rs("aydingdansj")%></td>
					<td align="center" class="border_bottom border_right" style="color:#F60"><a style="color:#F60" href="http://wpa.qq.com/msgrd?V=1&Uin=<%=lxqq%>&Site=联系商家&Menu=yes" title="联系商家,请先加好友" target="_blank">QQ:<%=lxqq%></a><%if ayweixinid<>"" then response.Write " 微信:"&ayweixinid&""%></td>
					<td align="center" class="border_bottom">
					<%

						'未支付
						if cint(rs("aydingdanzt"))=0 then
							if cint(rs("ayddzffangshi"))=1 then%>
							<a href=/chaxunold?ka=<%=trim(rs("aydingdansum"))%> style='color: #339900'>[刷新]</a><a href="/pay_card?id=<%=trim(rs("aydingdansum"))%>" style="color: #FF0000;">[继续支付]</a>
							<%else
							response.Write("未付款 <a href=/chaxunold?ka="&trim(rs("aydingdansum"))&" style='color: #339900'>[刷新]</a> ")
							end if
						end if
					
						'支付状态
						if cint(rs("aydingdanzt"))=1 then 
							'if isnull(trim(rs("aydingdanka"))) or trim(rs("aydingdanka"))="" then%>
							<!-- <span id="huoqukami" style="color: #00CC00;font-weight:bold;font-size:14px;cursor:pointer;" onClick="chaka('<%'=trim(rs("aydingdansum"))%>')">[提取卡密]</span> -->
					  	<%	'else
							response.Write"<img src="&ossurl&"images/s02.gif><a href=/tikaold?ka="&rs("aydingdansum")&" style='color: #00CC00;font-weight:bold;font-size:14px'>[提取卡密]</a>"
							'end if
						end if
						
						if cint(rs("aydingdanzt"))=4 then 
						response.Write "<font color=red>[支付成功,卡密不足,联系商户补卡]</font>"
						end if

					%>
					</td>
					</tr>
					
						  
	  <%
				end if
				rs.close
				
				next
				
	end if		


%>
</table>


<br><br>
<div class="mzsmbox conter">
<strong>免责声明：</strong><br>
向陌生人付款，请注意交易风险，否则造成的经济损失自负！选择平台VIP会员的商家安全会更高！<br>
本站仅是提供自动发卡服务，并非销售商，相关售后问题并不负责，由此产生的交易纠纷由双方自行处理，与本平台无关！<br>
如果订单支付成功，请提取卡密。如果您在提卡后有使用问题，请联系商家！<br><br>
<strong>关于投诉：</strong><br>
订单投诉时效为24小时，付款后出现任何问题请在24小时内进行投诉，超过24小时的订单将不再受理投诉问题！ <a style="color:#956825" href="/tousu" target="_blank">【我要投诉】</a>
</div>

<br>

</div>

<div class="clearit"></div>
<div class="gsysbox" style="margin-top:0">
<div class="gsys conter">
<div class="gsysnr left"><img src="<%=ossurl%>Template/Template5/images/tb1.jpg" width="60" height="60">　寄售平台</div>
<div class="gsysnr left"><img src="<%=ossurl%>Template/Template5/images/tb2.jpg" width="60" height="60">　专属服务</div>
<div class="gsysnr left"><img src="<%=ossurl%>Template/Template5/images/tb3.jpg" width="60" height="60">　安全保障 </div>
<div class="gsysnr left"><img src="<%=ossurl%>Template/Template5/images/tb4.jpg" width="60" height="60">　踏实放心 </div>
</div>
</div>

</div>


<!--#include virtual="/show/indexfoot.asp"-->