📄 bbr_shopindexcommend.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)="shop2" then
rndbbrcnbbr=CheckStr(Trim(Request.Form("rndbbrcnbbr")))
if Session("rndbbrcnbbr")<>rndbbrcnbbr then
Session("rndbbrcnbbr")=""
Call AlertInfo("表单参数有误或者重复提交,请返回!","ShopAdmin_Commend.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="shop" or act="shop2") 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_ShopIndexCommend.asp|[menu]|个人店铺首页自助推荐"
SiteMenu_Right=""
Response.Write CnbbrSiteMenu(SiteMenu_Width,SiteMenu_Left,SiteMenu_Right)
Dim StarShopBid
Dim RsStarShop
sql="select ShopId,BBR_ShopCommend,BBR_ShopComBid,BBR_ShopComEndTime from Shops where ShopOwnerID="&Request.Cookies(Super_User)("Uid")&" and Shopid="& uid
set rsStarShop=Server.CreateObject("ADODB.Recordset")
RsStarShop.Open Sql,conn,1,1
CnbbrConnTimes
if RsStarShop.Eof then
Call AlertInfo("出错了,没有找到你需要在首页推荐的店铺!","",0)
else
Dim StarShopCount,StarShopMinimumBid
StarShopCount=0
StarShopMinimumBid=0
Sql="Select * from Cnbbr_TempStarShop Order By Cnbbr_StarShopDate Asc"
Set Rs=Conn.execute(Sql)
if Not Rs.Eof then
Dim TempMinimumBid:TempMinimumBid=100000
Dim TempStarShopID:TempStarShopID=0
Do While Not Rs.Eof
if Clng(UID)=Clng(Rs("Cnbbr_StarShopid")) then Call AlertInfo("出错了,你的店铺当前正处理首页推荐店铺状态!","ShopAdmin_Commend.asp",1)
if Cdbl(TempMinimumBid)>Cdbl(Rs("Cnbbr_StarShopBid")) then
TempMinimumBid=Rs("Cnbbr_StarShopBid")
TempStarShopID=Rs("Cnbbr_StarShopid")
end if
StarShopCount=StarShopCount+1
Rs.MoveNext
Loop
if StarShopCount>=Cnbbr_IndexStarShopPerRow*Cnbbr_IndexStarShopRow then
StarShopCount=Cnbbr_IndexStarShopPerRow*Cnbbr_IndexStarShopRow
StarShopMinimumBid=TempMinimumBid
end if
if Lcase(Act)="shop" then
.Write "<BR>"& Vbcrlf
.Write "<table border=0 cellpadding=0 cellspacing=1 width=""380"" align=center class=tablebg>" & Vbcrlf
.Write "<form name=StarShopform method=post action=""BBR_ShopIndexCommend.asp?BBR_SellerCommend="&BBR_SellerCommend&""">"& Vbcrlf
.Write " <tbody>" & Vbcrlf
.Write " <tr>" & Vbcrlf
.Write " <td colspan=2 height=30 align=center class=titletd>" & Vbcrlf
.Write " <font class=fontcolor_2><b>请确认你的店铺首页自助推荐操作:</b></font>" & 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>"& StarShopCount &"</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>"& StarShopMinimumBid+StarShopBidUnit &"</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=StarShopBid type=text size=6 value="&StarShopMinimumBid+StarShopBidUnit&"></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=""shop2"">" & Vbcrlf
.Write "</form>" & Vbcrlf
.Write "</table>" & Vbcrlf
elseif Lcase(Act)="shop2" then
StarShopBid=Request.Form("StarShopBid")
if StarShopBid<StarShopMinimumBid+StarShopBidUnit then Call AlertInfo("出错了,当前你的出价不足以获得推荐位置!请重新尝试!","ShopAdmin_Commend.asp",1)
Cnbbr_UserPay(StarShopBid)
if Clng(StarShopCount)>=Clng(Cnbbr_IndexStarShopPerRow*Cnbbr_IndexStarShopRow) then
Sql="Update Cnbbr_TempStarShop set Cnbbr_StarShopID="& Uid &",Cnbbr_StarShopBid="&StarShopBid&",Cnbbr_StarShopDate='"& TempEndTime &"' where Cnbbr_StarShopID="& TempStarShopID
else
Sql="Insert into Cnbbr_TempStarShop (Cnbbr_StarShopID,Cnbbr_StarShopBid,Cnbbr_StarShopDate) values ('"& Uid &"','"&StarShopBid&"','"& TempEndTime &"')"
end if
Conn.Execute(Sql)
Sql="Update Shops set BBR_ShopCommend=1,BBR_ShopComBid="&StarShopBid&",BBR_ShopComEndTime='"& TempEndTime &"' where ShopID="& TempStarShopID
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)="shop" then
.Write "<BR>"& Vbcrlf
.Write "<table border=0 cellpadding=0 cellspacing=1 width=""380"" align=center class=tablebg>" & Vbcrlf
.Write "<form name=StarShopform method=post action=""BBR_ShopIndexCommend.asp?BBR_SellerCommend="&BBR_SellerCommend&""">"& Vbcrlf
.Write " <tbody>" & Vbcrlf
.Write " <tr>" & Vbcrlf
.Write " <td colspan=2 height=30 align=center class=titletd>" & Vbcrlf
.Write " <font class=fontcolor_2><b>请确认你的店铺首页自助推荐操作:</b></font>" & 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>"& StarShopCount &"</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>"& StarShopMinimumBid+StarShopBidUnit &"</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=StarShopBid type=text size=6 value="&StarShopMinimumBid+StarShopBidUnit&"></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=""shop2"">" & Vbcrlf
.Write "</form>" & Vbcrlf
.Write "</table>" & Vbcrlf
elseif Lcase(Act)="shop2" then
StarShopBid=Request.Form("StarShopBid")
if StarShopBid<StarShopMinimumBid+StarShopBidUnit then Call AlertInfo("出错了,当前你的出价不足以获得推荐位置!请重新尝试!","ShopAdmin_Commend.asp",1)
Cnbbr_UserPay(StarShopBid)
Sql="Insert into Cnbbr_TempStarShop (Cnbbr_StarShopID,Cnbbr_StarShopBid,Cnbbr_StarShopDate) values ('"& Uid &"','"&StarShopBid&"','"& TempEndTime &"')"
Conn.Execute(Sql)
Sql="Update Shops set BBR_ShopCommend=1,BBR_ShopComBid="&StarShopBid&",BBR_ShopComEndTime='"& TempEndTime &"' where ShopID="& Uid
Conn.Execute(Sql)
HelpTitle="恭喜你!"
HelpInfo="你的店铺首页推荐操作成功!由于系统缓存的原因,可能不会实时生效,推荐时间依次顺延!"
HelpList="<Ul>" & 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
RsStarShop.Close
Set RsStarShop=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 + -