📄 sellauc.asp
字号:
<!--#include file="sysconfig.asp"-->
<!--#include file="checkadmin.asp"-->
<%
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
if Regstep=1 then Call AlertInfo("操作失败,请先选择商品拍卖方式1!","",0)
Dim sType,TempTypeName
sType=CheckStr(Trim(Request("stype")))
if not isNum(sType) then Call AlertInfo("操作失败,请先选择正确的商品拍卖方式!","",0)
if sType=1 then
TempTypeName="拍卖"
elseif sType=2 then
TempTypeName="一口价"
else
Call AlertInfo("操作失败,请先选择正确的商品拍卖方式!","",0)
end if
Dim RegAct
RegAct=CheckStr(Trim(Request.Form("RegAct")))
if Not isNum(RegAct) then
RegAct=0
else
RegAct=Clng(RegAct)
if RegAct<1 or RegAct>2 then RegAct=0
end if
Dim EditAct
EditAct=CheckStr(Trim(Request.Form("EditAct")))
if Not isNum(EditAct) then EditAct=0
Dim eEditAct,eName,eType,eClassPath,eAucBuyPrice,eAucStartPrice,eAucMiniIncrement,eAucReservePrice,eAucTotalNum,eAucNum,eAucOldNew,eContent,eCloseTime,eAucPayStyle,ePayForTM,eAucTM1,eAucTM2
eEditAct=0
Dim AucID
AucID=CheckStr(Trim(Request("AucID")))
if isNum(AucID) then
Dim RsEditAuc
Sql="Select AucItemTitle,AucType,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")
eClassPath=RsEditAuc("BBR_CLassPath")
eAucBuyPrice=RsEditAuc("AucBuyPrice")
eAucStartPrice=RsEditAuc("AucStartingBId")
eAucMiniIncrement=RsEditAuc("AucMinimumIncrement")
eAucReservePrice=RsEditAuc("AucReservePrice")
eAucTotalNum=RsEditAuc("AucTotalNum")
eAucNum=RsEditAuc("AucNum")
eAucOldNew=RsEditAuc("BBR_AucOldNew")
eContent=ReHtmlEncode(RsEditAuc("AucDescription"))
eCloseTime=RsEditAuc("AucCloseDate")
eAucPayStyle=RsEditAuc("BBR_AucPayStyle")
ePayForTM=RsEditAuc("BBR_PayForTM")
eAucTM1=RsEditAuc("BBR_AucTM1")
eAucTM2=RsEditAuc("BBR_AucTM2")
RsEditAuc.Close
Set RsEditAuc=nothing
eEditAct=1
end if
if RegStep=3 And RegAct=2 then
Call Cnbbr_CheckPost(0)
Dim RepeatSell
RepeatSell=CheckStr(Trim(Request.Cookies(Super_User)("BBRRndSellCode")))
if RepeatSell="" then
SellAuc
else
if Not isDate(RepeatSell)then
Call AlertInfo("操作异常,请返回重新填写!","",0)
else
if Clng(DateDiff("s",RepeatSell,now()))<60 then
Call AlertInfo("出错了,商品发布速度过快,请返回先休息一下!","",0)
else
SellAuc
end if
end if
end if
Sub SellAuc()
Dim sName,sType,sYkj,sStartPrice,sMiniIncrement,sReservePrice,sAmount,sOldNew,sDays,sContent
sName=HtmlEncode(CheckStr(Trim(Request.Form("sName"))))
sType=CheckStr(Trim(Request.Form("sType")))
sStartPrice=CheckStr(Trim(Request.Form("sStartPrice")))
sMiniIncrement=CheckStr(Trim(Request.Form("sMiniIncrement")))
sReservePrice=CheckStr(Trim(Request.Form("sReservePrice")))
sYkj=CheckStr(Trim(Request.Form("sYkj")))
sAmount=CheckStr(Trim(Request.Form("sAmount")))
sOldNew=CheckStr(Trim(Request.Form("sOldNew")))
sDays=CheckStr(Trim(Request.Form("sDays")))
sContent=CheckStr(Trim(Request.Form("sContent")))
if Len(sName)<2 then Call AlertInfo("操作失败,你填写的商品名称长度必须大于2个字符!","",0)
if Len(sContent)<2 then Call AlertInfo("操作失败,你填写的商品描述长度必须大于2个字符!","",0)
if not isNum(sType) then Call AlertInfo("操作失败,请选择正确的商品拍卖方式!","",0)
if sType=1 then
if not isNum(sStartPrice) then Call AlertInfo("操作失败,商品起拍价格必须填写数字!","",0)
if not isNum(sMiniIncreMent) then Call AlertInfo("操作失败,商品价格最小加价幅度必须填写数字!","",0)
if not isNum(sReservePrice) then Call AlertInfo("操作失败,商品保留价格必须填写数字!","",0)
elseif sType=2 then
if not isNum(sYkj) then Call AlertInfo("操作失败,商品一口价价格必须填写数字!","",0)
else
Call AlertInfo("操作失败,请选择正确的商品拍卖方式!","",0)
end if
if not isNum(sAmount) then Call AlertInfo("操作失败,商品数量必须填写数字!","",0)
if not isNum(sOldNew) then Call AlertInfo("操作失败,请选择正确的商品新旧程度!","",0)
Dim BBR_S1,BBR_S2,BBR_S3,BBR_S4,BBR_ClassPath
BBR_S1=CheckStr(Trim(Rst("S1")))
BBR_S2=CheckStr(Trim(Rst("S2")))
BBR_S3=CheckStr(Trim(Rst("S3")))
BBR_S4=CheckStr(Trim(Rst("S4")))
if Not isNum(BBR_S1) then BBR_S1=0
if Not isNum(BBR_S2) then BBR_S2=0
if Not isNum(BBR_S3) then BBR_S3=0
if Not isNum(BBR_S4) then BBR_S4=0
BBR_ClassPath=Cstr(BBR_S1&"|"&BBR_S2&"|"&BBR_S3&"|"&BBR_S4)
BBR_ClassPath=Replace(BBR_ClassPath,"|0","")
if Cstr(BBR_ClassPath)="0" then Call AlertInfo("请选择商品所属分类!","",0)
Dim AucStartTime,AucCloseTime
AucStartTime=Now()
if isDate(eCloseTime) then AucStartTime=eCloseTime
AucCloseTime=DateAdd("d",sDays,AucStartTime)
Dim sAucPayStyle,sPayForTM,sAucTM1,sAucTM2
sAucPayStyle=CheckStr(Trim(Request.Form("sAucPayStyle")))
sPayForTM=CheckStr(Trim(Request.Form("sPayForTM")))
sAucTM1=CheckStr(Trim(Request.Form("sAucTM1")))
sAucTM2=CheckStr(Trim(Request.Form("sAucTM2")))
if Not isNum(sAucPayStyle) then Call AlertInfo("操作失败,请选择正确的商品付款方式!","",0)
if Not isNum(sPayForTM) then Call AlertInfo("操作失败,请选择正确的商品运费支付方式!","",0)
if Not isNum(sAucTM1) then Call AlertInfo("操作失败,请选择正确的商品平邮费用!","",0)
if Not isNum(sAucTM2) then Call AlertInfo("操作失败,请选择正确的商品快递费用!","",0)
if isNum(AucID) and EditAct=1 then
if sType=1 then
Sql="Update Auctions Set AucItemTitle='"& sName &"',BBR_ClassPath='"& BBR_ClassPath &"',AucCurrentBid="& sStartPrice &",AucStartingBid="& sStartPrice &",AucMinimumIncrement="& sMiniIncrement &",AucReservePrice="& sReservePrice &",AucTotalNum=(AucTotalNum-AucNum)+"& sAmount &",AucNum="& sAmount &",BBR_AucOldNew="& sOldNew &",aucDescription='"& sContent &"',aucCloseDate='"& AucCloseTime &"',BBR_AucPayStyle="& sAucPayStyle &",BBR_PayForTM="& sPayForTM &",BBR_AucTM1="& sAucTM1 &",BBR_AucTM2="& sAucTM2 &" where AucID="& AucID
else
Sql="Update Auctions Set AucItemTitle='"& sName &"',BBR_ClassPath='"& BBR_ClassPath &"',AucCurrentBid="& sYkj &",AucBuyPrice="& sYkj &",AucTotalNum=(AucTotalNum-AucNum)+"& sAmount &",AucNum="& sAmount &",BBR_AucOldNew="& sOldNew &",aucDescription='"& sContent &"',aucCloseDate='"& AucCloseTime &"',BBR_AucPayStyle="& sAucPayStyle &",BBR_PayForTM="& sPayForTM &",BBR_AucTM1="& sAucTM1 &",BBR_AucTM2="& sAucTM2 &" where AucID="& AucID
end if
else
Call AlertInfo("操作异常,请返回重新填写!","",0)
end if
Conn.Execute(Sql)
if Err then
Call AlertInfo("操作异常,请返回重新填写!","",0)
else
Dim LastAucID
if isNum(AucID) and EditAct=1 then
LastAucID=AucID
Response.Cookies(Super_User)("BBRRndSellCode")=now()
session("aucitemtitle")=sName
session("aucid")=LastAucID
Call AlertInfo("恭喜你,商品信息更新成功~~","Search_Auction.asp" ,1)
end if
end if
End Sub
else
Dim EditActionStr
if eEditAct=1 then EditActionStr=""
With Response
.Write"<table width=98% border=0 align=center cellpadding=0 cellspacing=0>"& vbcrlf
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -