<!--#include file="include/conn.asp"-->
<%
Dim ProId,nn,ArrProId,ArrnProId,aBuy,cc,ys
ProId = Trim(request("ProId"))
oConn.Execute("UPDATE [LstPro] SET PorderHits = PorderHits+1 where Id ="&ProId)
nn = Trim(request("nn"))
cc = Trim(request("cc"))
ys = Trim(request("ys"))
If nn="" Then
	nn = 1
End If
If ProId <> "" Then
	If session("orderlst")=""  then
		session("orderlst")=ProId
		session("nn"&ProId&"") = nn
		session("cc"&ProId&"") = cc
		session("ys"&ProId&"") = ys
	else
	aBuy = 1
	ArrProId=split(session("orderlst"),",")
	
	For i = LBound(ArrProId) To UBound(ArrProId) 
	   	If int(ArrProId(i))=int(ProId) then
			aBuy = 0
	   	end if
   	next
		If aBuy = 1 then
		   session("orderlst") = session("orderlst")&","&ProId
		   session("orderlst") =NewOrder(session("orderlst"))
		   session("nn"&ProId&"") = nn
		   session("cc"&ProId&"") = cc
		   session("ys"&ProId&"") = ys
		end if
	end If
end If

Response.Write ("<script language=javascript>location='/Shopping1.asp?nn="&nn&"&cc="&cc&"&ys="&ys&"'</script>")
%>