10 my $keywords = $input->param('keyword');
11 my $offset = $input->param('offset');
12 my $num = $input->param('num');
18 print $input->redirect('addbooks.pl');
20 if (! $offset) { $offset = 0 };
21 if (! $num) { $num = 10 };
23 ($count, @results) = &websitesearch($keywords);
25 if ($count < ($offset + $num)) {
28 $total = $offset + $num;
33 print startmenu('acquisitions');
36 <font size="6"><em>Website Search Results</em></font><br />
38 You searched on <b>keywords $keywords,</b> $count results found <br />
39 Results $offset to $total displayed
41 <h2><a href="addbiblio.pl">Add New Biblio</a></h2>
44 <table border="0" cellspacing="0" cellpadding="5">
45 <tr valign=top bgcolor=#cccc99>
46 <td background="/images/background-mem.gif"><b>TITLE</b></td>
47 <td background="/images/background-mem.gif"><b>AUTHOR</b></td>
48 <td background="/images/background-mem.gif"><b>©</b></td>
52 for (my $i = $offset; $i < $total; $i++) {
55 <tr valign="top" bgcolor="#ffffcc">
59 <tr valign="top" bgcolor="#ffffff">
64 <td><a href="additem.pl?biblionumber=$results[$i]->{'biblionumber'}">$results[$i]->{'title'}</a></td>
65 <td><a href="additem.pl?biblionumber=$results[$i]->{'biblionumber'}">$results[$i]->{'author'}</a></td>
66 <td>$results[$i]->{'copyrightdate'}</td>
71 <tr valign=top bgcolor=#cccc99>
72 <td background="/images/background-mem.gif"> </td>
73 <td background="/images/background-mem.gif"> </td>
74 <td background="/images/background-mem.gif"> </td>
80 for (my $i = 0; ($i * $num) < $count; $i++) {
81 my $newoffset = $i * $num;
83 <a href="keywordsearch.pl?keyword=$keywords&offset=$newoffset&num=$num">$i</a>
90 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=5">5</a>
91 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=10">10</a>
92 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=20">20</a>
93 <a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=50">50</a>