<% '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 dim pcCartArray, ppcCartIndex pcCartArray=Session("pcCartSession") ppcCartIndex=Session("pcCartIndex") Session("idCustomer")=Cint(0) 'RP ADDON-S If RewardsActive=True And Session("referral") <> "" Then Session("ContinueRef")=Session("referral") Else Session("ContinueRef")="" End If 'RP ADDON-E if countCartRows(pcCartArray, ppcCartIndex)=0 then ' clear cart data dim pcCartArray2(100,35) Session("pcCartSession")=pcCartArray2 Session("pcCartIndex")=Cint(0) response.redirect "msg.asp?message=61" end if %> <% call opendb() dim iShipService iShipService=0 'see if there are any ship types setup for this store mySQL="SELECT * FROM shipService WHERE serviceActive=-1;" set rstemp=conntemp.execute(mySQL) if rstemp.eof then iShipService=1 end if ' get available paytypes if session("customerType")=1 then mySQL="SELECT idPayment,paymentDesc,priceToAdd,percentageToAdd,gwcode,type,paymentNickName FROM paytypes WHERE active=-1 Order by paymentPriority" else mySQL="SELECT idPayment,paymentDesc,priceToAdd,percentageToAdd,gwcode,type,paymentNickName FROM paytypes WHERE active=-1 and Cbtob=0 Order by paymentPriority" end if err.number=0 set rstemp=conntemp.execute(mySQL) if err.number <> 0 then call closedb() response.redirect "techErr.asp?error="&Server.Urlencode("No paytypes in database") end If ' load paytypes array redim paytypesArray(50,7) paytypesIndex=Cint(0) if rstemp.eof then call closedb() response.redirect "techErr.asp?error="&Server.Urlencode("No paytypes in database") end if dim intPayPalExp intPayPalExp=0 do until rstemp.eof ' insert if all rules are ok paytypesArray(paytypesIndex,0)=rstemp("idPayment") paytypesArray(paytypesIndex,1)=rstemp("paymentDesc") paytypesArray(paytypesIndex,2)=rstemp("priceToAdd") paytypesArray(paytypesIndex,3)=rstemp("percentageToAdd") paytypesArray(paytypesIndex,4)=rstemp("gwcode") if rstemp("gwcode")=999999 or rstemp("gwcode")=46 then intPayPalExp=1 end if paytypesArray(paytypesIndex,5)=rstemp("type") paytypesArray(paytypesIndex,6)=rstemp("paymentNickName") paytypesIndex=paytypesIndex + 1 rstemp.movenext loop if paytypesIndex=0 then call closedb() response.redirect "techErr.asp?error="&Server.Urlencode("Error in order. There are no paytypes defined.") end if ' validate the form if request.form("Submit.y")<>"" then Dim SPath SPath=Request.ServerVariables("PATH_INFO") SPath=mid(SPath,1,InStrRev(SPath,"/")-1) If UCase(Trim(Request.ServerVariables("HTTPS")))="OFF" then strSiteURL="http://" & Request.ServerVariables("HTTP_HOST") & SPath & "/" Else strSiteURL="https://" & Request.ServerVariables("HTTP_HOST") & SPath & "/" End if IF scSecurity=1 THEN if scUserReg=1 then pcv_Test=0 if Session("store_userReg1")<>"1" then Session("store_userReg1")="" Session("store_Reg1postnum")="" Session("store_Reg1num")="" pcv_Test=1 end if if pcv_Test=0 then if InStr(ucase(Request.servervariables("HTTP_REFERER")),ucase(strSiteURL & "NewCustCheckOut.asp"))<>1 then Session("store_userReg1")="" Session("store_Reg1postnum")="" Session("store_Reg1num")="" pcv_Test=1 end if end if if pcv_Test=1 then If scAlarmMsg=1 then if session("AttackCount")="" then session("AttackCount")=0 end if session("AttackCount")=session("AttackCount")+1 if session("AttackCount")>=scAttackCount then%> <%end if End if response.write dictLanguage.Item(Session("language")&"_security_2") response.end end if end if END IF Err=0 '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") If request.form("DF1") <> "" Then if scDateFrmt="DD/MM/YY" then expDateArray=split(request.form("DF1"),"/") session("DF1")=(expDateArray(1)&"/"&expDateArray(0)&"/"&expDateArray(2)) else session("DF1")= month(request.form("DF1")) & "/" & day(request.form("DF1")) & "/" & year(request.form("DF1")) end if Else session("DF1")="" End If session("TF1")=request.form("TF1") pord_OrderName=request.form("ord_OrderName") if pord_OrderName<>"" then else pord_OrderName="No Name" end if session("pord_OrderName")=pord_OrderName CRecvNews=request.form("CRecvNews") if CRecvNews<>"1" then CRecvNews="0" end if session("RecvNews")=CRecvNews pname=request.form("name") session("name")=pname if pname="" 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 comments=request.form("comments") session("comments")=comments idPayment=request.form("idPayment") session("idPayment")=idPayment If Err>0 then call closedb() response.redirect "NewCustCheckOut.asp?msg="& Server.Urlencode(dictLanguage.Item(Session("language")&"_Custmoda_18")) Else if session("DF1")<>"" then If Not IsDate(session("DF1")) then response.redirect "login.asp?msg="&Server.URLEncode(dictLanguage.Item(Session("language")&"_catering_2")) end if 'Past Years If year(session("DF1"))"" then If Not IsDate(session("TF1")) then response.redirect "NewCustCheckOut.asp?msg="&Server.URLEncode(dictLanguage.Item(Session("language")&"_catering_2")) end if end if If DTCheck="1" then if session("DF1")<>"" then DF2=CDate(session("DF1")) if DF2-Date()<=0 then response.redirect "NewCustCheckOut.asp?msg="&Server.URLEncode(dictLanguage.Item(Session("language")&"_catering_3")) else if (DF2-Date()=1) then if session("TF1")<>"" then TF2=CDate(session("TF1")) if TF2"" then TF2=CDate(session("TF1")) if TF2-time()<24 then response.redirect "NewCustCheckOut.asp?msg="&Server.URLEncode(dictLanguage.Item(Session("language")&"_catering_3")) end if end if end if end if If request("msg") = "" Then if session("DF1")<>"" and IsDate(session("DF1")) Then mySQL="SELECT * from blackout WHERE blackout_date=" if scDB="SQL" then mySQL=mySQL&"'" & session("DF1") & "'" else mySQL=mySQL&"#" & session("DF1") & "#" end if set rsblackout=conntemp.execute(mySQL) icounter = 0 do while not rsblackout.eof icounter = icounter + 1 blackoutmessage = rsblackout("blackout_message") rsblackout.movenext loop if icounter > 0 then call closeDb() response.redirect "NewCustCheckOut.asp?msg=" & blackoutmessage & Server.URLEncode(dictLanguage.Item(Session("language")&"_catering_5")) end if End If End If 'save all data into sessionData (database) Session("store_userReg1")="" Session("store_Reg1postnum")="" Session("store_Reg1num")="" Session("newCust")="1" validateFormDb "vShipAdd.asp" End if end if %> <%if DFShow="1" then%> <% End If %> <% response.write ""&vbcrlf %>
<% msg=server.HTMLEncode(request.querystring("msg")) If msg<>"" then %>
"> <%=msg%>

