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

📄 bbr_adminindexcommend.asp

📁 . 缓存处理技术
💻 ASP
字号:
<!-- #include file="SysConfig.asp" -->
<!-- #include file="checkAdmin.asp" -->
<!-- #include file="../Inc/Md5.asp" -->
<%
Call CheckAdminFlag(TempAdminFlag,3)

Dim rndbbrcnbbr,BBR_SellerCommend,BBR_CommendDay,Act
BBR_SellerCommend=1
BBR_CommendDay=1
act=Trim(Request.Form("act"))
if Lcase(Act)="auc2" then
   rndbbrcnbbr=CheckStr(Trim(Request.Form("rndbbrcnbbr")))
   if Session("rndbbrcnbbr")<>rndbbrcnbbr then
      Session("rndbbrcnbbr")=""
      Call AlertInfo("表单参数有误或者重复提交,请返回!",Cnbbr_ComeUrl,1)
   else
      Session("rndbbrcnbbr")=""
   end if
   BBR_SellerCommend=Request.Form("BBR_SellerCommend")
   if Not isNum(BBR_SellerCommend) then Call AlertInfo("出错了,商品推荐等级只能为数字!请重新尝试!",Cnbbr_ComeUrl,1)
   BBR_CommendDay=Request.Form("BBR_CommendDay")
   if Not isNum(BBR_CommendDay) then Call AlertInfo("出错了,商品推荐天数必须为数字!请重新尝试!",Cnbbr_ComeUrl,1)
end if

Dim AID,UID
Aid=Replace(Trim(Request.Form("id"))," ","")


if Not isNum(Aid) then Call AlertInfo("出错了,商品的首页推荐只能单独进行,你可能选择了不止一个商品!","",0)
if Not(act="auc" or act="auc2") then Call AlertInfo("出错了,参数传递有误!请重新尝试!",Cnbbr_ComeUrl,1)

     With Response
	.Write "<TABLE cellSpacing=0 cellPadding=0 width=98% align=center border=0>" & Vbcrlf
	.Write "<TR>" & Vbcrlf
	.Write "<td colspan=3 width=100% height=2 align=center class=menutdbg_1> </td>" & Vbcrlf
	.Write "</TR>" & Vbcrlf
	.Write "<TR>" & Vbcrlf
	.Write "<td colspan=3 width=100% height=23 align=Left background=""../SKINS/"& SKINS_FOLDER &"/GrayBg.Gif"" border=""0"">"& Vbcrlf
	.Write " <img src=""../skins/"& SKINS_FOLDER &"/Go.gif"" border=""0"">"
	.Write " <span Class=menufont_1><b>您的位置:<a href=""help.asp"" Class=menuColor_1>后台管理</a>&nbsp;&gt;&nbsp;<a href=""###"" Class=menuColor_1>商品管理</a>&nbsp;&gt;&nbsp;商品首页推荐平台</b></span>" & Vbcrlf
	.Write "</td>" & Vbcrlf
	.Write "</TR>" & Vbcrlf
	.Write "<TR height=1>" & Vbcrlf
	.Write "<td width=10% align=center></td><td width=80% align=center class=menutdbg_2> </td><td width=10% align=center></td>" & Vbcrlf
	.Write "</TR>" & Vbcrlf
	.Write "</Table>" & Vbcrlf

Dim StarAucBid
Dim RsStarAuc	
sql="select AucId,AucItemOwner,BBR_AdminCommend,BBR_AucComBid,BBR_AucComEndTime from auctions where aucended='N' and aucid in ("& Aid &")"
set rsStarAuc=Server.CreateObject("ADODB.Recordset")
RsStarAuc.Open Sql,conn,1,1
CnbbrConnTimes
if RsStarAuc.Eof then
   Call AlertInfo("出错了,请先选择你要在首页推荐的商品!","",0)
