%@ LANGUAGE="VBSCRIPT" %>
<% PageStrings = "359, 401, 567"
strThisBackPage = "config" %>
<%
'===============================================
' 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.
'===============================================
'-----------------------------------------------
'UPDATE DESTINATION
'This makes any changes for tax and shipping
'charges applied to a particular country.
'-----------------------------------------------
'-----------------------------------------------
'COLLECT FORM INPUT
'This is quite tricky because the form was
'generated dynamically and their are multiple
'textboxes which have been named dynamically.
'-----------------------------------------------
For Each numCounter In Request.Form
numDestinationID = mid(numCounter, 2)
if instr(numDestinationID, "-") > 0 then numDestinationID = left(numDestinationID, instr(numDestinationID, "-") - 1)
strLanguageType = Ucase(left(numCounter, 1))
If request.Form(numCounter) = "" AND strLanguageType = "T" then
numErrorNo = numErrorNo + 1
ElseIf IsNumeric(numDestinationID) Then
Select Case strLanguageType
Case "T"
'find out which language it is
strDashPoint = instr(numCounter, "-")
numCurrLanguageID = mid(numCounter, strDashPoint + 1)
strQuery="UPDATE tblCactuShopDestination SET D_Destination" & CStr(numCurrLanguageID) & "='" & SqlSafe(left(request.form(numCounter),application(LICENSENUMBER & "D_Destination_AL"))) & "' WHERE D_ID=" & numDestinationID
Case "I"
strQuery="UPDATE tblCactuShopDestination SET D_ISOCode='" & SqlSafe(left(request.form(numCounter),application(LICENSENUMBER & "D_ISOCode_AL"))) & "' WHERE D_ID=" & numDestinationID
Case "B"
strQuery="UPDATE tblCactuShopDestination SET D_ShippingZone=" & SqlSafe(request.form(numCounter)) & " WHERE D_ID=" & numDestinationID
Case "M"
strQuery="UPDATE tblCactuShopDestination SET D_Tax=" & SqlSafe(request.form(numCounter)) & " WHERE D_ID=" & numDestinationID
Case "L"
strQuery="UPDATE tblCactuShopDestination SET D_Live='" & SqlSafe(request.form(numCounter)) & "' WHERE D_ID=" & numDestinationID
End Select
If Not strQuery = "" Then Call ExecuteSQL(strQuery, numCursorType, objRecordSet)
end if
Next
If numErrorNo = 0 Then
response.redirect("_modify_dest_menu.asp")
Else
'-----------------------------------------------
'If there were numErrorNo because one of the name
'boxes was left blank, we print an error message
'otherwise the user is forwarded back to the
'modify destinations menu.
'-----------------------------------------------
%>
<% =GetString("Config_headtitle") %>
<%
end if
objDataConn.Close
set objDataConn = nothing
%>