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

📄 save_bid.asp

📁 一个不错的拍卖网站,fdsafdsfdfe
💻 ASP
字号:
<!-- #include file="inc/info.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="conn.asp" -->


<%response.buffer=true
call header()
sUser   = session("user") 

auc_title=rst("auc_title")
auc_place=rst("auc_place")
zhifu=rst("zhifu")
getnum=rst("getnum")
yunfei=rst("yunfei")
 bid_price  =Rst("bid_price")
    auc_id    = FVal(Rst("auc_id"))
aucItemOwner=trim(rst("aucItemOwner"))
	
	application.lock
	sql ="select regid from users where regusername='"&suser&"'"
	
set rs=conn.execute(sql)

if not rs.eof then
BidderID=rs("regid")
	if aucItemOwner =trim(rs("regid")) then
		response.write "你是商品的出售者,是不参加竞拍的!"
		footer
		response.end
		rs.close
		set rs=nothing
	else


		sql1="select aucid,aucCurrentBid,aucnum,bidtimes from auctions where aucItemTitle='"&auc_title&"'"
		set rs=conn.execute(sql1)
			if not rs.eof then
				bidItemID= rs("aucid")
				bidtimes=rs("bidtimes")
					if cdbl(bid_price) <= cdbl(rs("aucCurrentBid")) or bid_price=""  then
						response.write "<center><font color=red>您的出价必须比现价和竞价梯度高!!!</font></center>"
						call footer()
						response.end 
					end if
					if cdbl(getnum) > cdbl(rs("aucnum")) then
						response.write "<center>您填写的数量不能大于可购数量<font color=red>"&rs("aucnum")&"</font></center>"
						call footer()
						response.end 
					end if


			end if
			
	end if
end if

PlaceBid

response.write "<center>出价成功!<br><a href="&weburl&"viewaucid.asp?aucid="&auc_ID&">返回商品页面</a></center>"
application.unlock
call footer()
Sub PlaceBid

		
	pbSQL = "UPDATE Auctions Set " & _
	        " aucCurrentBid = " & SQLVal(bid_price) & _
	        " , aucCurrentBidder = " & SQLVal(BidderID) & " " & _
		" , bidtimes = "&bidtimes + 1& " " & _
	        " WHERE aucID = " & SQLVal(auc_id)
	conn.Execute(pbSQL)
	
	upBidsSQL = "INSERT INTO Bids (bidItemID,BidAmount,BidDate,bidBidderID,bidnum) VALUES( " & _
	            SQLVal(bidItemID) & ", " & _
				SQLVal(bid_price) & ", '" & _
	            NOW()& "', " & _
	            SQLVal(BidderID) & " ," & _
				SQLVal(getnum) & ") "
	conn.Execute(upBidsSQL)

	
		
	
End Sub
%>


⌨️ 快捷键说明

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