else







   
   UID=RsStarAuc("AucItemOwner")
   Dim StarAucCount,StarAucMinimumBid
   StarAucCount=0
   StarAucMinimumBid=0
   Sql="Select * from Cnbbr_TempStarAuc Order By Cnbbr_StarAucDate Asc"
   Set Rs=Conn.execute(Sql)
   if Not Rs.Eof then
      Dim TempMinimumBid:TempMinimumBid=100000
      Dim TempStarAucID:TempStarAucID=0
      Do While Not Rs.Eof
	 if Clng(AID)=Clng(Rs("Cnbbr_StarAucid")) then Call AlertInfo("出错了,你选择的商品已经是首页推荐商品!",Cnbbr_ComeUrl,1)
         if Cdbl(TempMinimumBid)>Cdbl(Rs("Cnbbr_StarAucBid")) then
	    TempMinimumBid=Rs("Cnbbr_StarAucBid")
	    TempStarAucID=Rs("Cnbbr_StarAucid")
	 end if
	 StarAucCount=StarAucCount+1
      Rs.MoveNext
      Loop

      if StarAucCount>=Cnbbr_IndexStarAucPerRow*Cnbbr_IndexStarAucRow then
	 StarAucCount=Cnbbr_IndexStarAucPerRow*Cnbbr_IndexStarAucRow
         StarAucMinimumBid=TempMinimumBid
      end if

      if Lcase(Act)="auc" then
	.Write "<BR>"& Vbcrlf
	.Write "<table border=0 cellpadding=0 cellspacing=1 width=""380"" align=center class=tablebg>" & Vbcrlf
	.Write "<form name=staraucform method=post action=""BBR_AdminIndexCommend.asp"">"& Vbcrlf
	.Write "  <tbody>" & Vbcrlf
	.Write "   <tr>" & Vbcrlf
	.Write "     <td colspan=2 height=30 align=center class=titletd>" & Vbcrlf
	.Write "	<b>请确认你的商品首页自助推荐操作:</b>" & Vbcrlf
	.Write "     </td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "   <tr height=22>" & Vbcrlf
	.Write "     <td width=150 class=td align=right>已推荐位置:</td>  " & Vbcrlf
	.Write "     <td width=230 align=center class=td><span class=fontcolor_2>"& StarAucCount &"</span> 个</td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "   <tr height=22>" & Vbcrlf
	.Write "     <td class=td align=right>最低消费金额:</td>  " & Vbcrlf
	.Write "     <td align=center class=td><span class=fontcolor_2>"& StarAucMinimumBid+StarAucBidUnit &"</span> 个"& SYS_WEBMONEY & Vbcrlf
	.Write "     </td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "   <tr height=22>" & Vbcrlf
	.Write "     <td class=td align=right>推荐天数:</td>  " & Vbcrlf
	.Write "     <td align=center class=td><span class=fontcolor_2><input name=BBR_CommendDay type=text size=3 value=7></span> 天"& Vbcrlf
	.Write "     </td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "   <tr height=22>" & Vbcrlf
	.Write "     <td class=td align=right>推荐等级:</td>  " & Vbcrlf
	.Write "     <td align=center class=td><span class=fontcolor_2><input name=BBR_SellerCommend type=text size=3 value=3></span> 级"& Vbcrlf
	.Write "     </td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "   <tr>" & Vbcrlf
	.Write "     <td colspan=2 height=80 align=center class=td>" & Vbcrlf
	.Write "    <input type=submit name=B1 value=""确认推荐商品"">" & Vbcrlf
	.Write "     </td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "  </tbody>" & Vbcrlf
 Randomize
 rndbbrcnbbr=MD5(chr(int(26*rnd)+65),cBBRMd5Byte)
 Session("rndbbrcnbbr")=rndbbrcnbbr
 Response.Write "<input type=""hidden"" name=""rndbbrcnbbr"" value="""&rndbbrcnbbr&""">"

	.Write "  <Input type=hidden name=id value="& Aid &">" & Vbcrlf
	.Write "  <Input type=hidden name=Uid value="& Uid &">" & Vbcrlf
	.Write "  <Input type=hidden name=Act value=""auc2"">" & Vbcrlf
	.Write "</form>" & Vbcrlf
	.Write "</table>" & Vbcrlf
      elseif Lcase(Act)="auc2" then





	StarAucBid=1


	if Clng(StarAucCount)>=Clng(Cnbbr_IndexStarAucPerRow*Cnbbr_IndexStarAucRow) then
	   Sql="Update Cnbbr_TempStarAuc set Cnbbr_StarAucID="& Aid &",Cnbbr_StarAucBid="&StarAucBid&",Cnbbr_StarAucDate="& SqlNowString &" where Cnbbr_StarAucID="& TempStarAucID
	else
	   Sql="Insert into Cnbbr_TempStarAuc (Cnbbr_StarAucID,Cnbbr_StarAucBid,Cnbbr_StarAucDate) values ('"& Aid &"','"&StarAucBid&"',"& SqlNowString &")"
	end if
	Conn.Execute(Sql)
	if IsSqlDataBase=1 then
	   Sql="Update Auctions set BBR_AdminCommend="&BBR_SellerCommend&",BBR_AucComBid="&StarAucBid&",BBR_AucComEndTime=DateAdd(d,"&BBR_CommendDay&","&SqlNowString&") where AucID="& AID
	else
	   Sql="Update Auctions set BBR_AdminCommend="&BBR_SellerCommend&",BBR_AucComBid="&StarAucBid&",BBR_AucComEndTime=DateAdd('d',"&BBR_CommendDay&","&SqlNowString&") where AucID="& AID
	end if
	Conn.Execute(Sql)

   HelpTitle="恭喜你!"
   HelpInfo="商品首页推荐操作成功!由于系统缓存的原因,可能不会实时生效,推荐时间依次顺延!"
   HelpList="<Ul>" & Vbcrlf
   HelpList=HelpList & "<LI><a href=""Search_Auction.asp"">继续推荐其它商品</a></LI>" & Vbcrlf
   HelpList=HelpList & "<LI><a href=""javascript: history.back(-1);"">返回上页</a></LI>" & Vbcrlf
   HelpList=HelpList & "</Ul>" & Vbcrlf
   Cnbbr_Helper HelpTitle,HelpInfo,HelpList,368

      else
        Call AlertInfo("出错了,参数传递有误!请重新尝试!","index.asp",1)
      end if
   else 





      if Lcase(Act)="auc" then
	.Write "<BR>"& Vbcrlf
	.Write "<table border=0 cellpadding=0 cellspacing=1 width=""380"" align=center class=tablebg>" & Vbcrlf
	.Write "<form name=staraucform method=post action=""BBR_AdminIndexCommend.asp"">"& Vbcrlf
	.Write "  <tbody>" & Vbcrlf
	.Write "   <tr>" & Vbcrlf
	.Write "     <td colspan=2 height=30 align=center class=titletd>" & Vbcrlf
	.Write "	<b>请确认你的商品首页自助推荐操作:</b>" & Vbcrlf
	.Write "     </td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "   <tr height=22>" & Vbcrlf
	.Write "     <td width=150 class=td align=right>已推荐位置:</td>  " & Vbcrlf
	.Write "     <td width=230 align=center class=td><span class=fontcolor_2>"& StarAucCount &"</span> 个</td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "   <tr height=22>" & Vbcrlf
	.Write "     <td class=td align=right>最低消费金额:</td>  " & Vbcrlf
	.Write "     <td align=center class=td><span class=fontcolor_2>"& StarAucMinimumBid+StarAucBidUnit &"</span> 个"& SYS_WEBMONEY & Vbcrlf
	.Write "     </td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "   <tr height=22>" & Vbcrlf
	.Write "     <td class=td align=right>推荐天数:</td>  " & Vbcrlf
	.Write "     <td align=center class=td><span class=fontcolor_2><input name=BBR_CommendDay type=text size=3 value=7></span> 天"& Vbcrlf
	.Write "     </td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "   <tr height=22>" & Vbcrlf
	.Write "     <td class=td align=right>推荐等级:</td>  " & Vbcrlf
	.Write "     <td align=center class=td><span class=fontcolor_2><input name=BBR_SellerCommend type=text size=3 value=3 title=""推荐等级越高,越靠前位置""></span> 级"& Vbcrlf
	.Write "     </td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "   <tr>" & Vbcrlf
	.Write "     <td colspan=2 height=80 align=center class=td>" & Vbcrlf
	.Write "    <input type=submit name=B1 value=""确认推荐商品"">" & Vbcrlf
	.Write "     </td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "  </tbody>" & Vbcrlf
 Randomize
 rndbbrcnbbr=MD5(chr(int(26*rnd)+65),cBBRMd5Byte)
 Session("rndbbrcnbbr")=rndbbrcnbbr
 Response.Write "<input type=""hidden"" name=""rndbbrcnbbr"" value="""&rndbbrcnbbr&""">"

	.Write "  <Input type=hidden name=id value="& Aid &">" & Vbcrlf
	.Write "  <Input type=hidden name=Uid value="& Uid &">" & Vbcrlf
	.Write "  <Input type=hidden name=Act value=""auc2"">" & Vbcrlf
	.Write "</form>" & Vbcrlf
	.Write "</table>" & Vbcrlf
      elseif Lcase(Act)="auc2" then





	StarAucBid=1


	Sql="Insert into Cnbbr_TempStarAuc (Cnbbr_StarAucID,Cnbbr_StarAucBid,Cnbbr_StarAucDate) values ('"& Aid &"','"&StarAucBid&"',"& SqlNowString &")"
	Conn.Execute(Sql)
	if IsSqlDataBase=1 then
	   Sql="Update Auctions set BBR_AdminCommend="&BBR_SellerCommend&",BBR_AucComBid="&StarAucBid&",BBR_AucComEndTime=DateAdd(d,"&BBR_CommendDay&","&SqlNowString&") where AucID="& AID
	else
	   Sql="Update Auctions set BBR_AdminCommend="&BBR_SellerCommend&",BBR_AucComBid="&StarAucBid&",BBR_AucComEndTime=DateAdd('d',"&BBR_CommendDay&","&SqlNowString&") where AucID="& AID
	end if
	Conn.Execute(Sql)

   HelpTitle="恭喜你!"
   HelpInfo="商品首页推荐操作成功!由于系统缓存的原因,可能不会实时生效,推荐时间依次顺延!"
   HelpList="<Ul>" & Vbcrlf
   HelpList=HelpList & "<LI><a href=""Search_Auction.asp"">继续推荐其它商品</a></LI>" & Vbcrlf
   HelpList=HelpList & "<LI><a href=""javascript: history.back(-1);"">返回上页</a></LI>" & Vbcrlf
   HelpList=HelpList & "</Ul>" & Vbcrlf
   Cnbbr_Helper HelpTitle,HelpInfo,HelpList,368

      else
        Call AlertInfo("出错了,参数传递有误!请重新尝试!",Cnbbr_ComeUrl,1)
      end if
   
   End if
End if
RsStarAuc.Close
Set RsStarAuc=Nothing

    End With
%>

⌨️ 快捷键说明

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