📄 bbr_shopcommend.asp
字号:
<!-- #include file="SysConfig.asp" -->
<!-- #include file="checkAdmin.asp" -->
<!-- #include file="../Inc/Md5.asp" -->
<!-- #include file="../Inc/DataUpdate_Application.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)="shop2" 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 UID
uid=Replace(Trim(Request.Form("id"))," ","")
if Not(act="shop" or act="shop2") then Call AlertInfo("出错了,参数传递有误!请重新尝试!","index.asp",1)
Dim ShopComStatus
ShopComStatus=CheckStr(Trim(Rst("Status")))
if Not isNum(ShopComStatus) then Call ALertInfo("出错了,参数传递有误,请重新尝试!","",0)
if ShopComStatus=0 then
Sql="Delete"& SqlDiff &"from Cnbbr_TempStarShop Where Cnbbr_StarShopID in ("& Uid &")"
Conn.execute(Sql)
Sql="Update Shops Set BBR_ShopCommend=0 Where ShopID in ("& Uid &")"
Conn.execute(Sql)
Call AlertInfo("成功取消店铺的首页推荐!","Search_Shop.asp",1)
else
if Not isNum(Uid) then Call AlertInfo("出错了,你所推荐的店铺参数有误,请重新尝试!","",0)
end if
Dim TempEndTime
TempEndTime=Cdate(DateAdd("d",BBR_CommendDay,Now()))
With Response
.Write "<table border=0 cellpadding=0 cellspacing=0 width=100% align=center class=td>" & Vbcrlf
.Write " <tbody>"& Vbcrlf
.Write " <tr>"& Vbcrlf
.Write " <td align=left valign=top>"& Vbcrlf
.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=""index.asp"" Class=menuColor_1>首页</a> > <a href=""bbrhome.asp"" Class=menuColor_1>个人面板</a> > 店铺首页自助推荐平台</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 StarShopBid
Dim RsStarShop
sql="select ShopId,BBR_ShopCommend,BBR_ShopComBid,BBR_ShopComEndTime from Shops where Shopid in ("& 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 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="""& Cnbbr_CurrentPath &""">"& 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>"& 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=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=StarShopBid value="& StarShopMinimumBid+StarShopBidUnit &">" & Vbcrlf
.Write " <Input type=hidden name=id value="& Uid &">" & Vbcrlf
.Write " <Input type=hidden name=Act value=""shop2"">" & Vbcrlf
.Write " <Input type=hidden name=Status value="& ShopComStatus &">" & Vbcrlf
.Write "</form>" & Vbcrlf
.Write "</table>" & Vbcrlf
elseif Lcase(Act)="shop2" then
StarShopBid=Request.Form("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="& UID
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="& BBR_SellerCommend &",BBR_ShopComBid="&StarShopBid&",BBR_ShopComEndTime='"& TempEndTime &"' where ShopID="& UID
Conn.Execute(Sql)
CnbbrStarShop
HelpTitle="恭喜你!"
HelpInfo="你的店铺首页推荐操作成功!由于系统缓存的原因,可能不会实时生效,推荐时间依次顺延!"
HelpList="<Ul>" & Vbcrlf
HelpList=HelpList & "<LI><a href=""Search_Shop.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("出错了,参数传递有误!请重新尝试!","",0)
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="""& Cnbbr_CurrentPath &""">"& 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>"& 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=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=StarShopBid value="& StarShopMinimumBid+StarShopBidUnit &">" & Vbcrlf
.Write " <Input type=hidden name=id value="& Uid &">" & Vbcrlf
.Write " <Input type=hidden name=Act value=""shop2"">" & Vbcrlf
.Write " <Input type=hidden name=Status value="& ShopComStatus &">" & Vbcrlf
.Write "</form>" & Vbcrlf
.Write "</table>" & Vbcrlf
elseif Lcase(Act)="shop2" then
StarShopBid=Request.Form("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="& BBR_SellerCommend &",BBR_ShopComBid="&StarShopBid&",BBR_ShopComEndTime='"& TempEndTime &"' where ShopID="& Uid
Conn.Execute(Sql)
CnbbrStarShop
HelpTitle="恭喜你!"
HelpInfo="店铺首页推荐操作成功!由于系统缓存的原因,可能不会实时生效,推荐时间依次顺延!"
HelpList="<Ul>" & Vbcrlf
HelpList=HelpList & "<LI><a href=""Search_Shop.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("出错了,参数传递有误!请重新尝试!","",0)
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
Rs.Close
Set Rs=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -