<!--#include virtual="/show/adminhead.asp"-->
<!--#include file="adminleft.asp"-->
<!--#include virtual="/inc/getip/index.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

 
<BODY>
<title><%=webname%>-最高权限-订单详情</title>
<%
call logquanxian("d1",1)
%>
<DIV>

<DIV id=main1200> 
<%
'买家信息加入黑名单
if SafeRequest("act")="buyhei" then
aybhlx=trim(SafeRequest("aybhlx"))
aybhmail=trim(SafeRequest("aybhmail"))
aybhip=trim(SafeRequest("aybhip"))

sql="select * from aybuyhei" 
rs.open sql,conn,1,3
rs.addnew
if aybhlx<>"" then rs("aybhlx")=aybhlx
if aybhmail<>"" then rs("aybhmail")=aybhmail
if aybhip<>"" then rs("aybhip")=aybhip
rs.update
rs.close
call PopErr("添加成功")
end if

if SafeRequest("act")="suo" then
suoid=SafeRequest("id")
ddku=SafeRequest("ddku")
sql="select ayddsuo,aydingdanid from "&ddku&" where aydingdanid="&suoid&"" 
rs.open sql,conn,1,3
rs("ayddsuo")=1
rs.update
rs.close 
response.Redirect "ik_admindd.asp&ddku="&ddku&""
end if
if SafeRequest("act")="jiesuo" then
suoid=SafeRequest("id")
ddku=SafeRequest("ddku")
sql="select ayddsuo,aydingdanid from "&ddku&" where aydingdanid="&suoid&"" 
rs.open sql,conn,1,3
rs("ayddsuo")=0
rs.update
rs.close 
response.Redirect "ik_admindd.asp&ddku="&ddku&""
end if


id=SafeRequest("id")
act=SafeRequest("act")
ddku=SafeRequest("ddku")



if act="hei" then
ip=trim(SafeRequest("ip"))
sql="select * from ayiph where ayipn='"&ip&"'" 
rs.open sql,conn,1,3
	if rs.bof and rs.eof then
	rs.addnew
	rs("ayipn")=ip 
	rs.update
	call PopErr2("添加成功","adminhei.asp?page="&page)
	else
	call PopErr("已存在")
	end if 
rs.close
end if


if SafeRequest("act")="nobuy" then
uid=SafeRequest("uid")
buyid=SafeRequest("buyid")
if buyid="" then call PopErr("缺少参数")

	sql="select * from ayname where aynameid="&uid&"" 
	rs.open sql,conn,1,3
	if not(rs.bof and rs.eof) then
	
		if trim(rs("nobuyid"))<>"" and isnull(trim(rs("nobuyid")))=false then
		
			if instr(1,trim(rs("nobuyid")),buyid&",")<>0 then
			call PopErr("该买家ID已存在，不能重复操作")
			else
			
			rs("nobuyid")=rs("nobuyid")&buyid&","
			rs.update
			call PopErr("添加成功")
			end if
		
		else
		
		rs("nobuyid")=buyid&","
		rs.update
		call PopErr("添加成功")
		
		end if
	
	end if
	rs.close

end if


if SafeRequest("act")="nobuyall" then

	buyid=request.QueryString("buyid")
	
	sql="select top 1 * from aymaiidhei where aymaiuid="&buyid&"" 
	rs.open sql,conn,1,3
	if not(rs.bof and rs.eof) then
	call PopErr("买家ID已存在")
	rs.close
	response.End()
	else
	rs.addnew
	rs("aymaiuid")=buyid
	rs.update
	rs.close
	call PopErr("添加成功")
	end if

end if


if trim(ddku)="" then call PopErr("订单库获取失败")

if id="" then call PopErr("获取参数错误")


sql="select * from "&ddku&" where aydingdanid="&clng(id)&"" 
rs.open sql,conn,1,1
if rs.bof and rs.eof then
call PopErr("未找到订单")
end if



%>



