📄 xgsl.asp
字号:
<!--#include file="conn_xp/xp.asp"-->
<%
shopxpacid=request("shopxpacid")
if shopxpacid="" then
response.write "<script language=javascript>alert('对不起,您没有选择商品!');window.close();</script>"
response.End
end if
for i=1 to request.form("shopxpacid").count
if request.form("productcount")(i)<=0 then
productcount=1
else
productcount=request.form("productcount")(i)
end if
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from shopxp_product where shopxpptid="&request.form("shopxpptid")(i),conn,1,1
if request.Cookies("shopxp")("reglx")=2 then
danjia=rs_s("shopxpvjia")
else
danjia=rs_s("shopxphyjia")
end if
kucun=rs_s("kucun")
shopxpptname=rs_s("shopxpptname")
rs_s.close
set rs_s=nothing
'response.write kucun&" "&productcount
'response.end
if kucun<cint(productcount) then
response.write "<script language=javascript>alert('你选购的商品“"&shopxpptname&"”库存不足,不能修改数量,请选购更换其它商品!');window.location.href='xpbuy.asp?action=show';</script>"
response.end
end if
conn.execute("update shopxp_action set productcount="&productcount&",zonger="&danjia*productcount&" where shopxpacid="&request.form("shopxpacid")(i))
next
response.Redirect "xpbuy.asp?action=show"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -