⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dataupdate_application.asp

📁 . 缓存处理技术
💻 ASP
📖 第 1 页 / 共 3 页
字号:
End Sub


Sub Cnbbr_DelExpiresAuc()
If IsSqlDataBase = 1 Then
   sql="select aucid,BBR_ClassPath from auctions where datediff(d,aucclosedate,"& SqlNowString &")>"& autodel &" and aucended='Y'"
else
   sql="select aucid,BBR_ClassPath from auctions where datediff('d',aucclosedate,"& SqlNowString &")>"& autodel &" and aucended='Y'"
end if
Dim Rs_Del,Temp_DelID
Set Rs_Del=Server.CreateObject("ADODB.RecordSet")
Rs_Del.Open Sql,conn,1,3
CnbbrConnTimes
if Not Rs_Del.Eof then
   Do While Not Rs_Del.Eof
      Temp_DelID=Temp_DelID & Rs_Del("AucID") & ","

 	Dim BBR_ClassPath
  	BBR_ClassPath=Replace(Rs_Del("BBR_ClassPath"),"|",",")
  	Call CnBBR_AucClass_Amount(BBR_ClassPath,0)
   Rs_Del.MoveNext
   Loop

	Temp_DelID=Left(Temp_DelID,len(Temp_DelID)-1)



	   Sql="delete"& SqlDiff &"from aucImages where AucID in ("& Temp_DelID &")"
	   Conn.Execute(sql)

	   Sql="delete"& SqlDiff &"from Bids where BidItemID in ("& Temp_DelID &")"
	   Conn.Execute(sql)
	   Sql="delete"& SqlDiff &"from YkjBids where YkjBidItemID in ("& Temp_DelID &")"
	   Conn.Execute(sql)
	Sql="delete"& SqlDiff &"from AucImages where AucID in ("& Temp_DelID &")"
	Conn.Execute(sql)
	Sql="delete"& SqlDiff &"from msg where AucID in ("& Temp_DelID &")"
	Conn.Execute(sql)
	Sql="delete"& SqlDiff &"from Auctions where AucID in ("& Temp_DelID &")"
	Conn.Execute(sql)
End if
Rs_Del.Close
Set Rs_Del=nothing

End Sub


Function Cnbbr_UpdateStarAuc()

  Sql="Delete"& SqlDiff &"from Cnbbr_TempStarAuc"
  Conn.Execute(sql)
  set rs=server.createobject("adodb.recordset")
  if IsSqlDataBase=1 then
     Sql="select AucId,BBR_AdminCommend,BBR_AucComBid,BBR_AucComEndTime from Auctions where Aucended='N' and BBR_AdminCommend>=1 and DateDiff(s,"& SqlNowString &",BBR_AucComEndTime)>0"
  else
     Sql="select AucId,BBR_AdminCommend,BBR_AucComBid,BBR_AucComEndTime from Auctions where Aucended='N' and BBR_AdminCommend>=1 and DateDiff('s',"& SqlNowString &",BBR_AucComEndTime)>0"
  end if
  rs.open sql,conn,1,3
  CnbbrConnTimes
  if Not rs.eof then
     i=0
     do while not rs.eof
	Dim TempTimeDiff
	TempTimeDiff=DateDiff("s",Rs("BBR_AucComEndTime"),now())
	if TempTimeDiff<0 then

	   Sql="Insert Into Cnbbr_TempStarAuc (Cnbbr_StarAucid,Cnbbr_StarAucBid,Cnbbr_StarAucDate) values ('"& Rs("AucID") &"','"& Rs("BBR_AucComBid") &"','"& Rs("BBR_AucComEndTime") &"')"
	   Conn.Execute(sql)
	   i=i+1
	   if i>=Cnbbr_IndexStarAucPerRow*Cnbbr_IndexStarAucRow then Exit Do
	else

	  Rs("BBR_AdminCommend")=0
	  Rs("BBR_AucComBid")=0
	  Rs("BBR_AucComEndTime")=now()
	  Rs.Update
	end if
     rs.movenext
     loop
  end if
End Function

Function Cnbbr_UpdateStarShop()

  Sql="Delete"& SqlDiff &"from Cnbbr_TempStarShop"
  Conn.Execute(sql)
  set rs=server.createobject("adodb.recordset")
  if IsSqlDataBase=1 then
     Sql="select ShopId,BBR_ShopCommend,BBR_ShopComBid,BBR_ShopComEndTime from Shops where BBR_ShopCommend>=1 and DateDiff(s,"& SqlNowString &",BBR_ShopComEndTime)>0"
  else
     Sql="select ShopId,BBR_ShopCommend,BBR_ShopComBid,BBR_ShopComEndTime from Shops where BBR_ShopCommend>=1 and DateDiff('s',"& SqlNowString &",BBR_ShopComEndTime)>0"
  end if
  rs.open sql,conn,1,1
  CnbbrConnTimes
  if Not rs.eof then
     i=0
     do while not rs.eof
	Dim TempTimeDiff
	TempTimeDiff=DateDiff("s",now(),Rs("BBR_ShopComEndTime"))
	if TempTimeDiff>0 then
	   Sql="Insert Into Cnbbr_TempStarShop (Cnbbr_StarShopid,Cnbbr_StarShopBid,Cnbbr_StarShopDate) values ("& Rs("ShopID") &","& Rs("BBR_ShopComBid") &",'"& Rs("BBR_ShopComEndTime") &"')"
	   Conn.Execute(sql)
	   i=i+1
	   if i>=Cnbbr_IndexStarShopPerRow*Cnbbr_IndexStarShopRow then Exit Do
	else
	  Rs("BBR_ShopCommend")=0
	  Rs("BBR_ShopComBid")=0
	  Rs("BBR_ShopComEndTime")=now()
	  Rs.Update
	end if
     rs.movenext
     loop
  end if
End Function


Function Cnbbr_StarAuc()

   if IsSqlDataBase=1 then
      Sql="delete "&SqlDiff&" from Cnbbr_TempStarAuc where DateDiff(s,Cnbbr_StarAucDate,"& SqlNowString &")>=0"
   else
      Sql="delete "&SqlDiff&" from Cnbbr_TempStarAuc where DateDiff('s',Cnbbr_StarAucDate,"& SqlNowString &")>=0"
   end if
   Conn.Execute(Sql)

   Dim Cnbbr_RowNum,Cnbbr_perRowNum,Cnbbr_AucCommendStr
   Cnbbr_RowNum=Cnbbr_IndexStarAucRow
   Cnbbr_PerRowNum=Cnbbr_IndexStarAucPerRow


    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<table cellpadding=0 cellspacing=0 border=0 width=100% align=center class=td>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TR>"

 sql="Select Top 20 AucId,AucImageurl,AucItemTitle,AucCurrentBid,BBR_AliPayStatus,AucType from auctions where aucended='N' and Auctype in ("& SYS_MODEL &") and AucID in (select top "&Cnbbr_RowNum*Cnbbr_PerRowNum&" CnBBR_StarAucID from Cnbbr_TempStarAuc) order by BBR_AdminCommend Desc,BBR_AucComBid Desc,BBR_AucComEndTime Desc"
 set rs=server.createobject("ADODB.recordset")
 rs.open sql,conn,1,1
 CnbbrConnTimes
 if rs.eof or rs.bof then
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<td vAlign=baseline align=middle>商品推荐位置还空着哦,赶快抢先推荐你的商品!</td>"
 else
   i=0
   Do while not rs.eof

    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TD width=98>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<table cellpadding=0 cellspacing=0 border=0 width=100% height=172 align=center style=""TABLE-LAYOUT: fixed;"">"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TR>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TD width=""100%"" height=""88"" align=""center"" background=""Skins/"& SKINS_FOLDER &"/CommendImg_BG.gif"">"



    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr & BBRAucSmallImage(Rs("AucID"),0,0,"Skins/"& SKins_Folder &"/nopic.gif")

    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TD>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TR>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TR>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TD width=""100%"" height=""88"" align=""center"" style=""table-layout: fixed; word-break: break-all"">"
    k=interceptString(rs("aucItemtitle"),25)
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<a href=""aucinfo.asp?aucid="& rs("aucid") &""" title="& rs("aucItemtitle") &">"& k &"</a><BR>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<Span Style=""color:#EE2222; font-size: 14px;"">¥"& FormatNumber(Rs("AucCurrentBid"),0,-1) &"</Span> 元<BR>"& Vbcrlf
	select case Rs("AucType")
	 case 1:
           Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<img src=images/icon_bid.gif border=0 alt=拍卖>"
	 case 2:
	   Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<img src=images/icon_buynow.gif border=0 alt=一口价>"
	 case else:
	   Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"X"
	end select
    if Rs("BBR_AlipayStatus")=1 then Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &" &nbsp;<img border=""0"" src=""Images/AlipayStatus.gif"" alt=""支持支付宝付款"" title=""使用支付宝付款,放心又省钱"" />"& Vbcrlf
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TD>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TR>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</table>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TD>"

   i=i+1

   if i>=Cnbbr_RowNum*Cnbbr_PerRowNum then Exit Do
   if i mod Cnbbr_PerRowNum=0 then
      Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TR>"
      Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TR>"
   End if
   rs.MoveNext
   Loop


   j=Cnbbr_PerRowNum-i mod Cnbbr_PerRowNum

   if j>0 and j<Cnbbr_PerRowNum then
    For i=1 to j
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TD width=""98"">"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<table cellpadding=0 cellspacing=0 border=0 width=100% align=center style=""TABLE-LAYOUT: fixed;"">"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TR>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TD width=""88"" height=""88"" align=""center"" background=""Skins/"& SKINS_FOLDER &"/CommendImg_BG.gif"">"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<img src=""SKINS/"& SKINS_FOLDER &"/nopic.gif"" border=""0"" width=""72"" height=""72"">"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TD>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TR>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TR>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"<TD width=""100%"" height=""88"">"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"·暂无商品"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TD>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TR>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</table>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TD>"
    Next
   end if


 end if
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</TR>"
    Cnbbr_AucCommendStr=Cnbbr_AucCommendStr &"</table>"
    Cnbbr_StarAuc=Cnbbr_AucCommendStr
End Function



Function Cnbbr_StarShop()

   if IsSqlDataBase=1 then
      Sql="delete "&SqlDiff&" from Cnbbr_TempStarShop where DateDiff(s,Cnbbr_StarShopDate,"& SqlNowString &")>=0"
   else
      Sql="delete "&SqlDiff&" from Cnbbr_TempStarShop where DateDiff('s',Cnbbr_StarShopDate,"& SqlNowString &")>=0"
   end if
   Conn.Execute(Sql)

   Dim Cnbbr_RowNum,Cnbbr_perRowNum,Cnbbr_ShopCommendStr
   Cnbbr_RowNum=Cnbbr_IndexStarShopRow
   Cnbbr_PerRowNum=Cnbbr_IndexStarShopPerRow


    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"<table cellpadding=0 cellspacing=0 border=0 width=100% align=center>"
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"<TR height=118>"

 sql="Select Top 20 ShopID,ShopImage,ShopName,ShopFlag from Shops where BBR_ShopCommend>=1 and ShopID in (select top "&Cnbbr_RowNum*Cnbbr_PerRowNum&" CnBBR_StarShopID from Cnbbr_TempStarShop) order by BBR_SHopCommend Desc,BBR_ShopComBid Desc,BBR_ShopComEndTime Desc"
 set rs=conn.execute(sql)
 CnbbrConnTimes
 if rs.eof or rs.bof then
    if IsSqlDataBase=1 then
       Sql="update shops set BBR_ShopCommend=0 where BBR_ShopCommend>=1 and DateDiff(s,BBR_ShopComEndTime,"& SqlNowString &")>0"
    else
       Sql="update shops set BBR_ShopCommend=0 where BBR_ShopCommend>=1 and DateDiff('s',BBR_ShopComEndTime,"& SqlNowString &")>0"
    end if
    Conn.execute(Sql)
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"<td vAlign=baseline align=middle>首页店铺位置还空着呢,赶快推荐你的店铺哦!</td>"
 else
   i=0
   Do while not rs.eof

    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"<TD valign=Top width=""98"">"
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"  <table cellpadding=""0"" cellspacing=""0"" width=""100%"" border=""0"" align=""center"">"
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"    <tr>"
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"     <td width=""100%"" height=""88"" align=""center"">"
    if IsNull(Rs("ShopImage")) then
       Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"<a href=""shop/index.asp?shopid="& rs("shopid") &"""><img src=""SKINS/"& SKINS_FOLDER &"/ShopStar.gif"" width=""72"" height=""72"" border=""0"" alt=""无店铺标志""></a>"
    else
       Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"<a href=""shop/index.asp?shopid="& rs("shopid") &"""><img src=""upfile/ReadDbFile.asp?SID="& Rs("ShopID") &""" width=""72"" height=""72"" border=""0"" alt="& Rs("ShopName") &"></a>"
    End if
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"     </td>"
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"    </tr>"
    k=interceptString(rs("shopname"),20)
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"    <tr>"
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"     <td align=""center""> <a href=""shop/index.asp?shopid="& rs("shopid") &""">"& k &"</a> <BR> "& Disp_ShopStar(Rs("ShopFlag"),0) &"</td>"
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"    </tr>"
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"  </table>"
    Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"</TD>"
   i=i+1
   rs.MoveNext
   if i>Cnbbr_RowNum*Cnbbr_PerRowNum then Exit Do
   if i mod Cnbbr_PerRowNum=0 then
	Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"</TR>"
        Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"<TR height=118>"
   end if

   Loop

   k=Cnbbr_PerRowNum-i mod Cnbbr_PerRowNum
   if k>0 and k<Cnbbr_PerRowNum then
      For i=1 to k
    	Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"<TD valign=Top width=""98"">"
    	Cnbbr_ShopCommendStr=Cnbbr_ShopCommendStr &"  <table cellpadding=""0"" cellspacing=""0"" width=""100%"" border=""0"" align=""center"">"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -