📄 buy.asp
字号:
<!--#include file="db_conn.asp"-->
<!--#include file="comm/my_request.asp"-->
<%
id=my_request("id",1)
sql="select * from yqj_product where id="&id
set rs=conn.execute (sql)
if (rs.eof and rs.bof) then
response.write "<script language=javascript>alert('您选择的商品不存在!');window.close();</script>"
response.End
else
p_nums=rs("p_nums")
if int(p_nums)<=0 then
response.write "<script language=javascript>alert('对不起,您选择的商品已经缺货!');window.close();</script>"
response.End
end if
ProductList = Session("ProductList")
Products = Split(id,",")
For I=0 To UBound(Products)
PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList
response.redirect "Mycart.asp"
Sub PutToShopBag( add, ProductList )
If Len(ProductList) = 0 Then
ProductList = add
'ProductList = "'" & add & "'"
ElseIf InStr( ProductList, add ) <= 0 Then
ProductList = ProductList & "," & add
End If
End Sub
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -