<%@ Language=VBScript %> <% '************************************************************************* ' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK! ' Function : Shipping Method Maintenance ' Product : CandyPress Store Administration ' Version : 2.5 ' Modified : February 2004 ' Copyright: Copyright (C) 2004 CandyPress.Com ' See "license.txt" for this product for details regarding ' licensing, usage, disclaimers, distribution and general ' copyright requirements. If you don't have a copy of this ' file, you may request one at webmaster@candypress.com '************************************************************************* Option explicit Response.Buffer = true const adminLevel = 1 %> <% 'Database dim mySQL, cn, rs 'ShipMethod dim idShipMethod dim shipDesc dim status 'Work Fields dim action '************************************************************************* 'Open Database Connection call openDB() 'Store Configuration if loadConfig() = false then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode("Could not load Store Configuration settings.") end if 'Get action action = trim(Request.QueryString("action")) if len(action) = 0 then action = trim(Request.Form("action")) end if action = lCase(action) if action <> "edit" and action <> "add" then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode("Invalid Action Indicator.") end if if action = "edit" then 'Get idShipMethod idShipMethod = trim(Request.QueryString("recId")) if len(idShipMethod) = 0 then idShipMethod = trim(Request.Form("recId")) end if if idShipMethod = "" or not isNumeric(idShipMethod) then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode("Invalid Record ID.") end if 'Get ShipMethod Record mySQL="SELECT shipDesc,status " _ & "FROM ShipMethod " _ & "WHERE idShipMethod = " & idShipMethod set rs = openRSexecute(mySQL) if rs.eof then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode("Invalid Record ID.") else shipDesc = rs("shipDesc") status = rs("status") end if call closeRS(rs) end if 'Close database connection call closedb() %>

Shipping - Store Method Maintenance

<% 'Page Tabs call shipTabs("CM") 'Edit if action = "edit" then if len(trim(Request.QueryString("msg"))) > 0 then %> <%=Request.QueryString("msg")%>

<% end if %> Edit Shipping Method  <%call maintNavLinks()%>

Description Status  
<% end if 'Add if action = "add" then %> Add Shipping Method  <%call maintNavLinks()%>

Description Status  
<% end if if action = "edit" or action = "add" then %>
Help and Instructions :
Description - Mandatory. The description you want to give to this Shipping Method. Eg. 'FedEx Ground', 'UPS 2 Day Air', 'MyStore Special Shipping', etc.

Status - Mandatory. If set to 'Yes' this Shipping Method will be active and therefore included when the system calculates Shipping Rates for a particular order.

<% end if %> <% '********************************************************************* 'Create Navigation Links '********************************************************************* sub maintNavLinks() %> [ List Methods | Add ] <% end sub %>