// When the user enters this page from the Search page,
// Search Results is displayed at the top of the page.
if (request.card=="search")
{write('Search Results...');}
if (database.connected()) {
/* Different queries are created based on the page that the user
is entering from. Possible entry points are: Search, Navigation
Bar (new), Main, and this page itself. When the user enters the
page a specific "card" with with which to access the index is
passed in. In the case of Search and New, the parameters are pre-
determined. In the case of Main and KIndex, the card is a specific
value or range of values which are passed on to the function which
generates the WHERE clause of the query.
*/
if ((request.card != "search") && (request.card != "new"))
{head_string = "select folder.group, file.location, folder.foldername, file.filename, file.description, activationdate, expirationdate " +
" from file, folder " +
" where file.folderid = folder.folderid and "
search_string = createSearchstring(request.card);
tail_string = " order by file.filename, folder.group, folder.foldername"
result_string = head_string+search_string+tail_string;
} // END IF
else
{if(request.card == "search")
{result_string = file_db_string();
} // END IF
else
{ write("
By selecting a value from the menu above, a list of filenames which match the value will be displayed.
");
} // END ELSE
} // END ELSE
if (request.card != "new")
{
search_cursor = database.cursor(result_string);
File
Group
Folder
Description
var num_retrieved = 0;
while (search_cursor.next())
{