<% 'This file is part of ProductCart, an ecommerce application developed and sold by Early Impact LLC. ProductCart, its source code, the ProductCart name and logo are property of Early Impact, LLC. Copyright 2001-2003. All rights reserved. You are not allowed to use, alter, distribute and/or resell any parts of ProductCart's source code without the written consent of Early Impact. To contact Early Impact, please visit www.earlyimpact.com. %> <% response.Buffer=true %> <% 'on error resume next 'Check to see if store has been turned off by admin, then display message If scStoreOff="1" then response.redirect "msg.asp?message=59" End If ' set affiliate if request.querystring("idAffiliate")<>"" and isNumeric(request.querystring("idAffiliate"))then session("idAffiliate")= request.querystring("idAffiliate") end if dim pcCartArray, ppcCartIndex 'RP ADDON-S If RewardsActive=True And Session("referral") <> "" Then Session("ContinueRef")=Session("referral") Else Session("ContinueRef")="" End If 'RP ADDON-E pcCartArray=Session("pcCartSession") ppcCartIndex=Session("pcCartIndex") pRedirectURL=getUserInput(request("redirectURL"),0) Session("newCust")="1" %> <% ' validate the form if request.form("Submit.y")<>"" then Err=0 if (scSecurity=1) and (scUserReg=1) and (scUseImgs=1) then Session("store_Regpostnum")=replace(request("postnum"),"'","''") else Session("store_Regpostnum")="" end if 'form is submitted 'Validation on country, state and province CountryCode=request.form("CountryCode") session("CountryCode")=CountryCode if CountryCode="" then Err=Err+1 End if stateCode=request.form("stateCode") session("stateCode")=stateCode pstate=request.form("state") session("state")=pstate 'Enforce selection from the State drop-down for US and CA customers if session("stateCode")="" AND (session("CountryCode")="US" OR session("CountryCode")="CA") then Err=Err+1 session("state")="" End if 'Force CA or US customer to select either state or province If (session("stateCode")<>"" AND session("state")<>"") AND (session("CountryCode")="US" OR session("CountryCode")="CA") then pstate="" session("state")="" End if 'Clear the state field for non US and CA customers, if the Province field is used If session("state")<>"" AND (session("CountryCode")<>"US" AND session("CountryCode")<>"CA") then session("stateCode")="" End If 'End validation on country, state and province session("IDrefer")=request.form("IDRefer") session("CI1")=request.form("CI1") session("CI2")=request.form("CI2") CRecvNews=request.form("CRecvNews") if CRecvNews="" then CRecvNews="0" end if session("RecvNews")=CRecvNews name=request.form("name") session("name")=name if name="" then Err=Err+1 End if lastName=request.form("lastName") session("lastName")=lastName if lastName="" then Err=Err+1 End if customerCompany=request.form("customerCompany") session("customerCompany")=customerCompany phone=request.form("phone") session("phone")=phone if phone="" then Err=Err+1 else phone=replace(phone," ","") phone=replace(phone,"-","") phone=replace(phone,".","") phone=replace(phone,"(","") phone=replace(phone,")","") if Not isNumeric(phone) then Err=Err+1 session("Errphone")=dictLanguage.Item(Session("language")&"_Custmoda_15") end if End if email=replace(request.form("email")," ","") session("email")=email if email="" then Err=Err+1 else if instr(email,"@")=0 or instr(email,".")=0 then Err=Err+1 Session("Erremail")=dictLanguage.Item(Session("language")&"_Custmoda_16") end if End if password=request.form("password") session("password")=password if password="" then Err=Err+1 End if address=request.form("address") session("address")=address if address="" then Err=Err+1 End if address2=request.form("address2") session("address2")=address2 city=request.form("city") session("city")=city if city="" then Err=Err+1 End if zip=request.form("zip") session("zip")=zip if zip="" AND (session("CountryCode")="US" OR session("CountryCode")="CA") then Err=Err+1 else if session("stateCode")<>"" AND session("CountryCode")="US" then if Not isNumeric(zip) or (instr(zip,",")<>0) then Err=Err+1 Session("ErrZip")=dictLanguage.Item(Session("language")&"_Custmoda_17") end if end if End if if (scSecurity=1) and (scUserReg=1) and (scUseImgs=1) then If Session("store_Regnum") & ""<>Session("store_Regpostnum") & "" then Session("store_Regpostnum")="" response.redirect "NewCust.asp?msg="& Server.Urlencode(dictLanguage.Item(Session("language")&"_security_3"))& "&redirectUrl=" & pRedirectURL End if End if If Err>0 then response.redirect "NewCust.asp?msg="& Server.Urlencode(dictLanguage.Item(Session("language")&"_Custmoda_18"))& "&redirectUrl=" & pRedirectURL Else 'save all data into sessionData (database) if Session("newCust")<>"" then validateFormDb "saveNewCust.asp" Else validateFormDb "vShipAdd.asp" End If End if end if %> <% response.write ""&vbcrlf %>
<% msg=server.HTMLEncode(request.querystring("msg")) If msg<>"" then %>
"> <%=msg%>

