<!--#include virtual="/inc/conn.asp"-->
<!--#include virtual="/inc/chkuser.asp"-->
<%


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

'加急提现
jiajisum=0
For sum=0 To 5 '订单库数量  总数量-1 如增加库 需修改updata\tongji下的相应文件  case "A"
if sum=0 then cwku="aycaiwu"
if sum=1 then cwku="aycaiwu01"
if sum=2 then cwku="aycaiwu02"
if sum=3 then cwku="aycaiwu03"
if sum=4 then cwku="aycaiwu04"
if sum=5 then cwku="aycaiwu05"

	rs.open "select top 30 aycaiwuleibie,aycaiwutxcl,aytxjj,aycaiwuuser from "&cwku&" where aytxjj=1 and aycaiwuleibie=9 and (aycaiwutxcl=0 or aycaiwutxcl=2)",conn,1,1
	if not(rs.bof and rs.eof) then
	
		do while not rs.eof

			rs2.open "select aynameid,ayusersuo,ayisjssuo from ayname where aynameid="&rs("aycaiwuuser")&" and ayusersuo=0 and ayisjssuo=0" ,conn,1,1
			if not(rs2.bof and rs2.eof) then
			jiajisum=1
			end if
			rs2.close

		rs.movenext 
		loop

	end if
	rs.close

	if jiajisum<>0 then exit for
next
response.Write jiajisum
response.Write"|"


'秒结算
miaojiesum=0
For sum=0 To 5 '订单库数量  总数量-1 如增加库 需修改updata\tongji下的相应文件  case "A"
if sum=0 then cwku="aycaiwu"
if sum=1 then cwku="aycaiwu01"
if sum=2 then cwku="aycaiwu02"
if sum=3 then cwku="aycaiwu03"
if sum=4 then cwku="aycaiwu04"
if sum=5 then cwku="aycaiwu05"

	rs.open "select top 1 * from "&cwku&" where isalipayfz=1 and (aycaiwuleibie=0 or aycaiwuleibie=17) and aycaiwuzt=1 and aycaiwuisjs=0 order by aycaiwudate desc",conn,1,1
	if not(rs.bof and rs.eof) then
	miaojiesum=1
	end if
	rs.close
	if miaojiesum<>0 then exit for
next
response.Write miaojiesum
response.Write"|"



'投诉
toususum=0
rs.open "select top 1 ayjubaosjid,ayjubaozt,ayjuzt from ayjubao where ayjubaosjid=0 and ayjubaozt=0 and (ayjuzt=0 or jubaoisnew=1)" ,conn,1,1
if not(rs.bof and rs.eof) then
'do while not rs.eof
toususum=1
'rs.movenext 
'loop
end if
rs.close
response.Write toususum
response.Write"|"

'爱卡微信
weixinsum=0
rs.open "select top 1 * from ayweixin where aywxsid=0 and aywxishf=0",conn,1,1
if not(rs.eof) then 
weixinsum=1
end if
rs.close
response.Write weixinsum
response.Write"|"

'翘逸微信
weixin2sum=0
response.Write weixin2sum
response.Write"|"

'工单
gongdansum=0
rs.open "select top 1 aygdid,aygdisnew,aygdshangid from aygongdan where aygdisnew=0 and aygdshangid=0" ,conn,1,1
if not(rs.bof and rs.eof) then
'do while not rs.eof
gongdansum=1
'rs.movenext 
'loop
end if
rs.close
response.Write gongdansum 
response.Write"|"

'发信系统检测
faxin=0
rs.open "select top 5 mzt from mailto where mzt=0" ,conn,1,1
if not(rs.bof and rs.eof) then
	if rs.RecordCount=5 then
	faxin=1
	end if
end if
rs.close
response.Write faxin
%>