<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "392, 393, 394, 395, 396, 397, 399, 400, 405, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 525, 681, 686, 687, 688, 689, 965, 1046, 1058, 1059, 1060, 1077, 1131" strThisBackPage = "orders" %> <% '=============================================== ' 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. '=============================================== '----------------------------------------------- 'ADD/VIEW/MODIFY CUSTOMER STATUS 'Setup a customer with an account, give them a 'discount or modify their details. '----------------------------------------------- '----------------------------------------------- 'FIND WHICH COMPANY WAS CLICKED ON '----------------------------------------------- CD_ID = request.querystring("CD_ID") * 1 strQuery = "SELECT * FROM tblCactuShopCardholderDetails WHERE CD_ID = " & CD_ID Call ExecuteSQL(strQuery, numCursorType, objRecordSet) numRecordCount = objRecordSet.recordcount If numRecordCount > 0 then CD_ID = objRecordSet("CD_ID") CD_CustomerDiscount = objRecordSet("CD_CustomerDiscount") CD_CardholderName = SafeHTMLEncode(objRecordSet("CD_CardholderName")) CD_CardholderCompany = SafeHTMLEncode(objRecordSet("CD_CardholderCompany")) CD_CardholderEUVATNum = SafeHTMLEncode(objRecordSet("CD_CardholderEUVATNum")) 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_CardholderCountry = objRecordSet("CD_CardholderCountry") 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_ShippingPostCode = SafeHTMLEncode(objRecordSet("CD_ShippingPostCode")) CD_ShippingCountry = objRecordSet("CD_ShippingCountry") CD_Telephone = SafeHTMLEncode(objRecordSet("CD_Telephone")) CD_EmailAddress = SafeHTMLEncode(objRecordSet("CD_EmailAddress")) CD_Password = SafeHTMLEncode(objRecordSet("CD_Password")) CD_Approved = SafeHTMLEncode(objRecordSet("CD_Approved")) CD_AffiliateID = SafeHTMLEncode(objRecordSet("CD_AffiliateID")) If ISNull(CD_AffiliateID) then CD_AffiliateID = 0 'Grab all the card details CD_Card_Number = objRecordSet("CD_Card_Number") CD_Card_Type = objRecordSet("CD_Card_Type") CD_Card_StartDate = objRecordSet("CD_Card_StartDate") CD_Card_Expiry = objRecordSet("CD_Card_Expiry") CD_Card_IssueNumber = objRecordSet("CD_Card_IssueNumber") CD_Card_SecurityNumber = objRecordSet("CD_Card_SecurityNumber") 'Work out if any of the card details are blank blnGotCardDetails = Not (CD_Card_Number = "" and (CD_Card_StartDate = "" or CD_Card_StartDate = "/") and CD_Card_Type = "" and CD_IssueNumber = "" and (CD_CardExpiry = "" or CD_CardExpiry = "/") and CD_Card_SecurityNumber = "") Else CD_ID = 0 End if objRecordSet.close %> <% =GetString("Config_headtitle") %>
<% IF CD_ID <> 0 then %> <% end if %> <% '----------------------------------------------- 'SHOW CARD DETAILS IF THEY ARE SAVED TO DATABASE 'Previously we used thet saveInDB config setting 'but now we check if any of the fields have 'information in - that way you can still view 'card details even if you change you mind on 'this config setting. '----------------------------------------------- if blnGotCardDetails then %>
<% WriteString("PageTitle_CustomerDetails") %>
<% if CD_AffiliateID <> 0 then %> <% end if %>
<% WriteString("ContentText_ListOrders") %> <% WriteString("ContentText_AffiliateDetails") %>

<% WriteString("FormLabel_CustomerID") %> <% If CD_ID=0 then response.write("new") else response.write(CD_ID) %>
<% WriteString("ContentText_CardNumber") %> <% =CD_Card_Number %>
<% WriteString("ContentText_CardStartDate") %> <% =CD_Card_StartDate %>
<% WriteString("ContentText_CardExpiry") %> <% =CD_Card_Expiry %>
<% WriteString("ContentText_CardIssueNumber") %> <% =CD_Card_IssueNumber %>
<% WriteString("ContentText_SecurityNumber") %> <% =CD_Card_SecurityNumber %>
<% WriteString("ContentText_CardType") %> <% =CD_Card_Type %>
"> <% WriteString("ContentText_DeleteCCDetailsText") %>
<% end if %>
<% WriteString("FormLabel_CustomerName") %>*
<% WriteString("FormLabel_CardholderCompany") %>
<% WriteString("FormLabel_CardholderEUVatNum") %>
<% WriteString("FormLabel_StreetAddress") %>*
<% WriteString("FormLabel_TownCity") %>*
<% WriteString("FormLabel_County") %>
<% WriteString("FormLabel_Postcode") %>*
<% WriteString("FormLabel_Country") %>* <% '----------------------------------------------- 'PRODUCE THE DESTINATIONS DROPDOWN 'This runs a query to find all the destinations, 'orders them alphabetically and then calls a 'function we have written to produce a dropdown 'box from the recordset. '----------------------------------------------- strQuery = "SELECT * FROM tblCactuShopDestination WHERE D_Live='y' ORDER BY D_Destination" & CStr(numLanguageID) Call ExecuteSQL(strQuery, numCursorType, objRecordSet) Call SingleDropDown("CD_CardholderCountry", "0", "-:", objRecordSet, "D_ID", "D_Destination" & CStr(numLanguageID), CD_CardholderCountry) objRecordSet.Close %>
<% WriteString("ContentText_ShippingDetails") %>
<% WriteString("FormLabel_Name") %>
<% WriteString("FormLabel_StreetAddress") %>*
<% WriteString("FormLabel_TownCity") %>*
<% WriteString("FormLabel_County") %>
<% WriteString("FormLabel_Postcode") %>*
<% WriteString("FormLabel_Country") %>* <% '----------------------------------------------- 'PRODUCE THE DESTINATIONS DROPDOWN 'This runs a query to find all the destinations, 'orders them alphabetically and then calls a 'function we have written to produce a dropdown 'box from the recordset. '----------------------------------------------- strQuery = "SELECT * FROM tblCactuShopDestination WHERE D_Live='y' ORDER BY D_Destination" & CStr(numLanguageID) Call ExecuteSQL(strQuery, numCursorType, objRecordSet) Call SingleDropDown("CD_ShippingCountry", "0", "-:", objRecordSet, "D_ID", "D_Destination" & CStr(numLanguageID), CD_ShippingCountry) objRecordSet.Close %>
<% WriteString("ContentText_ContactAndMiscDetails") %>
<% WriteString("FormLabel_Email") %>*
<% WriteString("FormLabel_CustomerCode") %>*
<% WriteString("FormLabel_Telephone") %>*
<% WriteString("FormLabel_Discount") %>
<% WriteString("FormLabel_Approved") %> > <% WriteString("ContentText_ApprovedCustomersText") %>
">
<% If CD_ID <> 0 then %>
"> <% WriteString("ContentText_DeleteThisCustomer") %>
<% end if %>
<% objDataConn.Close set objDataConn = nothing %>