11 # temporary variable for testing. Replace from /etc/koha.conf
13 my $templatedir="/usr/share/koha/intranet/htdocs/includes/templates";
15 my $templatename=$query->param('template');
16 my $startfrom=$query->param('startfrom');
17 ($startfrom) || ($startfrom=0);
18 ($templatename) || ($templatename="$templatedir/searchresults.tmpl");
24 my $template = HTML::Template->new(filename => $templatename, die_on_bad_params => 0);
27 #my $sth=$dbh->prepare("select * from biblio where author like 's%' order by author limit $startfrom,20");
29 #while (my $data=$sth->fetchrow_hashref){
30 # push @results, $data;
36 $search{'keyword'}=$keyword;
38 my ($count, @results) = &KeywordSearch(\$blah, 'intra', \%search, 20, $startfrom);
39 my $resultshash=\@results;
43 $template->param(startfrom => $startfrom);
45 $template->param(nextstartfrom => $startfrom);
46 $template->param(template => $templatename);
47 $template->param(SEARCH_RESULTS => $resultshash);
49 print "Content-Type: text/html\n\n", $template->output;