<% mTitle = "Downloads" ID = "8" 'ID = TRIM(Request("ID")) FormPost = TRIM(Request("FormPost")) cID = TRIM(Request("cID")) DocumentTypeID = Request.QueryString("DocumentTypeID") Title = TRIM(Request("Title")) Author = TRIM(Request("Author")) mYear = TRIM(Request("Year")) LanguageID = TRIM(Request("languageid")) SubjectID = TRIM(Request("subjectid")) If NOT ISNumeric(ID) Then ID = 0 End If If NOT ISNumeric(cID) Then cID = 0 End If If FormPost <> "1" Then ErrorTrap(Top() & "

" & Classification() & Bottom()) Else ErrorTrap(Top() & Documents() & Bottom()) End If Function Documents() 'Set fs = CreateObject("Scripting.FileSystemObject") sql = "SELECT ID, Title, Author, Documentfile, ID, DocumentTypeID, LanguageID, Summary, URL FROM document " If TRIM(Title) <> "" Then sql2=sql2 & " Title Like '%" & TRIM(Title) & "%' OR Summary Like '%" & TRIM(Title) & "%' AND " End If If TRIM(Author)<>"" Then sql2=sql2 & " Author Like '%" & TRIM(Author) & "%' AND " End If If TRIM(mYear)<>"" Then sql2=sql2 & " Year Like '%" & TRIM(mYear) & "%' AND " End If If ISNumeric(TRIM(LanguageID)) Then sql2=sql2 & " LanguageID=" & LanguageID & " AND " End If If ISNumeric(TRIM(DocumentTypeID)) Then sql2=sql2 & " DocumentTypeID=" & DocumentTypeID & " AND " End If If Len(sql2)>4 Then sql2=LEFT(sql2,LEN(sql2)-4) sql=sql & " WHERE " & sql2 End If sql=sql & " ORDER BY DocumentTypeID, ID DESC;" Set RS = dba.Execute(sql, RecAffect, 1) If NOT RS.EOF Then Str=Str & "
" & PubTop() & "
The following publication(s) and/or report(s) fall within the classification you have selected. To search for more specific publications please use the document search engine located at the bottom of this page.
" If ISNumeric(TRIM(DocumentTypeID)) Then 'Str=Str & "
" & GetMyField("documenttype", DocumentTypeID) & "
" Str=Str & "
   " & GetMyField("documenttype", DocumentTypeID) & "
" End If Str=Str & "
" Str=Str & "

" Str=Str & "" mColor = "beige" Str=Str & "" 'Str=Str & "" Do While NOT RS.EOF If mColor = "#FFF5F4" Then mColor = "#ffffff" Else mColor = "#FFF5F4" End If mTemp = "" mTemp = mTemp & RS(7) Str=Str & "" Str=Str & "" If RS(2) <> "" Then Str=Str & "" Else Str=Str & "" End If If ISNumeric(RS(6)) Then Str=Str & "" Else Str=Str & "" End If If ISNumeric(RS(5)) Then Str=Str & "" Else Str=Str & "" End If Str=Str & "" RS.MoveNext LOOP Str=Str & "
TitleAuthor(s)LanguageClassification
TitleAuthor(s)LanguageClassification
" if trim(rs(3)) <> "" Then Str=Str & "" & RS(1) & "" 'Str=Str & "" & RS(1) & "" 'response.write(server.urlencode(" ")) else If rs(8) <> "" Then Str=Str & "" & RS(1) & "" Else Str=Str & "" & RS(1) & "" End If end if If TRIM(mTemp) <> "" Then Str=Str & "

" & putbreaks(mTemp) & "
" End If Str=Str & "
" & RS(2) & " - " & GetMyField("language",RS(6)) & " - " & GetMyField("documenttype",RS(5)) & " - 
" Else Str=Str & "


No document matches the criteria requested or no documents have been published under this category.


" End If Str=Str & DocumentSearch() Documents = Str End Function Function Classification() sql = "SELECT ID, Title, Description FROM documenttype ORDER BY ID;" Set RS = dba.Execute(sql, RecAffect, 1) If NOT RS.EOF Then Str=Str & "
" & PubTop() & "
Welcome to our publications depository. To search for more specific publications please use the document search engine located at the bottom of this page.
" Str=Str & "
" Str=Str & "
" Str=Str & "" mColor = "beige" Do While NOT RS.EOF If mColor = "#FFF5F4" Then mColor = "#ffffff" Else mColor = "#FFF5F4" End If mTemp = "" mTemp = mTemp & "" mTemp = mTemp & RS(2) ssql = "SELECT Count(*) FROM document WHERE DocumentTypeID=" & RS(0) & ";" Set RSS = dba.Execute(ssql, RecAffect, 1) mTotal = RSS(0) Str=Str & "" RS.MoveNext LOOP Str=Str & "
" & RS(1) & "

" & mTemp & "
" & mTotal & " Document(s) AvailableView
" End If Str=Str & DocumentSearch() Classification = Str End Function Function PubTop() Str=Str & "
Publications HomePublications Search
" PubTop = Str End Function Function DocumentSearch() Str=Str & "" Str=Str & "" Str=Str & "" Str=Str & "" Str=Str & "" Str=Str & "" Str=Str & "
Document Search
Search Phrase
 
Classification
" & DropDown("documenttypeid","") & "
Year Published
" & GetField("document","Year",mYear) & "
Language
" & DropDown("languageid","") & "
" Str=Str & "
How to Search

" Str=Str & "
  1. Type in the word(s) or phrase that you want to search for
  2. " Str=Str & "
  3. Select additional criteria to narrow down your results e.g. author, language etc.
  4. " Str=Str & "
  5. Click on the 'Get Results' Button to execute your search.
  6. " Str=Str & "
" Str=Str & "
" DocumentSearch = Str End Function %>