<% 'get Recordset, objRS
dim objRS
set objRS = server.CreateObject("adodb.recordset")
dim y
if request("goCat") = "Go" and request("txtSearchCategory") <> "" then
y = FindLUCategoriesByName( request("txtSearchCategory"),(request("selDoc")), objRS)
elseif request("showCat") <> "" then
y = GetLUCategories("", objRS)
elseif request ("selDoc")<> "" then
y = GetLUCategoriesByLayer(objrs, request ("selDoc"), 2)
else
y = GetLUCategories("", objRS)
end if
if objRS.eof then
if request ("selDoc")<> "" then
y = GetLUCategoriesByLayer (objrs, request ("selDoc"), 2)
if layer >= 1 then
objRS.MoveNext
else
end if
Do While Not objRS.EOF
category = objrs("CATEGORY_NAME")
layer = objrs("LAYER_NUMBER")
documentTypeId = objrs("DOCUMENT_TYPE_ID")
categoryId = objrs("CATEGORY_ID")
parentCategoryId = objrs("PARENT_CATEGORY_ID")
dim counter
counter = 0
loopCounter = loopCounter + 1
'Now loop through the recordset Fields
For Each objField in objRS.Fields
counter = counter + 1
temp = objField.value
if objField.name = "CATEGORY_ID" then
elseif objField.name = "CATEGORY_NAME" then
if IsNull(objField.value) then
temp = " "
end if
'First, display the TABLE header info:
Response.Write "<Table border=1 cellspacing=0 cellpadding=5 id=box>"
'Write the TR
Response.Write "<TR>"
Response.Write "<TD>"
Response.Write "<ul>"
Response.Write "<a href=category.asp?edit=categoryId" & ">" & Category & "</a>"
Response.Write "<ul>"
Response.Write "<li>" & Category & "</li>"
Response.Write "</ul>"
Response.Write "</ul>"
Response.Write "</TD>"
Response.Write "<TD>" & "</TD>"
'Close the TR tag
Response.Write "</TR>"
'Close the table tag...
Response.Write "</TABLE>"
end if
Next
'Advance the recordset
objRS.MoveNext
Loop
end if
objRS.close
set objRS = nothing
end if
%>