<% end if %> <% 'if express checkout is active show if intPayPalExp=1 then %> <% 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 msg<>"" AND (session("CountryCode")="US" OR session("CountryCode")="CA") then %> <% end if %> <% if session("Errzip")<>"" then %> <% end if %> <% if DeliveryZip="1" then 'The store is limiting deliveries to certain ZIP codes - Show message%> <% end if %> <%if CIView1="1" then%> <%end if%> <%if CIView2="1" then%> <%end if%> <%if RefNewCheckout="1" then%> <%end if%> <%if AllowNews="1" then if NewsCheckout="1" then%> <% end if end if%> <% if scOrderName="1" then 'Allow customers to nickname their order %> <% end if 'End allow customers to nickname their order %> <%if DFShow="1" then%> <% ' If the store is using blackout dates, show a message here and a link a list of dates Dim mySQLdates, rstempDates, blackoutdates mySQLdates="select * from Blackout order by Blackout_Date asc" set rstempDates=connTemp.execute(mySQLdates) If rstempDates.eof Then blackoutdates="0" else blackoutdates="1" end if set rstempDates = nothing if blackoutdates="1" then %> <% end if %> <%end if%> <%if TFShow="1" then%> <%end if%> <%if (DTCheck="1") then%> <%end if%> <% if iShipService=0 then %> <% if scAlwAltShipAddress="-1" then %> <% else %> <% end if %> <% else %> <% end if %> <% if calculateCartTotal(pcCartArray, ppcCartIndex)>0 then %> <% else %> <% end if %> <% Session("store_userReg1")="1" Session("store_Reg1postnum")="" session("store_Reg1num")=" "%> <%if (scSecurity=1) and (scUserReg=1) and (scUseImgs=1) then%> <%end if%>
Fast, Secure Checkout with PayPal
 
