sub returnresults { # creates HTML page from template file my %h; my ($options, $sortby, $casesearch, $commonterms, $subsearch_string, $subsearch_info); my $rank = 0; $query_terms_copy =~ s/\s$//; my $bare_query = $query_terms_copy; my $query_str = CGI::escape($bare_query_terms); my $previous_query_str = CGI::escape($previous_query); $bare_query_terms =~ s/\"/\"\;/g; $h{query_str} = $bare_query_terms; $h{version} = $VERSION; $h{search_url} = $SEARCH_URL; $h{input_name} = $FORM_INPUT_NAME; $html = get_template($KSEARCH_TEMPLATE); my $results = @sortedanswers; my $currentpage = $query->param('p'); $currentpage ||= 1; if ($SEARCH_RESULTS && $query->param('pq') !~ /^\s*$/) { $subsearch_string = '&pq='.CGI::escape($query->param('pq')); $subsearch_info = ' im vorherigen Ergebnis'; }