<!--#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/											*
	'*																					*
	'************************************************************************************

	sSort			= Trim(Request("sSort"))
	sSearchText		= Trim(Request("sSearchText"))
	sSearch			= Trim(Request("sSearch"))
	pOptionDescrip	= CONVERSION_SQLEncode2(SQLEncode(Request("optionDescrip")),150)
	ppriceToAdd		= CONVERSION_SQLEncode2(Request("priceToAdd"),20)
	pWeight			= CONVERSION_SQLEncode2(Request("weight"),20)
	
	If ( pWeight = "" ) Then
		pWeight = "0"
	End If
	If ( ppriceToAdd = "" ) Then
		ppriceToAdd = "0"
	End If

	If ( NOT bOWBackOfficeDemoMode ) Then	' just do a cursory check in case hackers try to replicate the forms on their computers (return no error)
		call DB_updateDatabase("INSERT INTO options (optionDescrip, priceToAdd, weight) VALUES ('" &poptionDescrip& "'," &ppriceToAdd& "," &pWeight & ")")
	End If
	%>
	<script language = "javascript">
		parent.owBodyTopNav.location="owBodyTopNav.asp?sMessage=<%=Server.URLEncode(LANG_DT( "OPTION_CREATED", "** Option Created **" ))%>";
		location="owAddOptionsForm.asp?sSort=<%=sSort%>&sSearch=<%=sSearch%>&sSearchText=<%=sSearchText%>";
	</script>