". "
\n"; //----- Master action switch switch ($action) { case __("Search"): // Perform query unset($list); if (!empty($drug)) { $list = RxList::get_list($drug); } // If no results, die right here if (!isset($drug) or (count($list) < 1)) { $display_buffer .= __("No drugs found with that criteria!"); break; } // Handle immediate passing and closing if (count($list) == 1) { $GLOBALS['__freemed']['on_load'] = 'process'; $display_buffer .= " We should be '".prepare($drug[0])."'. "; // Add to pick list $pick_list = $list; } else { // end handling only one result unset($pick_list); $pick_list = $list; } $display_buffer .= "
".html_form::select_widget( "list", $pick_list, array('on_change' => 'my_process()') )."
"; break; default: $display_buffer .= "
".__("Drug")." :
"; break; } // end switch //----- End of form $display_buffer .= "
\n"; //----- Display template $GLOBALS['__freemed']['no_template_display'] = true; template_display(); ?>