4 # Copyright 2000-2002 Katipo Communications
6 # This file is part of Koha.
8 # Koha is free software; you can redistribute it and/or modify it under the
9 # terms of the GNU General Public License as published by the Free Software
10 # Foundation; either version 2 of the License, or (at your option) any later
13 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along with
18 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
19 # Suite 330, Boston, MA 02111-1307 USA
28 my $keywords = $input->param('keyword');
29 my $offset = $input->param('offset');
30 my $num = $input->param('num');
36 print $input->redirect('addbooks.pl');
38 if (! $offset) { $offset = 0 };
39 if (! $num) { $num = 10 };
41 ($count, @results) = &websitesearch($keywords);
43 if ($count < ($offset + $num)) {
46 $total = $offset + $num;
51 print startmenu('acquisitions');
54 <font size="6"><em>Website Search Results</em></font><br />
56 You searched on <b>keywords $keywords,</b> $count results found <br />
57 Results $offset to $total displayed
59 <h2><a href="addbiblio.pl">Add New Biblio</a></h2>
62 <table border="0" cellspacing="0" cellpadding="5">
63 <tr valign=top bgcolor=#cccc99>
64 <td background="/images/background-mem.gif"><b>TITLE</b></td>
65 <td background="/images/background-mem.gif"><b>AUTHOR</b></td>
66 <td background="/images/background-mem.gif"><b>©</b></td>
70 for (my $i = $offset; $i < $total; $i++) {
73 <tr valign="top" bgcolor="#ffffcc">
77 <tr valign="top" bgcolor="#ffffff">
82 <td><a href="additem.pl?biblionumber=$results[$i]->{'biblionumber'}">$results[$i]->{'title'}</a></td>
83 <td><a href="additem.pl?biblionumber=$results[$i]->{'biblionumber'}">$results[$i]->{'author'}</a></td>
84 <td>$results[$i]->{'copyrightdate'}</td>
89 <tr valign=top bgcolor=#cccc99>
90 <td background="/images/background-mem.gif"> </td>
91 <td background="/images/background-mem.gif"> </td>
92 <td background="/images/background-mem.gif"> </td>
98 for (my $i = 0; ($i * $num) < $count; $i++) {
99 my $newoffset = $i * $num;
101 <a href="keywordsearch.pl?keyword=$keywords&offset=$newoffset&num=$num">$i</a>
108 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=5">5</a>
109 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=10">10</a>
110 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=20">20</a>
111 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=50">50</a>