📄 saveaucbid.asp
字号:
<!-- #include file="top_cnbbr.asp" -->
<!-- #include file="ChkSession.asp" -->
<%
Cnbbr_CheckPost(0)
Dim RegStep
RegStep=CheckStr(Trim(Request("RegStep")))
if Not isNum(RegStep) then
RegStep=1
else
RegStep=Clng(RegStep)
if RegStep>3 or RegStep<1 then RegStep=1
end if
Dim BuyAct,BuyStatus
BuyStatus=0
BuyAct=CheckStr(Trim(Request.Form("BuyAct")))
Dim ReUp_AucNum,ReUp_TransStyle,ReUp_Price
ReUp_AucNum=CheckStr(Trim(Request.Form("BuyAmount")))
ReUp_TransStyle=CheckStr(Trim(Request.Form("AucTM")))
ReUp_Price=CheckStr(Trim(Request.Form("BidPrice")))
if Not isNum(ReUp_Price) then Call AlertInfo("出错了,你的出价必须填写数字!","",0)
if ReUp_Price<=0 then Call AlertInfo("出错了,请返回重新购买!","",0)
Dim eEditAct,eName,eType,eAucOwnerID,eClassPath,eAucStartPrice,eAucBuyPrice,eAucCurrentBid,eAucMiniIncrement,eAucReservePrice,eBidTimes,eYkjBidTimes,eAucTotalNum,eAucNum,eAucOldNew,eContent,eCloseTime,eAucPayStyle,ePayForTM,eAucTM1,eAucTM2
Dim TempTypeName
Dim AucID
AucID=CheckStr(Trim(Request("AucID")))
if Not isNum(AucID) then Call AlertInfo("出错了,没有找到此商品信息,请返回!","",0)
Dim RsEditAuc
Sql="Select AucItemTitle,AucType,AucItemOwner,BBR_ClassPath,AucCurrentBid,AucBuyPrice,AucStartingBid,AucMinimumIncrement,AucReservePrice,AucTotalNum,AucNum,BBR_AucOldNew,aucDescription,aucAvailDate,AucCloseDate,AucEnded,AucItemOwner,BBR_AlipayStatus,BidTimes,ykjBidTimes,BBR_AucPayStyle,BBR_PayForTM,BBR_AucTM1,BBR_AucTM2 from auctions where Aucended='N' and BBR_Auc_Success=0 and AucID="& AucID
Set RsEditAuc=Server.CreateObject("ADODB.RecordSet")
RsEditAuc.Open Sql,conn,1,1
if RsEditAuc.Eof then Call AlertInfo("出错了,此商品已经过期或者已经被删除!","",0)
eName=RsEditAuc("AucItemTitle")
eType=RsEditAuc("AucType")
if eType=1 then
TempTypeName="拍卖"
ReUp_AucNum=1
elseif eType=2 then
TempTypeName="一口价"
if Not isNum(ReUp_AucNum) then Call AlertInfo("出错了,你需要购买的商品数量必须填写数字!","",0)
else
Call AlertInfo("操作失败,请先选择正确的商品拍卖方式!","AucInfo.asp?AucID="& AucID,1)
end if
if ReUp_AucNum<1 then Call AlertInfo("出错了,你需要购买的商品数量有误,请返回!","",0)
eAucOwnerID=RsEditAuc("AucItemOwner")
if Clng(eAucOwnerID)=Clng(LoginedUserID) then Call AlertInfo("对不起,你是商品卖家不能参与竞价购买!","AucInfo.asp?AucID="& AucID,1)
eClassPath=RsEditAuc("BBR_CLassPath")
eAucBuyPrice=RsEditAuc("AucBuyPrice")
eAucStartPrice=RsEditAuc("AucStartingBid")
eAucCurrentBid=RsEditAuc("AucCurrentBid")
eAucMiniIncrement=RsEditAuc("AucMinimumIncrement")
eBidTimes=RsEditAuc("BidTimes")
if ReUp_Price<eAucCurrentBid or ReUp_Price<eAucBuyPrice then Call AlertInfo("出错了,你的出价不得低于现价,请返回重新填写!","",0)
if eType=1 and eBidTimes>0 and Cdbl(ReUp_Price)<Cdbl(eAucCurrentBid+eAucMiniIncrement) then Call AlertInfo("出错了,你的出价太低,请返回重新填写!","",0)
if eType=1 and eBidTimes=0 and Cdbl(ReUp_Price)<Cdbl(eAucCurrentBid) then Call AlertInfo("出错了,你的出价太低,请返回重新填写!","",0)
eAucReservePrice=RsEditAuc("AucReservePrice")
eAucTotalNum=RsEditAuc("AucTotalNum")
eAucNum=RsEditAuc("AucNum")
if Clng(ReUp_AucNum)>Clng(eAucNum) then Call AlertInfo("出错了,你需要购买的商品数量超过了商品的现有数量!","",0)
eAucOldNew=RsEditAuc("BBR_AucOldNew")
eCloseTime=RsEditAuc("AucCloseDate")
if DateDiff("s",eCloseTime,now())>0 then Call AlertInfo("商品已过期,不允许再购买!","",0)
eAucPayStyle=RsEditAuc("BBR_AucPayStyle")
ePayForTM=RsEditAuc("BBR_PayForTM")
if ePayForTM=2 then
if Not isNum(ReUp_TransStyle) then Call AlertInfo("出错了,你选择的物品配送方式错误,请返回!","",0)
if clng(ReUp_TransStyle)<1 or clng(ReUp_TransStyle)>2 then Call AlertInfo("出错了,你选择的物品配送方式错误,请返回!","",0)
end if
eAucTM1=RsEditAuc("BBR_AucTM1")
eAucTM2=RsEditAuc("BBR_AucTM2")
RsEditAuc.Close
Set RsEditAuc=nothing
if BuyAct="Act" then
Dim RepeatSell
RepeatSell=CheckStr(Trim(Request.Cookies(Super_User)("BBRRndBuyCode")))
if RepeatSell="" then
BuyAuc
else
if Not isDate(RepeatSell)then
Call AlertInfo("操作异常,请返回重新填写!","AucInfo.asp?AucID="& AucID,1)
else
if Clng(DateDiff("s",RepeatSell,now()))<60 then
Call AlertInfo("出错了,你的出价速度太快,请返回先休息一下!","",0)
else
BuyAuc
end if
end if
end if
Sub BuyAuc()
if eType=1 then
Sql="Insert into bids (BidItemID,BidAmount,BidDate,BidBidderID,BidNum,BidStatus) values ("& AucID &","& ReUp_Price &","& SqlNowString &","& LoginedUserID &","& ReUp_AucNum &",1)"
Conn.Execute(Sql)
Sql="Update Bids Set BidStatus=0 Where BidAmount<"& ReUp_Price &" and BidItemID="& AucID
Conn.Execute(Sql)
Sql="Update Auctions Set BidTimes=BidTimes+1,aucCurrentBid="& ReUp_Price &" where Aucended='N' and BBR_Auc_Success=0 and aucID="& AucID
Conn.Execute(Sql)
if Err then
Call AlertInfo("出错了,请返回重新购买!","AucInfo.asp?AucID="& AucID,1)
else
BuyStatus=1
Response.Cookies(Super_User)("BBRRndBuyCode")=now()
end if
elseif eType=2 then
Sql="Insert into Ykjbids (YkjBidItemID,YkjBidAmount,YkjBidDate,YkjBidSellerID,YkjBidBidderID,YkjBidNum) values ("& AucID &","& eAucCurrentBid &","& SqlNowString &","& eAucOwnerID &","& LoginedUserID &","& ReUp_AucNum &")"
Conn.Execute(Sql)
if ReUp_AucNum=eAucNum then
Sql="Update Auctions Set AucEnded='Y' and BBR_Auc_Success=1 and AucNum=0,YkjBidTimes=YkjBidTimes+1 where Aucended='N' and BBR_Auc_Success=0 and aucID="& AucID
else
Sql="Update Auctions Set AucNum=AucNum-"& ReUp_AucNum &",YkjBidTimes=YkjBidTimes+1,aucCurrentBid="& ReUp_Price &" where Aucended='N' and BBR_Auc_Success=0 and aucID="& AucID
end if
Conn.Execute(Sql)
sql="insert into cnBBR_Appraise (Cnbbr_aAucID,Cnbbr_aAucItemTitle,Cnbbr_aAucOwnerID,Cnbbr_aAucBuyerId,Cnbbr_aAucBid,Cnbbr_aAucDate,Cnbbr_aOwnerCredit,Cnbbr_aOwnerContent,Cnbbr_aOwnerDate,Cnbbr_aOwnerStatus,Cnbbr_aBuyerCredit,Cnbbr_aBuyerContent,Cnbbr_aBuyerDate,Cnbbr_aBuyerStatus)" & _
" values ("& AucID &", '"& eName &"', "& eAucOwnerID &", "& LoginedUserID &","& ReUp_Price &","& SqlNowString &", 0,'未评价', '"& now() &"',0, 0,'未评价', "& SqlNowString &",0)"
Conn.Execute(Sql)
Call EmailForAuc(eName,AucID,eAucOwnerID,LoginedUserID)
if Err then
Call AlertInfo("出错了,请返回重新购买!","AucInfo.asp?AucID="& AucID,1)
else
BuyStatus=1
Response.Cookies(Super_User)("BBRRndBuyCode")=now()
end if
else
Call AlertInfo("出错了,请返回重新购买!","AucInfo.asp?AucID="& AucID,1)
end if
end Sub
end if
Response.Write Cnbbr_Head
Dim SiteMenu_Width,SiteMenu_Left,SiteMenu_Right
SiteMenu_Width=SYS_BodyCenterWidth
SiteMenu_Left="Auc_Class_BBR.asp|[menu]|购买商品||[menu]||###|[menu]|确认需要购买的商品信息"
SiteMenu_Right=""
Response.Write CnbbrSiteMenu(SiteMenu_Width,SiteMenu_Left,SiteMenu_Right)
%>
<!-- 商品信息发布导航条 -->
<table align="center" border="0" cellpadding="2" cellspacing="2" width="<%=SYS_BodyCenterWidth%>" class="td">
<tbody>
<tr>
<td width="55%"><img src="Images/Spacer.gif" border="0" alt=""></td>
<%
Dim TempRegStepStr
if RegStep=1 then
TempRegStepStr="<td width=""15%"" class=""orangeSpace"">1、确认购买信息</td>"& Vbcrlf &_
"<td width=""15%"" class=""graySpace"">2、出价购买成功</td>"& Vbcrlf &_
"<td width=""15%"" class=""graySpace"">3、收货&评价卖家</td>"& Vbcrlf
elseif RegStep=2 then
TempRegStepStr="<td width=""15%"" class=""graySpace"">1、确认购买信息</td>"& Vbcrlf &_
"<td width=""15%"" class=""orangeSpace"">2、出价购买成功</td>"& Vbcrlf &_
"<td width=""15%"" class=""graySpace"">3、收货&评价卖家</td>"& Vbcrlf
elseif RegStep=3 then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -