ad_page_contract { Search results -- finds employees and offices that match the search string. This works as-is with the ArsDigita Community System 3.x Intranet Module, but the queries can easily be changed to work with another system. You may use this software free under the GNU General Public License. @param letters_of_name search string @param passcode The 4-digit passcode, in case someone tries to access this page w/out going through passcode-check.tcl. @author Eve Andersson, eveander@eveander.com @creation-date February 24, 2001 } { letters_of_name passcode:notnull,integer } if { [string compare $passcode [vxml_tellme_phone_dir_passcode]] != 0 } { ns_log Notice "/tellme/name-search-results.tcl exiting due to incorrect passcode" return } set sql "select u.user_id, u.first_names, u.last_name from users u, im_employees_active e where u.user_id = e.user_id and vxml_keypad_string(u.last_name) like '$letters_of_name%'" set result_counter 0 set grammar_list [list] set prompt_list [list] db_foreach name_matches $sql { incr result_counter lappend grammar_list "\[$result_counter dtmf-$result_counter\] {