<% Timeout(1) Set con = Server.CreateObject("ADODB.Connection") con.Open Application("CString") if Request("CategoryID") <> Empty and IsNumeric(Request("CategoryID")) then Session("LibraryCategoryID") = Request("CategoryID") end if strSQL = "SELECT CategoryID, [Name] FROM L_Categories ORDER BY [Name]" Set rsCategory = con.execute(strSQL) %> Website Administration <% if Session("LibraryCategoryID") <> Empty then %> <% else %> <% end if %>
File / Document Library - Sub-Category maintenance
<% s_SelectedCategory = "" if rsCategory.EOF then %>

There are no categories!

<% else %>

To view existing sub-categories select a category.

Select A Category:

<% end if Set rsCategory = Nothing %>
<%=Server.HTMLEncode(s_SelectedCategory)%>
<% strSQL = "SELECT SubcategoryID, [Name] FROM L_Subcategories WHERE CategoryID = " & Session("LibraryCategoryID") & " ORDER BY [Name]" set rsSubCategory = server.createobject("ADODB.Recordset") rsSubCategory.open strSQL, con, 3, 1 if rsSubCategory.EOF then %>

There are no sub-categories.

<% else rsSubCategory.PageSize = 15 intPageCount = rsSubCategory.PageCount if request("intPage") <> empty and IsNumeric(request("intPage")) then intPage = CInt(request("intPage")) else intPage = 1 end if if intPage > intPageCount then intPage = intPageCount elseif intPage < 1 then intPage = 1 end if rsSubCategory.AbsolutePage = intPage if intPagecount > 1 then %>
<%if CDbl(intPage) > 1 then%><%else%> <%end if%> <% for i=1 to intPagecount if i = CDbl(intPage) then %> <% else%> <% end if next %>

Pages::

<%=i%>

<%=i%>

<%if CDbl(intPage) <> intPagecount then%><%else%> <%end if%>
<%end if%> <% counterx=0 for i = 1 to rsSubCategory.PageSize i_SubcategoryID = rsSubCategory("SubcategoryID") s_Name = rsSubCategory("Name") %> <%rsSubCategory.movenext%> <%if rsSubCategory.EOF then exit for%> <%Next%>
Sub-Category
&buster=<%=server.URLEncode(now)%>','right');">Edit &buster=<%=Server.URLEncode(Now())%>','right');">Delete

<%=Server.HTMLEncode(s_Name)%>

<% end if rsSubCategory.close set rsSubCategory = nothing %>

 

<% con.Close set con = Nothing %>