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

📄 bbr_sellerindexcommend.asp

📁 . 缓存处理技术
💻 ASP
字号:
<!-- #include file="top_cnbbr.asp" -->
<!-- #include file="chksession.asp" -->

<!-- #include file="Inc/Md5.asp" -->
<!--#include file="Cnbbr_UserCenter_Left.asp" -->
<%
Dim rndbbrcnbbr
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("表单参数有误或者重复提交,请返回!","BBR_Sell_Auction.asp",1)
   else
      Session("rndbbrcnbbr")=""
   end if
end if

Dim UID,Act,BBR_SellerCommend
uid=Replace(Trim(Request.Form("id"))," ","")
act=Trim(Request.Form("act"))
BBR_SellerCommend=Request.QueryString("BBR_SellerCommend")
if Not isNum(Uid) then Call AlertInfo("出错了,商品的首页推荐只能单独进行,你可能选择了不止一个商品!","",0)
if Not(act="auc" or act="auc2") then Call AlertInfo("出错了,参数传递有误!请重新尝试!","index.asp",1)
if Not isNum(BBR_SellerCommend) then Call AlertInfo("出错了,参数传递有误!请重新尝试!","index.asp",1)
if BBR_SellerCommend<>0 then BBR_SellerCommend=1

Dim TempEndTime
TempEndTime=Cdate(DateAdd("d",LimitStarLargerTime,Now()))

