%
' Comersus BackOffice Lite
' e-commerce ASP Open Source
' Comersus Open Technologies LC
' 2005
' http://www.comersus.com
%>
<%
on error resume next
dim mySQL, conntemp, rstemp
pRunInstallationWizard = getSettingKey("pRunInstallationWizard")
if pRunInstallationWizard<>"-1" then response.redirect "comersus_backoffice_message.asp?message="&Server.UrlEncode("Sorry, the Installation Wizard is disabled")
'add shipping zone
pZoneDesc1 = getUserInput(request.form("zoneDesc1"),100)
pZoneDesc2 = getUserInput(request.form("zoneDesc2"),100)
pZip1 = getUserInput(request.form("zip1"),20)
pZip2 = getUserInput(request.form("zip2"),20)
pStateCode1 = getUserInput(request.form("stateCode1"),10)
pStateCode2 = getUserInput(request.form("stateCode2"),10)
pCountryCode1 = getUserInput(request.form("countryCode1"),10)
pCountryCode2 = getUserInput(request.form("countryCode2"),10)
' validate
if pZoneDesc1="" then
response.redirect "comersus_backoffice_message.asp?message="& Server.Urlencode("Please enter a valid zone description")
end if
' insert zone into db
mySQL="INSERT INTO shippingZones(zoneName) VALUES ('"&pZoneDesc1&"')"
call updateDatabase(mySQL, rstemp, "comersus_backoffice_addShipmentZoneExec.asp")
'Get the ZoneId
mySQL="SELECT Max(idShippingZone) as MaxId FROM shippingZones WHERE zoneName='"&pZoneDesc1&"'"
call getFromDatabase(mySQl, rstemp, "install5b")
pIdShippingZone = cInt(rstemp("MaxId"))
'Insert Zone Contents
mySQL="INSERT INTO shippingZonesContents(idShippingZone, zip, stateCode, countryCode) VALUES ("&pIdShippingZone&", '" &pZip1& "','" &pStateCode1& "','" &pCountryCode1& "')"
call updateDatabase(mySQL, rstemp, "comersus_backoffice_addShipmentZoneExec.asp")
if pZoneDesc2<>"" then
' insert zone into db
mySQL="INSERT INTO shippingZones(zoneName) VALUES ('"&pZoneDesc2&"')"
call updateDatabase(mySQL, rstemp, "comersus_backoffice_addShipmentZoneExec.asp")
'Get the ZoneId
mySQL="SELECT Max(idShippingZone) as MaxId FROM shippingZones WHERE zoneName='"&pZoneDesc2&"'"
call getFromDatabase(mySQl, rstemp, "install5b")
pIdShippingZone = cInt(rstemp("MaxId"))
'Insert Zone Contents
mySQL="INSERT INTO shippingZonesContents(idShippingZone, zip, stateCode, countryCode) VALUES ("&pIdShippingZone&", '" &pZip2& "','" &pStateCode2& "','" &pCountryCode2& "')"
call updateDatabase(mySQL, rstemp, "comersus_backoffice_addShipmentZoneExec.asp")
end if
%>
Installation Wizard
Step 5b - Shipping