<% 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] AS 'Category' " & _ "FROM Library_Category " & _ "ORDER BY [Name]" Set rsCategory = con.execute(strSQL) %> Website Administration <% if Session("LibraryCategoryID") <> Empty then %> <% else %> <% end if %>
File / Document Library - Library maintenance
<% s_SelectedCategory = "" if rsCategory.EOF then %>

There are no categories!

<% else %>

To view existing files select a category.

Select Sub-Category:

<% end if Set rsCategory = Nothing %>
<%=Server.HTMLEncode(s_SelectedCategory)%>
<% strSQL = "SELECT Lib_FileID, [Description], FileName, FileType, UploadDate FROM Library WHERE CategoryID = " & Session("LibraryCategoryID") & " ORDER BY UploadDate DESC, Lib_FileID DESC" set rsLibrary = server.createobject("ADODB.Recordset") rsLibrary.open strSQL, con, 3, 1 if rsLibrary.EOF then %>

There are no Files / Documents.

<% else rsLibrary.PageSize = 15 intPageCount = rsLibrary.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 rsLibrary.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 rsLibrary.PageSize i_Lib_FileID = rsLibrary("Lib_FileID") s_Description = rsLibrary("Description") s_FileName = rsLibrary("FileName") s_FileType = rsLibrary("FileType") s_UploadDate = rsLibrary("UploadDate") %> <%rsLibrary.movenext%> <%if rsLibrary.EOF then exit for%> <%Next%>
Description File Upload Date
&buster=<%=server.URLEncode(now)%>','right');">Edit &buster=<%=Server.URLEncode(Now())%>','right');">Delete

<%=Server.HTMLEncode(s_Description)%>

<%=Server.HTMLEncode(s_FileName)%>

<%=Day(s_UploadDate) & " " & MonthName(Month(s_UploadDate)) & " " & Year(s_UploadDate)%>

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

 

<% con.Close set con = Nothing %>