<% end if %> <% if session("Errphone")<>"" then %> <% end if %> <% if session("Erremail")<>"" then %> <% end if %> <%if Session("idCustomer")=0 or Session("idCustomer")="" then%> <%end if%> <% if (session("stateCode")<>"" AND session("state")<>"") AND (session("CountryCode")="US" OR session("CountryCode")="CA") then %> <% end if %> <% if session("Errzip")<>"" then %> <% end if %> <%if CIView1="1" then%> <%end if%> <%if CIView2="1" then%> <%end if%> <%if RefNewReg="1" then%> <%end if%> <%if AllowNews="1" then if NewsReg="1" then%> <% end if end if%> <% Session("store_userReg")="1" Session("store_Regpostnum")="" session("store_Regnum")=" "%> <%if (scSecurity=1) and (scUserReg=1) and (scUseImgs=1) then%> <%end if%>
<%response.write dictLanguage.Item(Session("language")&"_order_A")%> <% If msg="" then%> : <%response.write dictLanguage.Item(Session("language")&"_order_B")%> <% end if %>
 
<%response.write dictLanguage.Item(Session("language")&"_order_C")%> " size="20"> <% if msg="" then %> "> <% else if session("name")="" then %> "> <% end if %> <% end if %>
<%response.write dictLanguage.Item(Session("language")&"_order_D")%> " size="20"> <% if msg="" then %> "> <% else if session("lastName")="" then %> "> <% end if %> <% end if %>
<%response.write dictLanguage.Item(Session("language")&"_order_E")%> " size="20">
  <%=session("Errphone")%>
<%response.write dictLanguage.Item(Session("language")&"_order_F")%> " size="20"> <% if msg="" then %> "> <% else if session("phone")="" then %> "> <% end if %> <% end if %>
  <%=session("Erremail")%>
<%response.write dictLanguage.Item(Session("language")&"_order_G")%> <%if Session("idCustomer")=0 then%> " size="20"> <% if msg="" then %> "> <% else if session("email")="" then %> "> <% end if %> <% end if %> <%end if%>
<%response.write dictLanguage.Item(Session("language")&"_order_H")%> " size="20"> <% if msg="" then %> "> <% else if session("password")="" then %> "> <% end if %> <% end if %>
<%response.write dictLanguage.Item(Session("language")&"_order_I")%> " size="20"> <% if msg="" then %> "> <% else if session("password")="" then %> "> <% end if %> <% end if %>

<%response.write dictLanguage.Item(Session("language")&"_order_J")%>
<%response.write dictLanguage.Item(Session("language")&"_order_K")%> " size="20"> <% if msg="" then %> "> <% else if session("address")="" then %> "> <% end if %> <% end if %>
  " size="20">
<%response.write dictLanguage.Item(Session("language")&"_order_L")%> " size="20"> <% if msg="" then %> "> <% else if session("city")="" then %> "> <% end if %> <% end if %>
<%response.write dictLanguage.Item(Session("language")&"_order_M")%> <% call opendb() query="SELECT stateCode,stateName FROM states ORDER BY stateName" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="&Server.UrlEncode("Error on NewCust.asp - Line 407") end If %> <% if msg="" then %> "> <% else if session("stateCode")="" then %> "> <% end if %> <% end if %> required for US and Canada
  <% response.write dictLanguage.Item(Session("language")&"_Custmoda_19")%>
<%response.write dictLanguage.Item(Session("language")&"_order_N")%> " size="20">
  <%=session("Errzip")%>
<%response.write dictLanguage.Item(Session("language")&"_order_O")%> " size="20"> <% if msg="" then %> "> <% else if session("zip")="" OR session("Errzip")<>"" then %> "> <% end if %> <% end if %> required for US and Canada
<%response.write dictLanguage.Item(Session("language")&"_order_P")%> <% query="SELECT CountryCode,countryName FROM countries ORDER BY countryName ASC" set rs=server.CreateObject("ADODB.RecordSet") set rs=conntemp.execute(query) if err.number <> 0 then set rs=nothing call closeDb() response.redirect "techErr.asp?error="&Server.UrlEncode("Error on NewCust.asp - Line 485") end If %> <% if msg="" then %> "> <% else if session("CountryCode")="" then %> "> <% end if %> <% end if %>
<%=CILabel1%> " size="20"><%if CIReq1="1" then%>"><%end if%>
<%=CILabel2%> " size="20"><%if CIReq2="1" then%>"><%end if%>
<%=ReferLabel%> <%if ViewRefer="1" then%>"><%end if%>
checked<%end if%>> <%=NewsLabel%>
<%response.write dictLanguage.Item(Session("language")&"_security_1")%>

<%For k=1 to 6%><%Next%>
   
" border="0" name="Submit" value="<%response.write dictLanguage.Item(Session("language")&"_order_W")%>">
   

<% call closedb() session("Erremail")="" session("Errphone")="" session("Errzip")="" %>