62,266
社区成员
发帖
与我相关
我的任务
分享<%
Function App_QingLing_Man'AEDKX
Conn.Execute("Update [member] Set FatherID=0,FatherName=0,pLevel=0,pPath=null,ispay=0,AgentCash=0,glf=0,jingli=0 where id>1 ")
Conn.Execute("Update [member] Set xxx2=0,xxx3=0,cc=0,sanci=0,yf=0,opp=0,xx2=0,xx3=0,bb=0,hlj=0,b_pPath=null")
conn.Execute("Delete From [history]")
conn.Execute("Delete From ZHUANJ")
conn.Execute("Delete From CHONGZHI")
conn.Execute("Delete From TIQU")
conn.Execute("Delete From Gee_Time")
conn.Execute("Delete From Gee_Bonus")
End Function
Function App_New_Man'AEDKX
App_DuTime=date()
App_FTime1="2009-3-1 23:59:59"
if conn.execute("select count(0) from [Gee_Time] ")(0)=0 then
conn.Execute("Insert Into [Gee_Time] (ShangQi,benqi,isCountB) Values ('"&App_DuTime&"','"&App_FTime1&"',1)")
end if
App_FTime=conn.execute("select top 1 ShangQi from [Gee_Time] order by id desc ")(0)
if isnull(App_FTime) then App_FTime="2009-3-1 23:59:59"
if not isdate(App_FTime) then App_FTime="2009-3-1 23:59:59"
App_DeTime=DateDiff("d",App_FTime,App_DuTime)
if App_DeTime>=1 then
conn.Execute("Insert Into [Gee_Time] (ShangQi,benqi,isCountB) Values ('"&App_DuTime&"','"&App_FTime&"',1)")
End If
App_FTime_G=conn.execute("select JDT2 from [Gee_Fee] ")(0)
if isnull(App_FTime_G) then App_FTime_G="2009-3-1 23:59:59"
if not isdate(App_FTime_G) then App_FTime_G="2009-3-1 23:59:59"
App_DeTime_H=DateDiff("d",App_FTime,App_FTime_G)
Ap_DeTime_S1=App_Feric(10914)
if App_DeTime>=int(Ap_DeTime_S1) then
Conn.Execute("Update [member] Set zls=0,lsj=0 ")
conn.Execute("Update [Gee_Fee] Set JDT2='"&App_FTime&"'")
End If
End Function
Function App_Feric(Ap_DeID)
if not isnumeric(Ap_DeID) then
App_Feric="0"
end if
if conn.execute("select count(0) from [Ap_Manage] where Ap_Class="&Ap_DeID&"")(0)>0 then
Ap_Type=conn.execute("select Ap_Type from [Ap_Manage] where Ap_Class="&Ap_DeID&" order by id desc")(0)
if Ap_Type=0 then
Ap_Num=conn.execute("select Ap_Men from [Ap_Manage] where Ap_Class="&Ap_DeID&" order by id desc")(0)
else
Ap_Num=conn.execute("select Ap_Mon from [Ap_Manage] where Ap_Class="&Ap_DeID&" order by id desc")(0)
end if
end if
if isnull(Ap_Num) then
App_Feric="0"
end if
App_Feric=Ap_Num
End Function
Function Ap_XinYun_Jexks(UID)
Ap_FangAn_A1=10210
Ap_FangAn_G1=App_Feric(Ap_FangAn_A1)
Ap_FangAn_G1=int(Ap_FangAn_G1)
if Ap_FangAn_G1=0 then Ap_XinYun_Jexks2 UID
if Ap_FangAn_G1=1 then Ap_XinYun_Jexks1 UID
End Function
Function Ap_XinYun_Jexks1(UID)
ppath=conn.execute("select ppath from member where id="&UID)(0)
repath=conn.execute("select repath from member where id="&UID)(0)
Ap_A1=10202
Ap_A2=10203
Ap_A3=10204
Ap_XinYun_G1=App_Feric(Ap_A1)
Ap_XinYun_G2=App_Feric(Ap_A2)
Ap_XinYun_G3=App_Feric(Ap_A3)
if not isnull(Ap_XinYun_G1) and not isnull(Ap_XinYun_G2) and not isnull(Ap_XinYun_G3) then
if repath<>"" then repath=left(repath,len(repath)-1)
if repath<>"" then repath=right(repath,len(repath)-1)
if repath<>"" then
SQLc="select top "&Ap_XinYun_G2&" pPath,id from member where id in ("&repath&") order by relevel desc"
set rsc=server.CreateObject("adodb.recordset")
rsc.open SQLc,conn,1,1
while not rsc.eof
Ap_XinYun_repath1=rsc("pPath")
if Ap_XinYun_repath1<>"" then Ap_XinYun_repath1=left(Ap_XinYun_repath1,len(Ap_XinYun_repath1)-1)
if Ap_XinYun_repath1<>"" then Ap_XinYun_repath1=right(Ap_XinYun_repath1,len(Ap_XinYun_repath1)-1)
if Ap_XinYun_repath1<>"" then
Ap_SQLc="select top "&Ap_XinYun_G1&" B_pPath,id from member where id in ("&Ap_XinYun_repath1&") order by plevel desc"
set Ap_rsc=server.CreateObject("adodb.recordset")
Ap_rsc.open Ap_SQLc,conn,1,1
while not Ap_rsc.eof
if conn.execute("select count(0) from member where B_pPath like '%,"&Uid&",%' and id="&Ap_rsc("id")&"")(0)=0 then
Ap_XinYun_pPath1=Replace(Replace(","&Ap_rsc("B_pPath")&",",",,",",")&Uid&",",",,",",")
conn.execute("update member set b3=b3+"&Ap_XinYun_G3&",b0=b0+"&Ap_XinYun_G3&",xx2=xx2+"&Ap_XinYun_G3&",B_pPath='"&Ap_XinYun_pPath1&"' where id="&Ap_rsc("id")&" and xx2<xx3")
end if
Ap_rsc.movenext
wend
Ap_rsc=close
set Ap_rsc=nothing
end if
rsc.movenext
wend
rsc=close
set rsc=nothing
end if
if ppath<>"" then ppath=left(ppath,len(ppath)-1)
if ppath<>"" then ppath=right(ppath,len(ppath)-1)
if ppath<>"" then
SQLc="select top "&Ap_XinYun_G1&" B_pPath,id from member where id in ("&ppath&") order by plevel desc"
set rsc=server.CreateObject("adodb.recordset")
rsc.open SQLc,conn,1,1