<% Response.ExpiresAbsolute = Now() - 1 Dim fileId, cLoginDisable 'Passing parameter as fid rather than id will bypass the login process fileId = Request.QueryString("fid") If Len(Trim(fileID)) = 0 Then fileId = Request.QueryString("id") If Not Permissions("viewer") Then Response.Redirect cPath & "pages/unauthorized_access.asp" End If Else cLoginDisable = "f" End If If Len(Trim(fileId)) = 0 Then Response.Redirect "lib_browse.asp" %> <%=PAGE_TITLE%> <% ShowMetaTags %> <%ShowHeader%> <% Dim sql, rs sql = "SELECT * FROM file_titles WHERE id=" & fileId Set rs = DB_Open( sql ) If rs.eof = False Then %>
<% If rs.fields("description").Value = "" then Else %> <% End IF %> <% rs.Fields("access_count").Value = rs.Fields("access_count").Value + 1 rs.Update rs.Close%> <% Dim fileDesc, NewfileName, Newfiletype sql = "SELECT * FROM file_titles_byformat where file_id=" & fileId Set rs = DB_Open( sql ) If rs.eof = False Then %> <% End If Do While rs.eof = False NewfileName = Trim(LCase(rs.Fields("filename").Value)) Newfiletype = lCase(Mid(NewfileName, InstrRev(NewFileName, ".") + 1)) Select Case Newfiletype Case "pdf" fileDesc = "Adobe Acrobat" Case "jpg" fileDesc = "Graphic file (jpg)" Case "gif" fileDesc = "Graphic file (gif)" Case "xls" fileDesc = "Microsoft Excel" Case "doc" fileDesc = "Microsoft Word" Case "htm" fileDesc = "Webpage" Case "html" fileDesc = "Webpage" Case "wpd" fileDesc = "WordPerfect" Case "ppt" fileDesc = "Powerpoint" Case "zip" fileDesc = "Zip Archive" Case Else If lCase(Left(rs.Fields("filename").Value,4))="http" Then fileDesc = "Link to web page" Else fileDesc = "Unknown file type" End If End Select With Response .Write "" .Write "" .Write "" & vbCrLf .Write "" & vbCrLf End With rs.MoveNext Loop rs.close set rs = Nothing %>
File Information
Title <%= rs.Fields("title").Value %>
Description <%= Replace(rs.Fields("description").Value, vbCrLf, "
") %>
Provided By: <%= rs.Fields("provided_by").Value %>
<%If Permissions("admin") = True Then %> Page Visits: <%= rs.Fields("access_count").Value %> <%End If%>
Date Submitted: <%= rs.Fields("date_submitted").Value %>

Select the document to retrieve by clicking on the file name below:
Click with your right mouse button and choose "save target as" to specify where you want to save the file.
" .Write "
" .Write "" &fileDesc & "

 " .Write "" & NewfileName & "

Click here to download Acrobat Reader
Click here to download the free Adobe Acrobat Reader
<%End If%>


<%ShowFooter%>