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



<title><%=webname%>-最高权限-SQL查询</title>
<%
call logquanxian("a9",1)
On error resume next
%>

<DIV>

<SCRIPT LANGUAGE="JavaScript">
var checkflag1 = "false";
function check1(field) {
if (checkflag1 == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag1 = "true";
return "false"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag1 = "false";
return "true"; }
}

function unselectall1()
{
    if(document.myform.chkAll1.checked){
	document.myform.chkAll1.checked = document.myform.chkAll1.checked&0;
	checkflag1 = "false";
    } 	
}
</script>
<%
link="adminsqldd.asp?ct="
%>
<DIV id=main1200> 
<%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;SQL查询</DIV>
<DIV class=main><br>

<table width="99%" border="0" cellpadding="0" cellspacing="0" class="table_style_a1">
     <form action="" method="post" name="zengsongque" id="zengsongque"> 
       <tr>
        <th colspan="10" align="center" style="font-weight: bold; color: #FF6633">输入订单号       
          <input name="ddname" type="text" id="ddname">
          <input type="submit" name="Submit" value=" 查 询 ">
          <input name="act" type="hidden" id="act" value="cha">        </tr>
       </form>
    </table>
<br>

<%
if SafeRequestform("act")="cha" then ddname=trim(SafeRequestform("ddname"))
if SafeRequest("act")="cha" then ddname=trim(SafeRequest("ddname"))


if ddname="" then 
response.End()
end if

ddku=getddku(ddname)

sql="select * from "&ddku&" where aydingdansum='"&ddname&"' order by aydingdanid desc" 
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
%>
<table width="99%" border="0" cellpadding="0" cellspacing="0" class="table_style_a1">
<%do while not rs.eof%>
       <tr>
	   <td>
	   ayddsuo <%=rs("ayddsuo")%> <span style="color: #FF6600">[锁定 1锁定]</span> <br>
	   aydingdanid <%=rs("aydingdanid")%> [自动编号] <br>
	   aydingdansum <%=rs("aydingdansum")%> [订单号] <br>
	   aydingdanuser <%=rs("aydingdanuser")%> [订单会员id] <br>
	   aydingdanzt <%=rs("aydingdanzt")%> <span style="color: #FF6600">[订单状态 0待付款 1已付款 2支付失败  默认0]</span> <br>
	   ayddzffangshi <%=rs("ayddzffangshi")%> <span style="color: #FF6600">[支付方式 0网银 1充值卡 2支付宝 3财付通 4快捷 99账户余额支付]</span> <br>
	   ayddpid <%=rs("ayddpid")%> <span style="color: #FF6600">[支付通道代码]</span> <br>
	   aydingdansj <%=rs("aydingdansj")%> [订单时间] <br>
	   ayddquantity <%=rs("ayddquantity")%> [购买数量] <br>
	   ayddfeileiid <%=rs("ayddfeileiid")%> [分类ID] <br>
	   ayddshangid <%=rs("ayddshangid")%> [商品ID] <br>
	   apicheng <%=rs("apicheng")%>  [接口利润]<br>
	   isalipayfz <%=rs("isalipayfz")%> [支付宝分账 0否 1是 默认0]<br>
	   alipayfzfei <%=rs("alipayfzfei")%> [分账手续费]<br>
	   ayddsign <%=rs("ayddsign")%>  [sign]<br><br>
       
	   aydingdanjjhao <%=rs("aydingdanjjhao")%> [付款交易号] <br>
	   ayddbody <%=rs("ayddbody")%> <span style="color: #FF6600">[错误描述]</span> <br>
	   <br> [包含卡号ID] <br>
        
<%
					kamiku=getkamikuname(rs("aydingdanuser"))
					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

			
					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
					response.Write "<a href=adminfeika.asp?cact=cha&kamishuju="&kamiku&"&aykaid="&rsk("aykaid")&" target=_blank>"&rsk("aykaid")&"</a>"&","       
					rsk.movenext 
					loop
					end if
					rsk.close
