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

📄 bid.asp

📁 AspEase Auction System Ver2.0/动易拍卖系统 Ver2.0
💻 ASP
字号:
<!-- #include file="conn.asp" -->
<!--#include file="inc/check.asp"-->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/info.asp" -->
<%
'=========================================================
'Copyright (C) 2003-2004 AspEase.Com. All rights reserved.
'Web: http://www.aspease.com
'Email: byhucn@126.com,lzz9812@163.com
'=========================================================
'
'FileName: bid.asp
'Version:2.0
'UpdateTime: 2004-10-3 22:01:53
'Script Written by www.aspease.com 
'=========================================================
response.buffer=true
if rst("type")="save" then
getnum=fval(rst("getnum"))
bid_price  =FVal(Rst("bid_price"))
auc_id    = Fval(Rst("auc_id"))
aucItemOwner=fval(rst("aucItemOwner"))
BidderID=userid
	if not chkregValidated then
		response.redirect "info_change.asp"
	end if
	if aucItemOwner = userid then	
		err_msg= err_msg&easebuyyoubuyyours&"<br>"				
	end if
	sql1="select auc_id,auc_CurrentBid,auc_MinimumIncrement,auc_num,auc_numleft,auc_bidtimes from auctions where auc_Id="&sqlval(auc_id)
	set rs=conn.execute(sql1)
	if not rs.eof then
	bidItemID = fval(rs("auc_id"))
	bidtimes=fval(rs("auc_bidtimes"))	
		if getnum > fval(rs("auc_numleft")) then		
			err_msg= err_msg&easebidnumerr&"<font color=red>"&fval(rs("auc_numleft"))&"</font><br>"
		end if
		if bid_price < fval(rs("auc_CurrentBid"))+fval(rs("auc_MinimumIncrement")) then	
			err_msg= err_msg&easebidlowpriceerr		
		end if
		if getnum < 1 or (not isinteger(getnum)) then		
			err_msg= err_msg&easebidnumnoerr	
		end if
	else		
		err_msg= err_msg&easebidnoaucerr	
	end if
	if err_msg<>"" then
		stats=easeerrstats
		header
		aspease_err
		footer
		response.end
	else
		stats=easebidstats
		header
		PlaceBid
		'begin send email 
	
		'end send email		
		suc_msg=easebidsucmsg&"<center><a href=viewitem.asp?aucid="&auc_ID&">"&easebidgoback&"</a></center>"
		aspease_suc
		application.unlock				
	end if
else
	sUser   = user 
	auc_title=rst("auc_title")
	auc_place=rst("auc_place")
	zhifu=rst("zhifu")
	getnum=rst("getnum")
	yunfei=rst("yunfei")
	aucItemOwner=rst("aucItemOwner")
	bid_price  = rst("bid_price")
	auc_id    = rst("auc_id")
	BidderID=fval(userid)
	stats=easebidprestats
	header	
	application.lock	
response.Write(aspeasetable01open & tr)
response.Write(td("760","25","c","","h")&"<b>" & easebidconfirm & "</b>" & ctd("h") & ctr & aspeasetableclose )
response.Write(aspeasetable01open)
response.Write(trw) 
response.Write(td("157","20","r","","d") & easegoodsname & "</td>")
response.Write(td("200","20","l","","d") & "&nbsp;" & auc_title & "</td>")
response.Write(td("174","20","r","","d") & easegoodsplace & "</td>")
response.Write(td("229","20","l","","d") & "&nbsp;" & auc_place & "</td>")
response.Write(ctr & trw)
response.Write(td("157","20","r","","d") & easebidyourbidprice & "</td>")
response.Write(td("200","20","l","","d") & "&nbsp;" & bid_price & "</td>")
response.Write(td("174","20","r","","d") & easeyunfei & "</td>")
response.Write(td("229","20","l","","d") & "&nbsp;" & yunfei & " </td>")
response.Write(ctr& trw)
response.Write(td("157","20","r","","d") & easebidgetnum & "</td>")
response.Write(td("200","20","l","","d") & "&nbsp;" & getnum & "</td>")
response.Write(td("174","20","r","","d") & easezhifu & "</td>")
response.Write(td("229","20","l","","d") & "&nbsp;" & zhifu & "</td>")
response.Write(ctr&aspeasetableclose)
response.Write("<br>")
response.Write(aspeasetablewopen)
response.Write(" <form  method=post action=bid.asp?type=save> ")
response.Write("<input type=""hidden"" name=""bid_price"" value='" & bid_price & "'>")
response.Write("<input type=""hidden"" name=""getnum"" value='" & getnum & "'>")
response.Write("<input type=""hidden"" name=""auc_id"" value='" & auc_id & "'>")
response.Write("<input type=""hidden"" name=""bidItemID"" value='" & bidItemID & "'>")
response.Write("<input type=hidden name=""aucItemOwner"" value=""" & aucItemOwner & """>")
response.Write(" <tr align=""center""> ")
response.Write("    <td>")
response.Write("      <input name=""bt13"" type=submit id=""b1"" STYLE=""color: white;border-color: #CECBCE; background-color: #EF7508;"" o1nClick=""calc()"" value=""" & easebidokbtn & """ >")
response.Write("      <input name=""bt132"" type=button id=""b1"" style=""color: white;border-color: #CECBCE; background-color: #EF7508;"" o1nclick=""calc()"" value=""" & easebidcancelbtn & """ onclick=""javascript:history.back();"">      </td>")
response.Write("  </tr></form>")
response.Write(aspeasetableclose)
end if
call activeonline()
footer
Sub PlaceBid	
	pbSQL = "UPDATE Auctions Set " & _
	        " auc_CurrentBid = " & SQLVal(bid_price) & _
	        " , auc_CurrentBidder = " & SQLVal(BidderID) & " " & _
		" , auc_bidtimes = auc_bidtimes + 1" & _
	        " WHERE auc_ID = " & SQLVal(auc_id)
	conn.Execute(pbSQL)
	
	upBidsSQL = "INSERT INTO Bids (bidItemID,BidAmount,BidDate,bidBidderID,bidsellerid,bidnum) VALUES( " & _
	            SQLVal(auc_ID) & ", " & _
		    	SQLVal(bid_price) & ", '" & _
	            NOW()& "', " & _
	            SQLVal(BidderID) & " ," & _
		    SQLval(aucItemOwner) & " ," & _
		    SQLVal(getnum) & ") "
	conn.Execute(upBidsSQL)			
End Sub
'=========================================================
'Copyright (C) 2003-2004 AspEase.Com. All rights reserved.
'Web: http://www.aspease.com
'Email: byhucn@126.com,lzz9812@163.com
'=========================================================
'
'FileName: bid.asp
'Version:2.0
'UpdateTime: 2004-10-3 22:01:53
'Script Written by www.aspease.com 
'=========================================================%>

⌨️ 快捷键说明

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