11 my $keywords = $input->param('keyword');
12 my $offset = $input->param('offset');
13 my $num = $input->param('num');
19 print $input->redirect('addbooks.pl');
21 if (! $offset) { $offset = 0 };
22 if (! $num) { $num = 10 };
24 $search{'keyword'}=$keywords;
25 ($count, @results) = KeywordSearch(undef,'intra',\%search,$num,$offset);
27 if ($count < ($offset + $num)) {
30 $total = $offset + $num;
35 print startmenu('acquisitions');
38 <font size="6"><em>Biblio Search Results</em></font><br />
40 You searched on <b>keywords $keywords,</b> $count results found <br />
41 Results $offset to $total displayed
43 <h2><a href="addbiblio.pl">Add New Biblio</a></h2>
46 <table border="0" cellspacing="0" cellpadding="5">
47 <tr valign=top bgcolor=#cccc99>
48 <td background="/images/background-mem.gif"><b>TITLE</b></td>
49 <td background="/images/background-mem.gif"><b>AUTHOR</b></td>
50 <td background="/images/background-mem.gif"><b>©</b></td>
54 for (my $i = 0; $i < ($total - $offset); $i++) {
57 <tr valign="top" bgcolor="#ffffcc">
61 <tr valign="top" bgcolor="#ffffff">
66 <td><a href="additem.pl?biblionumber=$results[$i]->{'biblionumber'}">$results[$i]->{'title'}</a></td>
67 <td><a href="additem.pl?biblionumber=$results[$i]->{'biblionumber'}">$results[$i]->{'author'}</a></td>
68 <td>$results[$i]->{'copyrightdate'}</td>
74 <tr valign=top bgcolor=#cccc99>
75 <td background="/images/background-mem.gif"> </td>
76 <td background="/images/background-mem.gif"> </td>
77 <td background="/images/background-mem.gif"> </td>
83 for (my $i = 0; ($i * $num) < $count; $i++) {
84 my $newoffset = $i * $num;
85 my $shownumber = $i + 1;
87 <a href="keywordsearch.pl?keyword=$keywords&offset=$newoffset&num=$num">$shownumber</a>
94 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=5">5</a>
95 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=10">10</a>
96 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=20">20</a>
97 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=50">50</a>