📄 buy.asp
字号:
<!-- #include file="conn.asp" -->
<!--#include file="inc/check.asp"-->
<!-- #include file="inc/info.asp" -->
<!-- #include file="inc/const.asp" -->
<%
'=========================================================
'Copyright (C) 2003-2004 AspEase.Com. All rights reserved.
'Web: http://www.aspease.com
'Email: byhucn@126.com,lzz9812@163.com
'=========================================================
'
'FileName: buy.asp
'Version:2.0
'UpdateTime: 2004-10-3 22:14:23
'Script Written by www.aspease.com
'=========================================================
activeonline
if rst("submit")<>"" and rst("action")="save" then
auc_title=rst("auc_title")
auc_place=rst("auc_place")
zhifu=rst("zhifu")
getnum=FVal(rst("getnum"))
yunfei=rst("yunfei")
sbuyprice =FVal(Rst("ykj"))
auc_id = FVal(Rst("auc_id"))
aucItemOwner=FVal(rst("aucItemOwner"))
set chkauc=conn.execute("select auc_ended from auctions where auc_id="&auc_id)
if chkauc(0)="Y" then
stats=easeerrmsgname
err_msg= "<b><li>"&easebuywhichclosed&"</b>"
call header()
aspease_err
footer
response.end
end if
application.lock
sql ="select regid,regemail from users where regusername='"&user&"'"
set rs=conn.execute(sql)
if not rs.eof then
BidderID=FVal(rs("regid"))
if aucItemOwner =BidderID then
stats=easeerrmsgname
err_msg= "<b><li>"&easebuyyoubuyyours&"</b>"
call header()
aspease_err
footer
response.end
end if
end if
'save data
pbSQL = "UPDATE Auctions Set " & _
" auc_numleft = auc_numleft- " & SQLVal(getnum) & _
" , auc_bidtimes = auc_bidtimes + 1" & _
" WHERE auc_ID = " & SQLVal(auc_id)
conn.Execute(pbSQL)
upBuySQL = "INSERT INTO gets (get_ItemID,get_Amount,get_Date,get_buyerID,get_num,get_sellerid,get_type) VALUES( " & _
SQLVal(auc_id) & ", " & _
SQLVal(sbuyprice) & ", '" & _
sqldate(NOW())& "', " & _
SQLVal(BidderID) & " ," & _
SQLVal(getnum) & " ," & _
SQLVAL(aucItemOwner) &", 1 ) "
conn.Execute(upBuySQL)
chksql="select auc_numleft from auctions where auc_id="&SQLVal(auc_id)
set rschk=conn.execute(chksql)
if FVal(rschk("auc_numleft"))=0 then
conn.execute("update auctions set auc_ended='Y',auc_CloseDate='"&sqldate(now)&"' where auc_id="&SQLVal(auc_id))
end if
rschk.close
set rsliu=conn.execute("select * from users where regid="&SQLVAL(aucItemOwner))
email=rs("regemail")
'begin send email
'end send email
stats=easebuygetitname
header
suc_msg= "<center>"&easebuygetitname&"<br>"&sendmsg&"<a href=viewitem.asp?aucid="&FVal(auc_ID)&">"&easebidgoback&"</a></center>"
aspease_suc
application.unlock
call footer()
response.End()
end if
stats=easebuyconfirmstats
header
sqlget = "select regValidated from users where regValidated='Y' and regusername='" &user&"'"
set rsget =conn.execute(sqlget)
if rsget.eof then
response.redirect "info_change.asp"
else
auc_title=rst("auc_title")
auc_place=rst("auc_place")
zhifu=rst("zhifu")
getnum=FVal(rst("getnum"))
yunfei=rst("yunfei")
aucItemOwner=FVal(rst("aucItemOwner"))
sbuyprice = FVal(rst("ykj"))
auc_id = FVal(rst("auc_id"))
end if
response.Write(aspeasetable01open & tr)
response.Write(" <th align=""center"" id=""bg14"" height=""25"">")
response.Write(easebuychkthname)
response.Write("</th>")
response.Write(ctr & aspeasetableclose)
response.Write(aspeasetable01open & trw)
response.Write(" <td width=""164"" height=""20"" align=""right"">")
response.Write(easegoodsname)
response.Write("</td> ")
response.Write(" <td width=""191"" height=""20"" align=""left""> ")
response.Write(auc_title)
response.Write("</td> ")
response.Write(" <td width=""143"" height=""20"" align=""right"">")
response.Write(easegoodsplace)
response.Write("</td> ")
response.Write(" <td width=""225"" height=""20"" align=""left""> ")
response.Write(auc_place)
response.Write(ctdr & trw)
response.Write(" <td width=""164"" height=""20"" align=""right"">")
response.Write(easebidyourbidprice)
response.Write("</td> ")
response.Write(" <td width=""191"" height=""20"" align=""left""> ")
response.Write(sbuyprice)
response.Write("</td> ")
response.Write(" <td width=""143"" height=""20"" align=""right"">")
response.Write(easeyunfei)
response.Write("</td> ")
response.Write(" <td height=""20""align=""left""> ")
response.Write(yunfei)
response.Write(ctdr&trw)
response.Write(" <td width=""164"" height=""20"" align=""right"">")
response.Write(easebidgetnum)
response.Write("</td> ")
response.Write(" <td width=""191"" height=""20"" align=""left""> ")
response.Write(getnum)
response.Write("</td> ")
response.Write(" <td width=""143"" height=""20"" align=""right"">")
response.Write(easezhifu)
response.Write("</td> ")
response.Write(" <td height=""20"" align=""left""> ")
response.Write(zhifu)
response.Write(ctdr&aspeasetableclose)
response.Write(aspeasetablewopen)
response.Write(" <form method=post action=buy.asp?action=save> ")
response.Write("<input type=""hidden"" name=""auc_title"" value='")
response.Write(auc_title)
response.Write("'>")
response.Write("<input type=""hidden"" name=""auc_place"" value='")
response.Write(auc_place)
response.Write("'>")
response.Write("<input type=""hidden"" name=""ykj"" value='")
response.Write(sbuyprice)
response.Write("'>")
response.Write("<input type=""hidden"" name=""getnum"" value='")
response.Write(getnum)
response.Write("'>")
response.Write("<input type=""hidden"" name=""zhifu"" value='")
response.Write(zhifu)
response.Write("'>")
response.Write("<input type=""hidden"" name=""yunfei"" value='")
response.Write(yunfei)
response.Write("'>")
response.Write("<input type=""hidden"" name=""auc_id"" value='")
response.Write(auc_id)
response.Write("'>")
response.Write("<input type=""hidden"" name=""bidItemID"" value='")
response.Write(bidItemID)
response.Write("'>")
response.Write("<input type=""hidden"" name=""bidItemsonID""value='")
response.Write(bidItemsonID)
response.Write("'>")
response.Write("<input type=""hidden"" name=""BidderID"" value='")
response.Write(BidderID)
response.Write("'>")
response.Write("<input type=hidden name=""aucItemOwner"" value=""")
response.Write(aucItemOwner)
response.Write(""">")
response.Write(" <tr align=""center""> ")
response.Write(" <td>")
response.Write(" <input name=""submit"" type=submit id=""b1"" STYLE=""color: white;border-color: #CECBCE; background-color: #EF7508;"" value=""")
response.Write(easebuyokbtn)
response.Write(""" >")
response.Write(" <input name=""bt132"" type=button id=""b1"" style=""color: white;border-color: #CECBCE; background-color: #EF7508;"" value=""")
response.Write(easebidcancelbtn)
response.Write(""" onclick=""javascript:history.back();"">")
response.Write(ctdr)
response.Write("</form>" & aspeasetableclose)
footer
'=========================================================
'Copyright (C) 2003-2004 AspEase.Com. All rights reserved.
'Web: http://www.aspease.com
'Email: byhucn@126.com,lzz9812@163.com
'=========================================================
'
'FileName: buy.asp
'Version:2.0
'UpdateTime: 2004-10-3 22:14:23
'Script Written by www.aspease.com
'=========================================================%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -