<!--#include file="../../owFunctions/I_GeneralFunctions.asp"-->
<%
	'************************************************************************************
	'*																					*
	'*	MODIFICATION TO THIS SCRIPT OR ANY FILES INCLUDED WITH 							*
	'*		ONEWORLDSTORE IS DONE AT YOUR OWN RISK!										*
	'*	Product  : OneWorldStore														*
	'*	Version  : 9.0000																*
	'*	Modified : June 2004															*
	'*	Copyright:	Copyright (C) 2004 OneWorldStore.Com								*
	'*				Registration Number: 1024507										*
	'*				http://strategis.ic.gc.ca/											*
	'*																					*
	'************************************************************************************

	sShipmentDesc		= CONVERSION_SQLEncode2(Request("shipmentDesc"),100)
	sPriceToAdd			= CONVERSION_SQLEncode2(Request("priceToAdd"),20)
	sPercentageToAdd	= CONVERSION_SQLEncode2(Request("percentageToAdd"),20)
	sHandlingFix		= CONVERSION_SQLEncode2(Request("handlingFix"),20)
	sHandlingPercentage	= CONVERSION_SQLEncode2(Request("handlingPercentage"),20)
	sShipmentTime		= CONVERSION_SQLEncode2(Request("shipmentTime"),50)
	sQuantityFrom		= CONVERSION_SQLEncode2(Request("quantityFrom"),20)
	sQuantityUntil		= CONVERSION_SQLEncode2(Request("quantityUntil"),20)
	sWeightFrom			= CONVERSION_SQLEncode2(Request("WeightFrom"),20)
	sWeightUntil		= CONVERSION_SQLEncode2(Request("WeightUntil"),20)
	sPriceFrom			= CONVERSION_SQLEncode2(Request("priceFrom"),20)
	sPriceUntil 		= CONVERSION_SQLEncode2(Request("priceUntil"),20)
	sZip				= CONVERSION_SQLEncode2(Request("zip"),20)
	sZipEq	 			= CONVERSION_SQLEncode2(Request("zipEq"),10)
	sStateCode			= CONVERSION_SQLEncode2(Request("stateCode"),20)
	sStateCodeEq 		= CONVERSION_SQLEncode2(Request("stateCodeEq"),10)
	sCountryCode		= CONVERSION_SQLEncode2(Request("countryCode"),20)
	sCountryCodeEq		= CONVERSION_SQLEncode2(Request("countryCodeEq"),10)
	sIDCustomerType		= CONVERSION_SQLEncode2(Request("customerType"),10)

	if sZipEq="" then sZipEq="0" end if
	if sStateCodeEq="" then sStateCodeEq="0" end if
	if sCountryCodeEq="" then sCountryCodeEq="0" end if
	
	if sPriceToAdd="" then sPriceToAdd="0" end if
	if sPercentageToAdd="" then sPercentageToAdd="0" end if
	if sQuantityFrom="" then sQuantityFrom="0" end if
	if sQuantityUntil="" then sQuantityUntil="0" end if
	if sWeightFrom="" then sWeightFrom="0" end if
	if sWeightUntil="" then sWeightUntil="0" end if
	if sPriceFrom="" then sPriceFrom="0" end if
	if sPriceUntil="" then sPriceUntil="0" end if
	if sHandlingPercentage="" then sHandlingPercentage="0" end if
	if sHandlingFix="" then sHandlingFix="0" end if

	sSQLText = "INSERT INTO shipments (shipmentDesc, priceToAdd, percentageToAdd, shipmentTime, quantityFrom, quantityUntil, WeightFrom, WeightUntil, priceFrom, priceUntil, zip, zipEq, stateCode, stateCodeEq, countryCode, countryCodeEq, IDCustomerType, handlingPercentage, handlingFix) VALUES ('" &sShipmentDesc & "',"& sPriceToAdd &","& sPercentageToAdd &",'"&sShipmentTime&"',"&sQuantityFrom&","&sQuantityUntil&","&sWeightFrom&","&sWeightUntil&","&sPriceFrom& "," &sPriceUntil& ",'" &sZip& "'," &sZipEq& ",'" &sStateCode& "'," &sStateCodeEq& ",'" &sCountryCode& "'," &sCountryCodeEq& ", " &sIDCustomerType& "," &sHandlingPercentage& "," &sHandlingFix& ")"
	Call DB_updateDatabase(sSQLText)
	%>
	<script language = "javascript">
		parent.owBodyTopNav.location="owBodyTopNav.asp?sMessage=<%=Server.URLEncode(LANG_DT( "MANUALSHIP_SHIPPINGADDED", "** Shipping Type added. **" ))%>";
		location="owListShipments.asp?sSort=<%=sSort%>&sSearch=<%=sSearch%>&sSearchText=<%=sSearchText%>";
	</script>