#!/usr/bin/perl # Copyright 2000-2002 Katipo Communications # # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # Koha is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA use CGI; use strict; use C4::Catalogue; use C4::Biblio; use C4::Output; my $input = new CGI; my $keywords = $input->param('keyword'); my $offset = $input->param('offset'); my $num = $input->param('num'); my $total; my $count; my @results; if (! $keywords) { print $input->redirect('addbooks.pl'); } else { if (! $offset) { $offset = 0 }; if (! $num) { $num = 10 }; ($count, @results) = &websitesearch($keywords); if ($count < ($offset + $num)) { $total = $count; } else { $total = $offset + $num; } # else print $input->header; print startpage(); print startmenu('acquisitions'); print << "EOF"; Website Search Results
You searched on keywords $keywords, $count results found
Results $offset to $total displayed

Add New Biblio

EOF for (my $i = $offset; $i < $total; $i++) { if ($i % 2) { print << "EOF"; EOF } else { print << "EOF"; EOF } # else print << "EOF"; EOF } # for print << "EOF";
TITLE AUTHOR ©
$results[$i]->{'title'} $results[$i]->{'author'} $results[$i]->{'copyrightdate'}
     

EOF for (my $i = 0; ($i * $num) < $count; $i++) { my $newoffset = $i * $num; print << "EOF"; $i EOF } # for print << "EOF";

Results per page: 5 10 20 50


 

EOF print endmenu(); print endpage(); } # else