% if isempty(request("idCategory")) then response.redirect "viewAllCategories.asp?error="& escape("ERROR: Please select a category") response.end end if %> <% on error resume next dim rs, rsRand, rsPhoto, idCategory, status_msg, title, hierarchy(4, 2) title = "Edit Category" hierarchy(0, 0) = "Home" hierarchy(0, 1) = "home.asp" hierarchy(1, 0) = "Inventory Management" hierarchy(1, 1) = "inventoryOverview.asp" hierarchy(2, 0) = "Categories" hierarchy(2, 1) = "viewAllCategories.asp" idCategory = cLng(request("idCategory")) if not isempty(request.form("btnUpdateCategory")) then set adoProc = server.createObject("ADODB.Command") proc = run_proc(adoProc, "sp_updateCategory", adExecuteNoRecords, empty) if proc <> true then status_msg = status_msg &"
ERROR: Could not update category.
"& proc &"
Successfully Modified Category.
ERROR: Could not retrieve category information.
"& err.description &"
ERROR: Could not retrieve category photos.
"& err.description &"
ERROR: Could not retrieve category thumbnails.
"& err.description &"
| random thumbnail photos |
|---|
|
<%
while not rsRand.eof
for count = 1 to 2
if rsRand.eof then exit for
height = 90
if rsRand("thumb_width") <> "" then
width = rsRand("thumb_width")
else
width = 90
end if
if rsRand("thumb_height") > 90 then
width = height * rsRand("thumb_width") / rsRand("thumb_height")
end if
response.write ""
response.write " |