Response.Write Cnbbr_Head
     With Response
 	.Write "<table border=0 cellpadding=0 cellspacing=0 width="""& Sys_BodyCenterWidth &""" align=center class=td>" & Vbcrlf
 	.Write "  <tbody>"& Vbcrlf
 	.Write "   <tr>"& Vbcrlf
 	.Write "    <td align=left valign=top width=150>"& Vbcrlf
	 Disp_CnbbrCenterLeft
 	.Write "    </td>"& Vbcrlf
 	.Write "    <td align=left valign=top>"& Vbcrlf

	Dim SiteMenu_Width,SiteMenu_Left,SiteMenu_Right
	SiteMenu_Width="98%"
	SiteMenu_Left="BBRhome.asp|[menu]|个人面板||[menu]||BBRhome.asp|[menu]|我是卖家||[menu]||BBR_Sell_Auction.asp|[menu]|出售中的商品||[menu]||BBR_SellerIndexCommend.asp|[menu]|商品首页推荐"
	SiteMenu_Right=""
	Response.Write CnbbrSiteMenu(SiteMenu_Width,SiteMenu_Left,SiteMenu_Right)






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







   

   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(UID)=Clng(Rs("Cnbbr_StarAucid")) then Call AlertInfo("出错了,你选择的商品已经是首页推荐商品!","BBR_Sell_Auction.asp",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_SellerIndexCommend.asp?BBR_SellerCommend="&BBR_SellerCommend&""">"& 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=250 class=td align=right>当前已有用户推荐的商品推荐位置:</td>  " & Vbcrlf
	.Write "     <td width=130 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=StarAucBid type=text size=6 value="&StarAucMinimumBid+StarAucBidUnit&"></span> 个"& SYS_WEBMONEY & 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="& Uid &">" & Vbcrlf
	.Write "  <Input type=hidden name=Act value=""auc2"">" & Vbcrlf
	.Write "</form>" & Vbcrlf
	.Write "</table>" & Vbcrlf
      elseif Lcase(Act)="auc2" then





	StarAucBid=Request.Form("StarAucBid")
	if StarAucBid<StarAucMinimumBid+StarAucBidUnit then Call AlertInfo("出错了,当前你的出价不足以获得推荐位置!请重新尝试!","BBR_Sell_Auction.asp",1)
	Cnbbr_UserPay(StarAucBid)

	if Clng(StarAucCount)>=Clng(Cnbbr_IndexStarAucPerRow*Cnbbr_IndexStarAucRow) then
	   Sql="Update Cnbbr_TempStarAuc set Cnbbr_StarAucID="& Uid &",Cnbbr_StarAucBid="&StarAucBid&",Cnbbr_StarAucDate='"& TempEndTime &"' where Cnbbr_StarAucID="& TempStarAucID
	else
	   Sql="Insert into Cnbbr_TempStarAuc (Cnbbr_StarAucID,Cnbbr_StarAucBid,Cnbbr_StarAucDate) values ('"& Uid &"','"&StarAucBid&"','"& TempEndTime &"')"
	end if
	Conn.Execute(Sql)
	Sql="Update Auctions set BBR_AdminCommend=1,BBR_AucComBid="&StarAucBid&",BBR_AucComEndTime='"& TempEndTime &"' where AucID="& UID
	Conn.Execute(Sql)

   HelpTitle="恭喜你!"
   HelpInfo="你的商品首页推荐操作成功!由于系统缓存的原因,可能不会实时生效,推荐时间依次顺延!"
   HelpList="<Ul>" & Vbcrlf
   HelpList=HelpList & "<LI><a href=""BBR_Sell_Auction.asp"">继续推荐其它商品</a></LI>" & Vbcrlf
   HelpList=HelpList & "<LI><a href=""BBRhome.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_SellerIndexCommend.asp?BBR_SellerCommend="&BBR_SellerCommend&""">"& 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=250 class=td align=right>当前已有用户推荐的商品推荐位置:</td>  " & Vbcrlf
	.Write "     <td width=130 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=StarAucBid type=text size=6 value="&StarAucMinimumBid+StarAucBidUnit&"></span> 个"& SYS_WEBMONEY & 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="& Uid &">" & Vbcrlf
	.Write "  <Input type=hidden name=Act value=""auc2"">" & Vbcrlf
	.Write "</form>" & Vbcrlf
	.Write "</table>" & Vbcrlf
      elseif Lcase(Act)="auc2" then





	StarAucBid=Request.Form("StarAucBid")
	if StarAucBid<StarAucMinimumBid+StarAucBidUnit then Call AlertInfo("出错了,当前你的出价不足以获得推荐位置!请重新尝试!","BBR_Sell_Auction.asp",1)
	Cnbbr_UserPay(StarAucBid)
	Sql="Insert into Cnbbr_TempStarAuc (Cnbbr_StarAucID,Cnbbr_StarAucBid,Cnbbr_StarAucDate) values ('"& Uid &"','"&StarAucBid&"','"& TempEndTime &"')"
	Conn.Execute(Sql)
	Sql="Update Auctions set BBR_AdminCommend=1,BBR_AucComBid="&StarAucBid&",BBR_AucComEndTime='"& TempEndTime &"' where AucID="& UID
	Conn.Execute(Sql)

   HelpTitle="恭喜你!"
   HelpInfo="你的商品首页推荐操作成功!由于系统缓存的原因,可能不会实时生效,推荐时间依次顺延!"
   HelpList="<Ul>" & Vbcrlf
   HelpList=HelpList & "<LI><a href=""BBR_Sell_Auction.asp"">继续推荐其它商品</a></LI>" & Vbcrlf
   HelpList=HelpList & "<LI><a href=""BBRhome.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
   
   End if
End if
RsStarAuc.Close
Set RsStarAuc=Nothing

	.Write "    </td>" & Vbcrlf
	.Write "   </tr>" & Vbcrlf
	.Write "  </tbody>" & Vbcrlf
	.Write "</table>" & Vbcrlf
    End With

 Response.Write Cnbbr_Bottom 

 Function Cnbbr_UserPay(MoneyCost)
   Dim Rs_UserMoney
   Sql="Select BBRmoney from users where RegAdmin='N' and BBRMoney>="&MoneyCost&" and RegID="& Request.Cookies(Super_User)("Uid")
   Set Rs_UserMoney=Conn.execute(sql)
   if Rs_UserMoney.Eof or Rs_userMoney.Bof then 
      Call AlertInfo("出错了,你的系统帐户余额不足,请先充值!","CnbbrPay.asp",1)
   else
      Sql="Update Users Set BBRmoney=BBRmoney-"&MoneyCost&" where RegAdmin='N' and RegID="& Request.Cookies(Super_User)("Uid")
      Conn.execute(Sql)
   end if
   Rs_UserMoney.Close
   Set Rs_UserMoney=nothing
 End Function
%>

⌨️ 快捷键说明

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