% Response.expires = "-1000" Response.AddHeader "cache-control","private" Response.AddHeader "pragma","no-chache" %> <% on error resume next Sub AddItemToPicart (pid,pname,pincon1,pamp1,pqty) if picart.Exists(pid) and picart1.Exists(pid) and picart2.Exists(pid) and picart3.Exists(pid) then picart.Remove pid picart1.Remove pid picart2.Remove pid picart3.Remove pid picart.Add pid,pname picart1.Add pid,pincon1 picart2.Add pid,pamp1 picart3.Add pid,pqty else picart.Add pid,pname picart1.Add pid,pincon1 picart2.Add pid,pamp1 picart3.Add pid,pqty end if End Sub if (Session("cname") = "" or isnull(Session("cname"))) then compname = Request.form("companyname") else compname = Session("cname") end if if (Session("stadd") = "" or isNull(Session("stadd"))) then stre = Request.form("street") else stre = Session("stadd") end if if (Session("citadd") = "" or isNull(Session("citadd"))) then cit = Request.form("city") else cit = Session("citadd") end if if (Session("country") = "" or isNull(Session("country"))) then coun1 = Request.form("count1") else coun1 = Session("country") end if if (Session("zip") = "" or isNull(Session("zip"))) then zipcode = Request.form("zip") else zipcode = Session("zip") end if if (Session("comurl") = "" or isNull(Session("comurl"))) then compurl = Request.form("url") else compurl = Session("comurl") end if if (Session("comment") = "" or isNull(Session("comment"))) then comm = Request.form("comments") else comm = session("comment") end if if (Session("contnam") = "" or isNull(Session("contnam"))) then contname = Request.form("contact_name") else contname = Session("contnam") end if if (Session("contph") = "" or isNull(Session("contph"))) then contphone = Request.form("contact_phone") else contphone = Session("contph") end if if (Session("contphres") = "" or isNull(Session("contphres"))) then contphoneres = Request.form("contact_phoneres") else contphoneres = Session("contphres") end if if (Session("contphmob") = "" or isNull(Session("contphmon"))) then contphonemob = Request.form("contact_phonemob") else contphonemob = Session("contphmob") end if if (Session("conttime") = "" or isNull(Session("conttime"))) then besttime = Request.form("contact_time") else besttime = Session("conttime") end if if (Session("contmail") = "" or isNull(Session("contmail"))) then email = Request.form("contact_email") else email = Session("contmail") end if if (Session("contfax") = "" or isNull(Session("contfax"))) then faxno = Request.form("contact_fax") else faxno = Session("contfax") end if if (Session("cstno") = "" or isNull(Session("cstno"))) then csn = Request.form("cstno") else csn = Session("cstno") end if if (Session("enqrordr") = "" or isNull(Session("enqrordr"))) then enqord = Request.form("inquire") else enqord = Session("enqrordr") end if Session("cname") = compname Session("stadd") = stre Session("citadd") = cit Session("country") = coun1 Session("zip") = zipcode Session("comurl") = compurl Session("comment") = comm Session("contnam") = contname Session("contph") = contphone Session("contphres") = contphoneres Session("contphmob") = contphonemob Session("conttime") = besttime Session("contmail") = email Session("contfax") = faxno Session("cstno") = csn Session("enqrordr") = enqord %> <% pcode = Request.form("code") prname = Request.form("pronam") prpin = Request.form("pinconf") pramp = Request.form("amphe") qty = Request.form("quantity1") Dim picart ' as dictionary Dim pid ' as integer Dim pname ' as integer if isobject(Session("acart")) then set picart = Session("acart") else set picart = Server.CreateObject("scripting.Dictionary") end if Dim picart1 ' as dictionary dim pincon1 ' as integer if isobject(Session("acart1")) then set picart1 = Session("acart1") else set picart1 = Server.CreateObject("scripting.Dictionary") end if Dim picart2 ' as Dictionary Dim pamp1 ' as integer if isobject(Session("acart2")) then set picart2 = session("acart2") else set picart2 = Server.CreateObject("scripting.Dictionary") end if Dim picart3 ' as Dictionary Dim pqty ' as integer if isobject(Session("acart3")) then set picart3 = Session("acart3") else set picart3 = Server.CreateObject("scripting.Dictionary") end if if ((isnull(pqty) or pqty="") and (picart.count < 0 ) and (picart1.count < 0) and (picart2.count < 0 ) and (picart3.count < 0)) then else Sub showall AddItemToPicart pcode,prname,prpin,pramp,qty %> <% Dim Key1 For Each key1 in picart if not (key1="") then 'Get products lowcount = lbound(products) highcount = ubound(products) for counter = lowcount to highcount kplen = len(key1)- 1 kpcode = mid(key1,kplen,len(key1)) if (vproducts(counter) = kpcode) then kpnam = products(counter) end if next 'Get configuration lowcount = lbound(pinc) highcount = ubound(pinc) for counter = lowcount to highcount kpcode1 = mid(key1,1,1) if (vpinc(counter) = kpcode1) then kppin = pinc(counter) end if next 'Get Amp lowcount = lbound(amp) highcount = ubound(amp) for counter = lowcount to highcount kpcode2 = mid(key1,2,3) if (vamp(counter) = kpcode2) then kpamp = amp(counter) end if next %>
|
|