} } */ if (! $have_query_flag) { print_bottom(); return; } elseif ($have_query_flag && ($q=='')) { print ("<FONT COLOR=red>You should give at least one word to search for.</FONT>\n"); print_bottom(); return; } try { $results = $udm->query($q); } catch (Exception $e) { print_error_local($e->getMessage()); exit(); } $found = $results->found; if (!$found) { print ("Search Time: {$results->searchtime}<br>Search results:\n"); print ("<small>{$results->wordinfo}</small><HR><CENTER>Sorry, but search returned no results.<P>\n"); print ("<I>Try to produce less restrictive search query.</I></CENTER>\n"); print_bottom(); return; } $from=IntVal($np)*IntVal($ps); $to=IntVal($np+1)*IntVal($ps);
} } if (! $have_query_flag) { print_bottom(); return; } elseif ($have_query_flag && ($q=='')) { print ("<FONT COLOR=red>You should give at least one word to search for.</FONT>\n"); print_bottom(); return; } $res=Udm_Find($udm_agent,$q); if(($errno=Udm_Errno($udm_agent))>0){ print_error_local(Udm_Error($udm_agent)); } else { $found=Udm_Get_Res_Param($res,UDM_PARAM_FOUND); $rows=Udm_Get_Res_Param($res,UDM_PARAM_NUM_ROWS); $wordinfo=Udm_Get_Res_Param($res,UDM_PARAM_WORDINFO); $searchtime=Udm_Get_Res_Param($res,UDM_PARAM_SEARCHTIME); $first_doc=Udm_Get_Res_Param($res,UDM_PARAM_FIRST_DOC); $last_doc=Udm_Get_Res_Param($res,UDM_PARAM_LAST_DOC); if (!$found) { print ("Search Time: $searchtime<br>Search results:\n"); print ("<small>$wordinfo</small><HR><CENTER>Sorry, but search returned no results.<P>\n"); print ("<I>Try to produce less restrictive search query.</I></CENTER>\n"); print_bottom(); return;