%>
        
        <br><br>
	   aydingdanpass <%=rs("aydingdanpass")%> [提卡密码] <br><br>
       
	   ayddyouhuiquanzhi <%=rs("ayddyouhuiquanzhi")%> [优惠券值] <br>
	   ayddyouhuiquan <%=rs("ayddyouhuiquan")%> [优惠券信息] <br><br>
       
       isptdxdd <%=rs("isptdxdd")%> [是否平台代售订单] <br><br>
       
       

	   aydigndanyf <%=rs("aydigndanyf")%> <span style=" color:#FF0000; font-weight: bold">[应付总价]</span> <br>
	   aydingdanin <%=rs("aydingdanin")%> <span style="color: #FF6600">[商户入帐总价]</span> <br>
	   aydingdanyj <%=rs("aydingdanyj")%> <span style="color: #FF6600">[订单原价]</span> <br>
	   aydingdanjin <%=rs("aydingdanjin")%> <span style="color: #FF6600">[订单单价]</span> <br>
	   aydingdanzj <%=rs("aydingdanzj")%> <span style="color: #FF6600">[订单总价]</span> <br>
	   aydingdancb <%=rs("aydingdancb")%> [成本单价  默认0] <br> <br>

		yongjin <%=rs("yongjin")%> [平台代收 应扣佣金  默认0] <br> <br>

       ayddbuyid <%=rs("ayddbuyid")%>  [买家ID]<br>
	   ayddcontact <%=rs("ayddcontact")%> [联系方式] <br>
	   ayddemail <%=rs("ayddemail")%> [邮箱] <br>
       openid <%=rs("openid")%>  [openid]<br>
       qtgzh <%=rs("qtgzh")%>  [qtgzh]<br>
       msnurl <%=rs("msnurl")%>  [手机短信接收卡密 短网址]<br>
	   aybuyipxx <%=rs("aybuyipxx")%> [购买详细信息]<br>
	   ayddmaijiajin <%=rs("ayddmaijiajin")%> [买家点卡退还金额] <br>
	   ayddmaijiaispay <%=rs("ayddmaijiaispay")%> [是否退还 0否 1是   默认0]  <br><br>


       
       
        ---------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
       dailikuo <%=rs("dailikuo")%>  [代理关系]<br><br>
       <%
	   if rs("dailikuo")<>"" then%>
	   应付总价 <%=rs("aydigndanyf")%> <br>
	   底层代理入帐<%=rs("aydingdanin")%> <br><br>
		  <% dailistr=split(rs("dailikuo"),"|")
		   For dsum=0 To Ubound(dailistr) 
		   		dailiuserstr=split(dailistr(dsum),",") 
		   		'1,21863,40,5896,5729,ayka07,aydingdan,aycaiwu,39.2,40
				'dailiuserstr(0)序号    dailiuserstr(1)上级商品ID     dailiuserstr(2)上级商品代理价格     dailiuserstr(3)本商户ID     dailiuserstr(4)上级代理ID 
				'dailiuserstr(5)上级卡密库     dailiuserstr(6)上级订单库     dailiuserstr(7)上级财务库     dailiuserstr(8)上级代理入款  dailiuserstr(9)统计利润金额
				response.Write "["&dailiuserstr(0)&"]<br>"
				response.Write "上级代理ID "&dailiuserstr(4)&"<br>"
				response.Write "本商户ID "&dailiuserstr(3)&"<br>"
		   		response.Write "上级商品ID "&dailiuserstr(1)&"<br>"
				response.Write "上级商品代理价格 "&ccur(dailiuserstr(2))&"*"&ccur(rs("ayddquantity"))&"="&ccur(dailiuserstr(2))*ccur(rs("ayddquantity"))&"<br>"
				'response.Write "上级卡密库 "&dailiuserstr(5)&"<br>"
				'response.Write "上级订单库 "&dailiuserstr(6)&"<br>"
				'response.Write "上级财务库 "&dailiuserstr(7)&"<br>"
				response.Write "<span style=color:#FF6600>上级代理入款 "&dailiuserstr(8)&"</span><br>"
				response.Write "<span style=color:#FF6600>统计利润金额 "&dailiuserstr(9)&"</span><br><br>"
		   next
	   end if
	   %>
       ---------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><br>
       
       




	   </td></tr>
<%
n=n+1
rs.movenext 
loop
%>
</table>

<%
end if
rs.close

%>




<br>
</DIV>
</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"-->