Acceptance Mark Save time, Checkout securely.
Pay without sharing your financial information.
 
<%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")&"_Custmoda_19")%>
<%response.write dictLanguage.Item(Session("language")&"_order_M")%> <% mySQL="SELECT stateCode,stateName FROM states ORDER BY stateName" set rstemp=conntemp.execute(mySQL) if err.number <> 0 then response.redirect "techErr.asp?error="&Server.Urlencode("Error in order: "&err.description) end If %> <% if msg="" then %> "> <% else if session("stateCode")="" AND session("state")="" then %> "> <% end if %> <% end if %> <%response.write dictLanguage.Item(Session("language")&"_checkout_12")%>
<%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 %> <%response.write dictLanguage.Item(Session("language")&"_checkout_12")%>
  <%response.write dictLanguage.Item(Session("language")&"_catering_7")%> <%response.write dictLanguage.Item(Session("language")&"_catering_8")%> .
<%response.write dictLanguage.Item(Session("language")&"_order_P")%> <% mySQL="SELECT CountryCode,countryName FROM countries ORDER BY countryName ASC" set rstemp=conntemp.execute(mySQL) if err.number <> 0 then call closeDb() response.redirect "techErr.asp?error="&Server.Urlencode("Error in order: "&err.description) 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%>
<%=NewsLabel%>
 

<%response.write dictLanguage.Item(Session("language")&"_catering_13")%>
<%response.write dictLanguage.Item(Session("language")&"_catering_1")%>
<%response.write dictLanguage.Item(Session("language")&"_catering_12")%> " size="20">

<%response.write dictLanguage.Item(Session("language")&"_catering_14")%>
<%=DFLabel%>: "" then%><%=showdateFrmt(session("DF1"))%><%else%><% Date1=Date()+1 if scDateFrmt="DD/MM/YY" then %><%=day(date1) & "/" & month(date1) & "/" & year(date1)%> <%else%> <%=month(date1) & "/" & day(date1) & "/" & year(date1)%> <%end if end if%>" size="20"> <%if DFReq="1" then%> "> <%end if%>
  <%response.write dictLanguage.Item(Session("language")&"_catering_20")%> <%response.write dictLanguage.Item(Session("language")&"_catering_21")%>
<%=TFLabel%>: <%if TFReq="1" then%> "> <%end if%>
  <%response.write dictLanguage.Item(Session("language")&"_catering_6")%>

<%response.write ship_dictLanguage.Item(Session("language")&"_login_b")%>
<%response.write dictLanguage.Item(Session("language")&"_order_Q")%>
   
<%response.write ship_dictLanguage.Item(Session("language")&"_login_c")%>
<%response.write ship_dictLanguage.Item(Session("language")&"_login_d")%>
 
<%response.write dictLanguage.Item(Session("language")&"_order_R")%>
<%response.write dictLanguage.Item(Session("language")&"_order_S")%>
 
 
<%response.write dictLanguage.Item(Session("language")&"_order_U")%>
<%response.write dictLanguage.Item(Session("language")&"_order_V")%>
<%response.write dictLanguage.Item(Session("language")&"_security_1")%>

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

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