文件名称:四轨直销系统(四四复制)带计算源码无加密
文件大小:2.6MB
文件格式:RAR
更新时间:2022-03-24 09:10:26
asp源码 多级分销 四轨直销
四轨直销系统(四四复制)带计算源码无加密
后台地址:jzzgg.asp
帐号密码:admin
<%
currf="cdefdb/jzz178.mdb"
currf=server.mappath(currf)
backf=thistoday&"计算前"
backf=server.mappath(backf)
backfy="jzz178.cn"
'on error resume next
Set objfso = Server.CreateObject("Scripting.FileSystemObject")
if err then
err.clear
response.write "[removed]alert(""不能建立fso对象,请确保你的空间支持fso:!"");history.back();[removed]"
response.end
end if
if objfso.Folderexists(backf) then
else
Set fy=objfso.CreateFolder(backf)
end if
objfso.copyfile currf,backf& "\"& backfy
set HyWeekRs=nothing
set HyWeekRs=server.CreateObject("adodb.recordset")
sql = "SELECT max(ComputeWeek) as MaxComputeWeek FROM HyMoneyLog"
HyWeekRs.Open sql,conn,1,1
if HyWeekRs.RecordCount>0 then
if isnull(HyWeekRs("MaxComputeWeek")) then
MaxComputeWeek=1
else
MaxComputeWeek=HyWeekRs("MaxComputeWeek")+1
end if
else
MaxComputeWeek=1
end if
set HyWeekRs=nothing
set HyExcelRs=nothing
set HyExcelRs=server.CreateObject("adodb.recordset")
sql = "SELECT HyNumber,isfour FROM HyClub where IsApproved=true "
HyExcelRs.Open sql,conn,1,1
j=HyExcelRs.RecordCount
if j>0 then
while (not HyExcelRs.eof)
set ComputeRs=server.CreateObject("adodb.recordset")
sql=""
HyNumber=HyExcelRs("HyNumber")
isfour=HyExcelRs("isfour")
set HyRs888=server.CreateObject("adodb.recordset")
sql = "select HyManageTotal_Left from HyMoneyAccount where HyNumber ='" & HyNumber & "'"
HyRs888.Open sql,conn,1,1
if HyRs888.recordcount=0 then
left_old=0
else
left_old=HyRs888("HyManageTotal_Left")
if left_old="" or isnull(left_old) then
left_old=0
end if
end if
set HyRs888=nothing
LeftCount=0
MiddleCount=0
MiddleLCount=0
RightCount=0
If GetHyParentNumberCount(HyNumber)=4 Then
LeftCount=GetLeftCountLevel(HyNumber,1,1,8)
MiddleCount=GetMiddleCountLevel(HyNumber,1,1,8)
MiddleLCount=GetMiddleLCountLevel(HyNumber,1,1,8)
RightCount=GetRightCountLevel(HyNumber,1,1,8)
End if
'response.write LeftCount&"|"&MiddleCount;&"|"&RightCount;&"
"
TeamManageMoney=0
TempCountAll=0
TempCountAll=LeftCount+MiddleCount+MiddleLCount+RightCount
if TempCountAll-left_old>0 then
TeamManageMoney=(TempCountAll-left_old)*20
end If
TujianMoney=0
If GetHyParentNumberCount(HyNumber)=4 And isfour=0 Then
TujianMoney=160
End If
OtherMoney1=0
OtherMoney1=(TeamManageMoney+TujianMoney)*0.01
AllMoney=TeamManageMoney+TujianMoney-OtherMoney1
if AllMoney<>0 then
if CheckExists(HyNumber) then
sql ="update HyMoneyAccount set HyManageTotal_Left=" & TempCountAll
sql =sql & ",HyMoneyAccount=HyMoneyAccount+" & AllMoney
sql =sql & ",LastUpdateDT='" & thisToday & "'"
sql =sql &" where HyNumber='" & HyNumber & "'"
else
sql= " insert into HyMoneyAccount(HyNumber,HyMoneyAccount,HyManageTotal_Left,LastUpdateDT)"
sql =sql & " values('" & HyNumber & "'," & AllMoney & "," & TempCountAll & ",'"& thistoday& "')"
end if
'response.write sql & "
"
'response.end
ComputeRs.Open sql,conn,1,3
set ComputeRs=nothing
set HyRs888=nothing
set HyRs888=server.CreateObject("adodb.recordset")
sql = "insert into HyMoneyLog(HyNumber,OtherMoney1,TujianMoney,TeamManageMoney,AllMoney,ComputeTime,ComputeWeek)"
sql =sql & " values('" & HyNumber & "',"& OtherMoney1& ","& TujianMoney& ","& TeamManageMoney & ","& AllMoney & ",'"&thistoday;& "',"& MaxComputeWeek & ")"
HyRs888.Open sql,conn,1,3
set HyRs888=Nothing
If allmoney<>0 And Isfour=0 Then
set HyRs888=server.CreateObject("adodb.recordset")
sql = "update Hyclub set isfour=true where HyNumber='" & HyNumber & "'"
HyRs888.Open sql,conn,1,3
set HyRs888=Nothing
End if
end if
HyExcelRs.movenext
wend
end if
Function GetHyParentNumberCount(HyNumber)
set HySumBuyCountRs=nothing
set HySumBuyCountRs=server.CreateObject("adodb.recordset")
SumBuyCount=0
if len(HyNumber)>0 then
sql = "SELECT count(id) as TjCount FROM HyClub where HyParentNumber='" & HyNumber & "' and IsApproved=true"
HySumBuyCountRs.Open sql,conn
if HySumBuyCountRs.RecordCount>0 then
if len(HySumBuyCountRs("TjCount"))>0 then
SumBuyCount=HySumBuyCountRs("TjCount")
end if
end if
end if
GetHyParentNumberCount=SumBuyCount
End Function
%>
[removed]
alert('奖金计算结束,请返回页面查看奖金!');
[removed].href="hytodaymoneymanok.asp"
//window.parent.frames(0).location.reload();
[removed]