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
29 my $keywords = $input->param('keyword');
30 my $offset = $input->param('offset');
31 my $num = $input->param('num');
37 print $input->redirect('addbooks.pl');
39 if (! $offset) { $offset = 0 };
40 if (! $num) { $num = 10 };
42 $search{'keyword'}=$keywords;
43 ($count, @results) = KeywordSearch(undef,'intra',\%search,$num,$offset);
45 if ($count < ($offset + $num)) {
48 $total = $offset + $num;
53 print startmenu('acquisitions');
56 <font size="6"><em>Biblio Search Results</em></font><br />
58 You searched on <b>keywords $keywords,</b> $count results found <br />
59 Results $offset to $total displayed
61 <h2><a href="addbiblio.pl">Add New Biblio</a></h2>
64 <table border="0" cellspacing="0" cellpadding="5">
65 <tr valign=top bgcolor=#cccc99>
66 <td background="/images/background-mem.gif"><b>TITLE</b></td>
67 <td background="/images/background-mem.gif"><b>AUTHOR</b></td>
68 <td background="/images/background-mem.gif"><b>©</b></td>
72 for (my $i = 0; $i < ($total - $offset); $i++) {
75 <tr valign="top" bgcolor="#ffffcc">
79 <tr valign="top" bgcolor="#ffffff">
84 <td><a href="additem.pl?biblionumber=$results[$i]->{'biblionumber'}">$results[$i]->{'title'}</a></td>
85 <td><a href="additem.pl?biblionumber=$results[$i]->{'biblionumber'}">$results[$i]->{'author'}</a></td>
86 <td>$results[$i]->{'copyrightdate'}</td>
92 <tr valign=top bgcolor=#cccc99>
93 <td background="/images/background-mem.gif"> </td>
94 <td background="/images/background-mem.gif"> </td>
95 <td background="/images/background-mem.gif"> </td>
101 for (my $i = 0; ($i * $num) < $count; $i++) {
102 my $newoffset = $i * $num;
103 my $shownumber = $i + 1;
105 <a href="keywordsearch.pl?keyword=$keywords&offset=$newoffset&num=$num">$shownumber</a>
112 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=5">5</a>
113 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=10">10</a>
114 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=20">20</a>
115 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=50">50</a>