<%call webleft()%>
<DIV id=main_right>
<DIV id=main_right_content>
<STYLE>.apply_style {
	POSITION: absolute
}
.right_title A {
	LINE-HEIGHT: 27px; WIDTH: 126px; DISPLAY: inline-block; BACKGROUND: url(<%=ossurl%>images/bg22.gif) no-repeat; HEIGHT: 27px
}
.right_title A.current {
	BACKGROUND: url(<%=ossurl%>images/main_right_title_bg.gif) no-repeat; COLOR: #fff; FONT-WEIGHT: bold
}
.table_style_1 TD {
	HEIGHT: 38px
}
.table_style_home_info TD {
	PADDING-BOTTOM: 0px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; HEIGHT: 30px; PADDING-TOP: 0px
}
</STYLE>

<DIV class=right_titleadmin>&nbsp;&nbsp;订单详情</DIV>
<DIV class=main><br>
  <table width="99%" border="0" cellpadding="0" cellspacing="0" class="table_style_a1">

       <tr>
        <th width="26%" align="center" class="border_right border_bottom" >订单号：
        <td width="25%" align="center" class="border_right border_bottom" style="font-size: 14px; color: #FF0000; font-weight: bold" ><%=rs("aydingdansum")%>(<%'if cint(rs("ayddzffangshi"))=0 then response.Write"网银-"
		'if cint(rs("ayddzffangshi"))=1 then response.Write"点卡-"
		'if cint(rs("ayddzffangshi"))=2 then response.Write"支付宝-"
		'if cint(rs("ayddzffangshi"))=3 then response.Write"财付通-"
		'if cint(rs("ayddzffangshi"))=99 then response.Write"账户余额-"
		response.Write trim(rs("ayddpid"))
		%>)
		<%if cint(rs("isalipayfz"))=1 then%><span style="color: #FF6600">[分]</span><%end if%>
		</td>
        
        <th width="29%" align="center" class="border_right border_bottom">订单状态：
        <td width="20%" align="center" class="border_right border_bottom">
							<%
							

									if cint(rs("aydingdanzt"))=0 then response.Write("未付款")
									if cint(rs("aydingdanzt"))=1 then response.Write("<font color=#00CC00>支付成功</font>")
									if cint(rs("aydingdanzt"))=2 then response.Write("<font color=red>支付失败</font>")
									'if cint(rs("aydingdanzt"))=4 then response.Write("<font color=red>卡密不足</font>")

					
                            %>
        <a href="adminmydingdanok.asp?id=<%=trim(rs("aydingdansum"))%>&did=<%=rs("aydingdanid")%>&ddku=<%=ddku%>" target="_blank" style="color:#339900" onClick="javascript:return confirm('重新执行转成功分配卡密吗？');">(重新执行转成功分配卡密)</a></td>                
       </tr>
	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
        <th align="center" class="border_right border_bottom">付款交易号：
        <td align="center" class="border_right border_bottom">
		<%
		if trim(rs("aydingdanjjhao"))<>"" then
		response.Write rs("aydingdanjjhao")
		else
		response.Write("-")
		end if
		%></td>
        <th align="center" class="border_right border_bottom">买家ID：
        <td align="center" class="border_right border_bottom">
							<%if cint(rs("ayddbuyid"))<>0 then
                            response.Write rs("ayddbuyid")&" <a href=?act=nobuy&uid="&rs("aydingdanuser")&"&buyid="&rs("ayddbuyid")&" style=color:#FF6600>[加入商家黑名单]</a> <a href=?act=nobuyall&buyid="&rs("ayddbuyid")&" style=color:#FF6600>[加入全站黑名单]</a>"
                            else
                            response.Write("-")
                            end if
                            %>
		 </td>
        </tr>
	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
	    <th align="center" class="border_right border_bottom">订单单价：      
	    <td align="center" class="border_right border_bottom"><%=Formatnumber(rs("aydingdanjin"),2,true,-1,0)%>元</td>
	    <th align="center" class="border_right border_bottom">订单原价：      
	    <td align="center" class="border_right border_bottom"><%=Formatnumber(rs("aydingdanyj"),2,true,-1,0)%>元</td>
	  </tr>
	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
	    <th align="center" class="border_right border_bottom">订单总价：      
	    <td align="center" class="border_right border_bottom" style="color: #FF0000; font-weight: bold"><%=Formatnumber(rs("aydingdanzj"),2,true,-1,0)%>元</td>
	    <th align="center" class="border_right border_bottom">购买数量：        
	    <td align="center" class="border_right border_bottom"><%=rs("ayddquantity")%>张</td>
	  </tr>
	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
	    <th align="center" class="border_right border_bottom">所属商品：     
	    <td align="center" class="border_right border_bottom">
		<%
		set uku=server.CreateObject("adodb.recordset")
		set rsshang=server.CreateObject("adodb.recordset")
		sqlshang="select aygoodid,aygoodname,aygooddlid,aygoodsuoyouid from aygood where aygoodid="&clng(rs("ayddshangid"))&"" 
		rsshang.open sqlshang,conn,1,1
		if not(rsshang.bof and rsshang.eof) then
			if clng(rsshang("aygooddlid"))<>0 then
			sqlku="select aynameid,kamiku from ayname where aynameid="&clng(rsshang("aygooddlid"))&"" 
			uku.open sqlku,conn,1,1
			kamiku=trim(uku("kamiku"))
			uku.close
			else
			sqlku="select aynameid,kamiku from ayname where aynameid="&clng(rsshang("aygoodsuoyouid"))&"" 
			uku.open sqlku,conn,1,1
			kamiku=trim(uku("kamiku"))
			uku.close
			end if
			if len(trim(rsshang("aygoodname")))>12 then
			response.Write left(rsshang("aygoodname"),12)&"…"
			else
			response.Write rsshang("aygoodname")
			end if
		end if
		rsshang.close
		%>		</td>
	    <th align="center" class="border_right border_bottom">所属分类：        
	    <td align="center" class="border_right border_bottom">
				<%
		set rsfl=server.CreateObject("adodb.recordset")
		sqlfl="select aykafenleiname,aykafenleiid from aykafenlei where aykafenleiid="&clng(rs("ayddfeileiid"))&"" 
		rsfl.open sqlfl,conn,1,1
		if not(rsfl.bof and rsfl.eof) then
		if len(trim(rsfl("aykafenleiname")))>12 then
		response.Write left(rsfl("aykafenleiname"),12)&"…"
		else
		response.Write rsfl("aykafenleiname")
		end if
		end if
		rsfl.close
		%>		</td>
	  </tr>
	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
	    <th align="center" class="border_right border_bottom">订单时间：      
	    <td align="center" class="border_right border_bottom"><%=rs("aydingdansj")%></td>
	    <th align="center" class="border_right border_bottom">包含卡号ID：        
	    <td align="center" class="border_right border_bottom">
		<%
		if kamiku<>"" then
					if trim(rs("dailikuo"))<>"" then
					dailistr=split(trim(rs("dailikuo")),"|")
					dailiuserstr=split(dailistr(Ubound(dailistr)),",")
					sqlk="select aykaid,ayka,aykapass,aykasuoyou,aykasuoyoudd,aykayesno from "&trim(dailiuserstr(5))&" where aykasuoyoudd='"&trim(rs("aydingdansum"))&"' and aykayesno=1" 
					else
					sqlk="select aykaid,ayka,aykapass,aykasuoyou,aykasuoyoudd,aykayesno from "&kamiku&" where aykasuoyoudd='"&trim(rs("aydingdansum"))&"' and aykayesno=1" 
					end if
					
					i=1
					set rsk=server.CreateObject("adodb.recordset")
					rsk.open sqlk,conn,1,1
					if not(rsk.bof and rsk.eof) then
					do while not rsk.eof
					
					if i mod 5<>0 then
					response.Write "<a href=adminfeika.asp?cact=cha&kamishuju="&kamiku&"&aykaid="&rsk("aykaid")&" target=_blank>"&rsk("aykaid")&"</a>"&","       
					else
					response.Write "<a href=adminfeika.asp?cact=cha&kamishuju="&kamiku&"&aykaid="&rsk("aykaid")&" target=_blank>"&rsk("aykaid")&"</a><br>"
					end if
					i=i+1
					rsk.movenext 
					loop
					end if
					rsk.close
		end if
		%> </td>
	  </tr>
	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
	    <th height="19" align="center" class="border_right border_bottom">优惠券：      
	    <td align="center" class="border_right border_bottom">
		<%if trim(rs("ayddyouhuiquan"))<>"" then
		response.Write rs("ayddyouhuiquan")
		else
		response.Write("-")
		end if
		%>		</td>
	    <th align="center" class="border_right border_bottom">优惠幅度：
	    <td align="center" class="border_right border_bottom">
		<%

		if trim(rs("ayddyouhuiquanzhi"))<>"" then
		
		youhuiquanstr=split(trim(rs("ayddyouhuiquanzhi")),"%")
		if Ubound(youhuiquanstr)>0 then
		response.Write rs("ayddyouhuiquanzhi")
		else
		response.Write rs("ayddyouhuiquanzhi")&"元"
		end if
		
		else
		response.Write("-")
		end if
		%></td>
	  </tr>
	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
	    <th height="20" align="center" class="border_right border_bottom">买方信息：      
	    
	    <td colspan="3" align="left" class="border_right border_bottom">
		<%if trim(rs("aybuyipxx"))<>"" then

		diankastr=split(trim(rs("aybuyipxx")),"@")
		response.Write trim(diankastr(0))&" <a href=?act=hei&ip="&trim(diankastr(0))&">[IP加入黑名单]</a> "
			 if cint(rs("ayddsuo"))=0 then%>
			 <a style="color:#FF6600" href="?act=suo&id=<%=rs("aydingdanid")%>&ddku=<%=ddku%>">[锁]</a>		  
			 <%else%>
			 <a style="color:#FF0000" href="?act=jiesuo&id=<%=rs("aydingdanid")%>&ddku=<%=ddku%>">[已锁]</a>
			 <%end if
		response.Write "<br><br>"
		response.Write Look_Ip(trim(diankastr(0)))&"<br>"
 		response.Write "<br>"
		response.Write trim(diankastr(1))
		else
		response.Write("-")
		end if
		%><br><br>
		<a style="color:#F00" href=?act=buyhei&aybhip=<%=trim(diankastr(0))%>&aybhlx=<%=trim(rs("ayddcontact"))%>&aybhmail=<%=trim(rs("ayddemail"))%>>[将买家IP/联系方式/邮箱加入黑名单]</a>
		</td>
	    </tr>
	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
	    <th height="20" align="center" class="border_right border_bottom">来路域名：      
	    
	    <td colspan="3" align="left" class="border_right border_bottom">
		<%=rs("lailuyu")%>
		</td>
	    </tr>
	  
	
    </table>
</DIV>
<%rs.close%>

</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>
<SCRIPT>
$(function(){
$('.left_title').each(function(){
   $(this).click(function(){
	   var index=$('.left_title').index(this);
	   if($(this).next().hasClass('hide_m')){
		   $(this).next().removeClass('hide_m');
           $(this).next().show();		 
		   $(this).find('img').attr('src','<%=ossurl%>images/expansion.gif');
		   $.cookie('m_index_'+index,'',{expires:0});
	   } else {
	       $(this).next().hide();
		   $(this).next().addClass('hide_m');
		   $(this).find('img').attr('src','<%=ossurl%>images/shrank.gif');		   
		   $.cookie('m_index_'+index,'none',{expires:365});
	   }
   })
})

$('.left_title').each(function(){
	var index=$('.left_title').index(this);
    $(this).next().css('display',$.cookie('m_index_'+index) ? $.cookie('m_index_'+index) : '');
	if($.cookie('m_index_'+index)){
	    $(this).next().addClass('hide_m');
	}
	$(this).find('img').attr('src',$.cookie('m_index_'+index) ? '<%=ossurl%>images/shrank.gif' : '<%=ossurl%>images/expansion.gif');
})
})

</SCRIPT>


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

