%@LANGUAGE="VBSCRIPT"%>
<% If request("ShippingAdd") = "1" Then
response.write "oliver"
For each item in Request.Form
If item = "MinPurchase" Then
MinPurchaseValue = Request(item)
End If
If item = "MaxPurchase" Then
MaxPurchaseValue = Request(item)
End If
If item = "ShippingCost" Then
ShippingCostValue = Request(item)
End If
Response.Write "MinPurchase = " & MinPurchaseValue & "
"
Response.Write "MaxPurchase = " & MaxPurchaseValue & "
"
Response.Write "ShippingCost = " & ShippingCostValue & "
"
Next
response.end
Dim InsertShipping__MinPurchase
InsertShipping__MinPurchase = ""
if(Request("MinPurchase") <> "") then InsertShipping__MinPurchase = Request("MinPurchase")
Dim InsertShipping__MaxPurchase
InsertShipping__MaxPurchase = ""
if(Request("MaxPurchase") <> "") then InsertShipping__MaxPurchase = Request("MaxPurchase")
Dim InsertShipping__ShippingCost
InsertShipping__ShippingCost = ""
if(Request("ShippingCost") <> "") then InsertShipping__ShippingCost = Request("ShippingCost")
For each item in Request.Form
If item = "MinPurchase" Then
MinPurchaseValue = Request(item)
End If
If item = "MaxPurchase" Then
MaxPurchaseValue = Request(item)
End If
If item = "ShippingCost" Then
ShippingCostValue = Request(item)
End If
set InsertShipping = Server.CreateObject("ADODB.Command")
InsertShipping.ActiveConnection = MM_OLEDB_STRING
InsertShipping.CommandText = "dbo.spSHOP_InsertShipping"
InsertShipping.CommandType = 4
InsertShipping.CommandTimeout = 0
InsertShipping.Prepared = true
InsertShipping.Parameters.Append InsertShipping.CreateParameter("@MinPurchase", 6, 1,8,MinPurchaseValue)
InsertShipping.Parameters.Append InsertShipping.CreateParameter("@MaxPurchase", 6, 1,8,MaxPurchaseValue)
InsertShipping.Parameters.Append InsertShipping.CreateParameter("@ShippingCost", 6, 1,8,ShippingCostValue)
InsertShipping.Execute()
Next
Response.Write ""
End If
%>
<%
set rsSHIPPING = Server.CreateObject("ADODB.Recordset")
rsSHIPPING.ActiveConnection = MM_OLEDB_STRING
rsSHIPPING.Source = "SELECT * FROM dbo.tblSHOP_ShippingCostByRange"
rsSHIPPING.CursorType = 0
rsSHIPPING.CursorLocation = 2
rsSHIPPING.LockType = 3
rsSHIPPING.Open()
rsSHIPPING_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rsSHIPPING_numRows = rsSHIPPING_numRows + Repeat1__numRows
%>