%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "14, 18, 32, 33, 55, 56, 60, 63, 119, 139, 140, 141, 142, 206, 209, 243, 244, 261, 262, 263, 264, 300, 301, 302, 303, 304, 305, 306, 307, 702, 703, 825, 836, 1087, 1109, 1110, 1111, 1112, 1113, 1130, 1131, 1132, 1185" strMenuDisabled = "DISABLED" 'disables dropdowns for currency and language selection, these won't work properly here %> <%'----------------------------------------------- 'SET PAGETITLE TAG '----------------------------------------------- strPageTitleHTML = GetString("PageTitle_MakeEnquiry") & " | " & GetString("Config_Webshopname")%> <% '=============================================== ' CactuShop ASP Shopping Cart ' ©1999-2004 Cactusoft Ltd. www.cactusoft.com '=============================================== ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. Cactusoft's copyright notices must ' remain in the ASP sections of the code. '=============================================== '----------------------------------------------- 'IS THE BASKET EMPTY? 'If so, we best redirect to avoid problems 'later '----------------------------------------------- If numItemCount = 0 then response.redirect("default.asp") strThisPage = "basket" aryCart2 = aryCart '----------------------------------------------- 'COLLECT VALUES '----------------------------------------------- strAgain = request.form("strAgain") CD_EmailAddress = request.form("CD_EmailAddress") CD_Password = request.form("CD_Password") CD_CardholderCountry = request.form("CD_CardholderCountry") CD_ShippingPostcode = request.form("CD_ShippingPostcode") CD_ShippingCountry = request.form("CD_ShippingCountry") CD_CardholderEUVatNum = Request.Form("CD_CardholderEUVatNum") CP_CouponCode = request.form("CP_CouponCode") numShipMethod = request.form("numShipMethod") %><% '----------------------------------------------- 'CHECK COUNTRY WAS SELECTED '----------------------------------------------- If (CD_ShippingCountry = "0" or not isnumeric(CD_ShippingCountry)) and request.form("strAgain") = "yes" then response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "shipto.asp?strProblem=country") End If '----------------------------------------------- 'SHIPMETHOD IS ELECTRONIC? 'Make sure this is allowed - and if it is not 'then redirect '----------------------------------------------- If not blnAllDownload then strQuery = "SELECT SM_ID, SM_Name" & CStr(numLanguageID) & " FROM tblCactuShopShippingMethods WHERE SM_AutoMethod = 'y'" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) if numShipMethod = objRecordSet("SM_ID") then 'they've cheated, and tried to pass it off as all electronic! What a cheek! objRecordSet.close response.direct("default.asp") end if objRecordSet.close end if If len(CD_EmailAddress) = 0 then response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "login.asp?strProblem=noemail&strCallMode=enquiry") If len(ErrorcheckEmail(strErrorText, numErrorNo, CD_EmailAddress)) > 0 then response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "login.asp?strProblem=emailinvalid&strCallMode=enquiry") '----------------------------------------------- 'IF EMAIL/PASSWORD GIVEN, LOOK UP DETAILS '----------------------------------------------- If CD_Password <> "" then strQuery = "SELECT * FROM tblCactuShopCardholderDetails WHERE CD_EmailAddress='" & sqlsafe(CD_EmailAddress) & "' AND CD_Password='" & sqlsafe(CD_Password) & "' ORDER BY CD_ID DESC" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) '----------------------------------------------- 'DETAILS FOUND OK '----------------------------------------------- If objRecordSet.recordcount>0 then If objRecordSet("CD_Password") = CD_Password Then CD_ID = objRecordSet("CD_ID") CD_CardholderName = SafeHTMLencode(objRecordSet("CD_CardholderName")) CD_CardholderCompany = SafeHTMLencode(objRecordSet("CD_CardholderCompany")) CD_CardholderStreetAddress = SafeHTMLencode(objRecordSet("CD_CardholderStreetAddress")) CD_CardholderTownCity = SafeHTMLencode(objRecordSet("CD_CardholderTownCity")) CD_CardholderCounty = SafeHTMLencode(objRecordSet("CD_CardholderCounty")) CD_CardholderPostCode = SafeHTMLencode(objRecordSet("CD_CardholderPostCode")) CD_CustomerDiscount = objRecordSet("CD_CustomerDiscount") CD_Telephone = SafeHTMLencode(objRecordSet("CD_Telephone")) CD_ShippingName = SafeHTMLencode(objRecordSet("CD_ShippingName")) CD_ShippingStreetAddress = SafeHTMLencode(objRecordSet("CD_ShippingStreetAddress")) CD_ShippingTownCity = SafeHTMLencode(objRecordSet("CD_ShippingTownCity")) CD_ShippingCounty = SafeHTMLencode(objRecordSet("CD_ShippingCounty")) CD_Password = SafeHTMLencode(objRecordSet("CD_Password")) CD_Approved = SafeHTMLencode(objRecordSet("CD_Approved")) 'If the old affiliate ID is 0 (i.e. when they signed up before they didn't 'do so through an affiliate), then use the new affiliate ID. Otherwise keep 'the one in the database (so affiliates can't 'steal' customers from each 'other oldCD_AffiliateID = objRecordSet("CD_AffiliateID") if not (oldCD_AffiliateID = "" or oldCD_AffiliateID = "0") then CD_AffiliateID = oldCD_AffiliateID end if If CD_Approved = "" Or IsNull(CD_Approved) then CD_Approved = "n" Else '----------------------------------------------- 'DETAILS COULD NOT BE FOUND '----------------------------------------------- response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "login.asp?strProblem=email&strCallMode=enquiry") End if else '----------------------------------------------- 'DETAILS COULD NOT BE FOUND '----------------------------------------------- response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "login.asp?strProblem=email&strCallMode=enquiry") end if objRecordSet.close end if '----------------------------------------------- 'SET CARDHOLDER COUNTRY 'If this is a new customer, default the country 'to that which they are shipping to (most orders 'are shipped to the country where the cardholder 'is). '----------------------------------------------- If CD_CardholderCountry = "" or CD_CardholderCountry = "0" or not isnumeric(CD_CardHolderCountry) then CD_CardholderCountry = CD_ShippingCountry '----------------------------------------------- 'USER HAS ENTERED EMAIL ADDRESS AND NO CUSTOMER 'NUMBER. CHECK TO SEE IF THEY'VE ORDERED BEFORE 'AND ARE ALREADY ON THE DATABASE - IN THAT CASE 'WE CAN SEND THEM BACK TO REQUEST THEIR CUSTOMER 'NUMBER RATHER THAN CREATE A NEW ACCOUNT WITH 'THE SAME NUMBER. '----------------------------------------------- If CD_Password = "" then strQuery = "SELECT CD_EmailAddress FROM tblCactuShopCardholderDetails WHERE CD_EmailAddress='" & SqlSafe(CD_EmailAddress) & "'" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) If objRecordSet.recordcount <> 0 then response.redirect(lcase(Application(LICENSENUMBER & "webshopURL")) & "login.asp?strProblem=exists&strCallMode=enquiry") End if objRecordSet.close End if %> <% '----------------------------------------------- 'READ PAGE TEMPLATE FROM FILE '----------------------------------------------- Call ReadFromTemplate(strTemplateLocation, aryPageTemplate, strBasketHTML, strCategoryListHTML) '----------------------------------------------- 'WRITE FIRST HALF OF PAGE HTML '----------------------------------------------- response.write(aryPageTemplate(0)) 'Check EU Vat number validity %> <% strErrorText = strErrorText & strErrorTextEUVat If Not strErrorText = "" Then %>
| <% WriteString("PageTitle_Problems") %> |
| <% WriteString("ContentText_Errors") %> |
| <% =strErrorText %> |
| << <% WriteString("ContentText_GoBack") %> |