%@ LANGUAGE="VBScript" %> <% Sub PutToShopBag( cpbm, ProductList ) If Len(ProductList) = 0 Then ProductList = "'" & cpbm & "'" ElseIf InStr( ProductList, cpbm ) <= 0 Then ProductList = ProductList & ", '" & cpbm & "'" End If End Sub ProductList = Session("ProductList") Products = Split(Request("cpbm"), ", ") For I=0 To UBound(Products) PutToShopBag Products(I), ProductList Next Session("ProductList") = ProductList Head="以下是您所选购的产品清单" ProductList = Session("ProductList") If Len(ProductList) =0 Then Response.Redirect "Product.asp" response.end end if If Request("MySelf") = "Yes" Then ProductList = "" Products = Split(Request("cpbm"), ", ") For I=0 To UBound(Products) PutToShopBag Products(I), ProductList Next Session("ProductList") = ProductList End If If Len(ProductList) = 0 Then Response.Redirect "Product.asp" response.end end if set rs=server.createobject("adodb.recordset") sql = "Select * From Product" sql = sql & " Where Product_Id In (" & ProductList & ")" rs.open sql,conn,3,3 %>
<%=Head%> |