Knowledge Index

Sales Process Knowledge Index


makeLibHeader();

// 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);
var num_retrieved = 0; while (search_cursor.next()) { num_retrieved++; } // END WHILE //Check for no rows returned from cursor if (!num_retrieved) { write("") write(" "); write(""); } // END IF
File Group Folder Description
write(""+search_cursor.filename+""); write(search_cursor.group); write(search_cursor.foldername); write(search_cursor.description);
Sorry no files found starting with the letter, number or range you selected.
} // END !new IF } // END dbconnect IF else { // if db not connected return to home page redirect("mn01.html"); } // END ELSE