📄 dataupdate_application.asp
字号:
<!--#include file="PixelPic.asp"-->
<%
Sub CnbbrTempAuc()
Call CnbbrTimer(0,Update_SYSTimes)
End Sub
Sub CnbbrDealWithAuc()
Call CnbbrTimer(1,Update_SYSTimes+10)
End Sub
Sub CnbbrDelExpiresAuc()
Call CnbbrTimer(2,1)
End Sub
Function CnbbrUpdateStarAuc()
Call CnbbrTimer(3,Update_SYSTimes+30)
End Function
Function CnbbrUpdateStarShop()
Call CnbbrTimer(4,Update_SYSTimes+40)
End Function
Function CnbbrStarAuc()
Call CnbbrTimer(5,Update_TempAucTimes)
CnbbrStarAuc=AppliCation("CnbbrStarAuc")
End Function
Function CnbbrStarShop()
Call CnbbrTimer(6,Update_TempAucTimes+Update_TempAucTimes)
CnbbrStarShop=AppliCation("CnbbrStarShop")
End Function
Function CnbbrSysNews()
Call CnbbrTimer(7,1)
CnbbrSysNews=Application("CnbbrSysNews")
End Function
Function CnbbrAucClosing()
Call CnbbrTimer(8,Update_TempAucTimes+10)
CnbbrAucClosing=Application("CnbbrAucClosing")
End Function
Function CnbbrAucNew()
Call CnbbrTimer(9,Update_TempAucTimes+20)
CnbbrAucNew=Application("CnbbrAucNew")
End Function
Function CnbbrAucQiuGou()
Call CnbbrTimer(10,Update_TempAucTimes+30)
CnbbrAucQiuGou=Application("CnbbrAucQiuGou")
End Function
Function CnbbrAucQiuGou1()
Call CnbbrTimer(11,Update_TempAucTimes+30)
CnbbrAucQiuGou1=Application("CnbbrAucQiuGou1")
End Function
Function CnbbrAucQiuGou2()
Call CnbbrTimer(12,Update_TempAucTimes+30)
CnbbrAucQiuGou2=Application("CnbbrAucQiuGou2")
End Function
Sub CnbbrTimer(Content,Times)
Dim strLastUpdate
Select Case Content
Case 0:
if not IsDate(Application("CnbbrAK0")) then Application("CnbbrAK0")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK0")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now())) Then
Cnbbr_TempAuc
Application.Lock
Application("CnbbrAK0")=CStr(Now)
Application.Unlock
End if
Case 1:
if not IsDate(Application("CnbbrAK1")) then Application("CnbbrAK1")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK1")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now())) Then
Cnbbr_DealWithAuc
Application.Lock
Application("CnbbrAK1")=CStr(Now)
Application.Unlock
End if
Case 2:
if not IsDate(Application("CnbbrAK2")) then Application("CnbbrAK2")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK2")
If (strLastUpdate="") Or (Times<DateDiff("d",strLastUpdate, Now())) Then
Cnbbr_DelExpiresAuc
Application.Lock
Application("CnbbrAK")=CStr(Now)
Application.Unlock
End if
Case 3:
if not IsDate(Application("CnbbrAK3")) then Application("CnbbrAK3")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK3")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now())) Then
Cnbbr_UpdateStarAuc
Application.Lock
Application("CnbbrAK3")=CStr(Now)
Application.Unlock
End if
Case 4:
if not IsDate(Application("CnbbrAK4")) then Application("CnbbrAK4")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK4")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now())) Then
Cnbbr_UpdateStarShop
Application.Lock
Application("CnbbrAK4")=CStr(Now)
Application.Unlock
End if
Case 5:
if not IsDate(Application("CnbbrAK5")) then Application("CnbbrAK5")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK5")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now())) Then
Application.Lock
Application("CnbbrStarAuc")=Cnbbr_StarAuc
Application("CnbbrAK5")=CStr(Now)
Application.Unlock
End if
Case 6:
if not IsDate(Application("CnbbrAK6")) then Application("CnbbrAK6")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK6")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now())) Then
Application.Lock
Application("CnbbrStarShop")=Cnbbr_StarShop
Application("CnbbrAK6")=CStr(Now)
Application.Unlock
End if
Case 7:
if not IsDate(Application("CnbbrAK7")) then Application("CnbbrAK7")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK7")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now)) Then
Application.Lock
Application("CnbbrSysNews")=Cnbbr_SysNews
Application("CnbbrAK7")=CStr(Now)
Application.Unlock
End if
Case 8:
if not IsDate(Application("CnbbrAK8")) then Application("CnbbrAK8")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK8")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now)) Then
Application.Lock
Application("CnbbrAucClosing")=Cnbbr_AucClosing
Application("CnbbrAK8")=CStr(Now)
Application.Unlock
End if
Case 9:
if not IsDate(Application("CnbbrAK9")) then Application("CnbbrAK9")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK9")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now)) Then
Application.Lock
Application("CnbbrAucNew")=Cnbbr_AucNew
Application("CnbbrAK9")=CStr(Now)
Application.Unlock
End if
Case 10:
if not IsDate(Application("CnbbrAK10")) then Application("CnbbrAK10")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK10")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now)) Then
Application.Lock
Application("CnbbrAucQiuGou")=Cnbbr_AucQiuGou()
Application("CnbbrAK10")=CStr(Now)
Application.Unlock
End if
Case 11:
if not IsDate(Application("CnbbrAK11")) then Application("CnbbrAK11")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK11")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now)) Then
Application.Lock
Application("CnbbrAucQiuGou1")=Cnbbr_AucQiuGou1()
Application("CnbbrAK11")=CStr(Now)
Application.Unlock
End if
Case 12:
if not IsDate(Application("CnbbrAK12")) then Application("CnbbrAK12")=Cdate("2000-1-1 00:00:00")
strLastUpdate=Application("CnbbrAK12")
If (strLastUpdate="") Or (Times<DateDiff("s",strLastUpdate, Now)) Then
Application.Lock
Application("CnbbrAucQiuGou2")=Cnbbr_AucQiuGou2()
Application("CnbbrAK12")=CStr(Now)
Application.Unlock
End if
Case else:
End Select
End Sub
Sub Cnbbr_TempAuc()
Sql="Delete"& SqlDiff &"from Cnbbr_TempAuc"
Conn.Execute(sql)
set rs=server.createobject("adodb.recordset")
if IsSqlDataBase=1 then
sql="select AucId,AucCloseDate from Auctions where Aucended='N' and DateDiff(s, "& SqlNowString &", AucCloseDate)<="& Update_SysTimes
else
sql="select AucId,AucCloseDate from Auctions where Aucended='N' and DateDiff('s', "& SqlNowString &", AucCloseDate)<="& Update_SysTimes
end if
rs.open sql,conn,1,1
CnbbrConnTimes
if Not rs.eof then
do while not rs.eof
Sql="Insert Into Cnbbr_TempAuc (TAucid,TAucCloseDate) values ('"& Rs("AucID") &"','"& Rs("AucCloseDate") &"')"
Conn.Execute(sql)
rs.movenext
loop
end if
End Sub
Sub Cnbbr_DealWithAuc()
If IsSqlDataBase = 1 Then
sql="select AucID,AucType,AucNum,AucEnded,AucAvailDate,AucCloseDate,AucCurrentBid,AucReservePrice,BidTimes,YkjbidTimes,BBR_Auc_Success from AucTions where AucEnded='N' and (datediff(s,Aucclosedate,"&SqlNowString&")>0) and AucId in (Select TAucID from Cnbbr_TempAuc)"
else
sql="select * from AucTions where AucEnded='N' and (datediff('s',Aucclosedate,"&SqlNowString&")>0) and AucId in (Select TAucID from Cnbbr_TempAuc)"
end if
Dim Rs_DealWithAuc
set Rs_DealWithAuc=server.createobject("adodb.recordset")
Rs_DealWithAuc.Open sql,conn,1,3
CnbbrConnTimes
if not Rs_DealWithAuc.eof then
Do While Not Rs_DealWithAuc.eof
Dim BBR_AucTime
if Rs_DealWithAuc("aucType")=2 then
if Rs_DealWithAuc("aucNum")=0 then
Rs_DealWithAuc("aucended")="Y"
Rs_DealWithAuc("aucclosedate")=now()
Rs_DealWithAuc("BBR_Auc_Success")=1
Rs_DealWithAuc.update
else
BBR_AucTime=Datediff("d",Rs_DealWithAuc("aucavaildate"),Rs_DealWithAuc("aucCloseDate"))
BBR_AucTime=DateAdd("d",BBR_AucTime,Rs_DealWithAuc("aucClosedate"))
Rs_DealWithAuc("aucCloseDate")=BBR_AucTime
Rs_DealWithAuc.Update
end if
else
if Rs_DealWithAuc("AucCurrentBid")>=Rs_DealWithAuc("aucreserveprice") and Rs_DealWithAuc("bidtimes")>0 then
Rs_DealWithAuc("aucended")="Y"
Rs_DealWithAuc("BBR_Auc_Success")=1
Rs_DealWithAuc("aucnum")=0
Rs_DealWithAuc("aucclosedate")=now()
Rs_DealWithAuc.update
sql ="insert into cnBBR_Appraise (Cnbbr_aAucID,Cnbbr_aAucItemTitle,Cnbbr_aAucOwnerID,Cnbbr_aAucBuyerId,Cnbbr_aAucBid,Cnbbr_aAucDate,Cnbbr_aOwnerCredit,Cnbbr_aOwnerContent,Cnbbr_aOwnerDate,Cnbbr_aOwnerStatus,Cnbbr_aBuyerCredit,Cnbbr_aBuyerContent,Cnbbr_aBuyerDate,Cnbbr_aBuyerStatus)" & _
" values ("& Rs_DealWithAuc("AucID") &", '"& Rs_DealWithAuc("AucItemTitle") &"', "& Rs_DealWithAuc("AucItemOwner") &", "& Rs_DealWithAuc("AucCurrentBidder") &","& Rs_DealWithAuc("AucCurrentBid") &",'"& now() &"', 0,'未评价', '"& now() &"',0, 0,'未评价', '"& now() &"',0)"
conn.execute(sql)
CnbbrConnTimes
Call EmailForAuc(Rs_DealWithAuc("AucItemTitle"),Rs_DealWithAuc("AucID"),Rs_DealWithAuc("AucItemOwner"),Rs_DealWithAuc("AucCurrentBidder"))
else
BBR_AucTime=Datediff("d",Rs_DealWithAuc("aucavaildate"),Rs_DealWithAuc("aucCloseDate"))
BBR_AucTime=DateAdd("d",BBR_AucTime,Rs_DealWithAuc("aucClosedate"))
Rs_DealWithAuc("aucCloseDate")=BBR_AucTime
Rs_DealWithAuc.Update
End if
end if
Rs_DealWithAuc.movenext
Loop
end if
Rs_DealWithAuc.close
set Rs_DealWithAuc=nothing
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -