<% on error resume next if isempty(request("idPhoto")) then response.redirect "viewAllPhotos.asp?error="& escape("ERROR: You must select a photo before adding a pricing option.") response.end end if %> <% dim proc, rs, idPricing, idPhoto dim name, size, price, resin_price, description, make_offer, offer_limit, is_active, in_stock dim status_msg, title, hierarchy(4, 2) status_msg = "" title = "Create Pricing Option" hierarchy(0, 0) = "Home" hierarchy(0, 1) = "home.asp" hierarchy(1, 0) = "Inventory Management" hierarchy(1, 2) = "inventoryOverview.asp" hierarchy(2, 0) = "Photographs" hierarchy(2, 1) = "viewAllPhotos.asp" hierarchy(3, 0) = "Add Pricing Option" hierarchy(3, 1) = "createPricing.asp" idPhoto = cLng(request("idPhoto")) set adoProc = server.createObject("ADODB.Command") if not isempty(request.form("btnInsertPricing")) then proc = run_proc_return(adoProc, "sp_insertPricing", adExecuteNoRecords, idPricing, adInteger) if proc = true then status_msg = status_msg &"

Successfully Inserted Pricing Option ID # "& idPricing &"


" else status_msg = status_msg &"

ERROR: Could not insert pricing option.
"& proc &"


" name = request.form("name") size = request.form("size") price = request.form("price") resin_price = request.form("resin_price") description = request.form("description") make_offer = request.form("make_offer") offer_limit = request.form("offer_limit") is_active = request.form("is_active") in_stock = request.form("in_stock") end if end if proc = run_proc(adoProc, "sp_getPhotograph", 0, rs) if proc <> true then status_msg = status_msg &"

ERROR: Could not retrieve photograph info.
"& proc &"


" end if set adoProc = nothing %>

add pricing option

<% if status_msg <> "" then %> <% end if %>
<%= left(status_msg, len(status_msg) - 12)%>
photograph <%= rs("title")%>
pricing name maxlength="150" />
photo size maxlength="150" />
price maxlength="8" />
resin price maxlength="8" />
description
offer limit maxlength="8" />
/> class="chk" onclick="this.form.is_active.value = (this.checked) ? 0 : 1;" />      /> class="chk" onclick="this.form.in_stock.value = (this.checked) ? 1 : 0;" />      /> class="chk" onclick="this.form.make_offer.value = (this.checked) ? 1 : 0;" />