<% Dim strSQL Dim strSearchWord Dim oRS Dim IntSearchResultsCount Dim strCopyrightPage Dim blnRebus Dim strResultsString strSearchWord = request.form("search_word") If LCase(request.form("rebus")) = "on" Then blnRebus = True %> How it is
How it is
Subject browse
Image search
Triangle Services Limited NSPCC
     

An image vocabulary for children about feelings, rights and safety, personal care and sexuality

Image Search

Each image has a list of associated words to describe its meaning. To search for specific images, enter the descriptive word below and press the search button.

   Rebus symbols only


<% If request.form("Search") = "Search" Then %>
Search Results

<% strSQL = "SELECT COUNT(*) as image_count FROM images WHERE words LIKE '%" & ReplaceQuote(strSearchWord) & "%'" If blnRebus Then strSQL = strSQL & " AND copyright = 'r'" set oRS = RunSQLReturnRS(strSQL,"") If NOT (oRS.BOF AND oRS.EOF) Then oRS.MoveFirst IntSearchResultsCount = oRS("image_count") End If strResultsString = "" & IntSearchResultsCount If blnRebus Then strResultsString = strResultsString & " Rebus symbol" Else strResultsString = strResultsString & " image" End If If (CInt(IntSearchResultsCount) > 1 OR CInt(IntSearchResultsCount) = 0) Then strResultsString = strResultsString & "s" strResultsString = strResultsString & " found for """ & strSearchWord & """" Response.write strResultsString %>
<% If IntSearchResultsCount > 0 Then %> <% strSQL = "SELECT page_number, image_position, words, copyright, filename, explicit FROM images WHERE words LIKE '%" & ReplaceQuote(strSearchWord) & "%'" If blnRebus Then strSQL = strSQL & " AND copyright = 'r'" set oRS = RunSQLReturnRS(strSQL,"") Do Until oRS.EOF Select Case oRS("copyright") Case "k" strCopyrightPage = "cnspcc.htm" Case "b" strCopyrightPage = "cblack.htm" Case "r" strCopyrightPage = "cwidget.htm" End Select %> <% If oRS("explicit") Then %> <% Else %> <% End If %> <% oRS.MoveNext Loop End If oRs.close set oRs = nothing %>
Reference Descriptive Phrases
<%=oRS("page_number") & oRS("image_position")%> ');"><%=oRS("words")%>',250,350,'yes','<%=oRS("filename")%>');"><%=oRS("words")%> ©
<% End If %>

<% '----- This function converts normal single quote (apostrophy) '----- to double quotes so that the information can be stored in '----- the DB successfully. Function ReplaceQuote(strOriginalText) On Error Resume next Dim i Dim ch Dim strNewText strNewText = "" For i = 1 to len(strOriginalText) ch = mid(strOriginalText, i, 1) If ch = chr(39) Then ch = "''" end If If ch = chr(34) Then ch = "" End If strNewText = strNewText & ch ' Replace! Next ReplaceQuote = strNewText End Function %>