64dae2746d
marcimport.pl has been almost completly rewritten, so LOT OF BUGS TO COME !!! You've been warned. It seems to work, but... As with my former messages, nothing seems to have been changed... but ... * marcimport now uses HTML::Template. * marcimport now uses MARC::Record. that means that when you import a record, the old-DB is populated with the data as in version 1.2, but the MARC-DB part is filled with full MARC::Record. <IMPORTANT NOTE> to get correct response times, you MUST add an index on isbn, issn and lccn rows in biblioitem table. Note this should be done in 1.2 too... </IMPORTANT NOTE> <IMPORTANT NOTE2> acqui.simple manage biblio, biblioitems and items tables quite properly. Normal acquisition system manages biblio, biblioitems BUT NOT items. That will be done in the near future... </IMPORTANT NOTE2> what's next now ? * bug tracking, of course... Surely a dozen of dozens... * LOT of developpments, i'll surely write a mail to koha-devel tomorrow (as it's time for dinner in France, and i plan to play NeverwinterNights after dinner ;-) ...
101 lines
2.5 KiB
Perl
Executable file
101 lines
2.5 KiB
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
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";
|
|
<font size="6"><em>Website Search Results</em></font><br />
|
|
<CENTER>
|
|
You searched on <b>keywords $keywords,</b> $count results found <br />
|
|
Results $offset to $total displayed
|
|
<div align="right">
|
|
<h2><a href="addbiblio.pl">Add New Biblio</a></h2>
|
|
</div>
|
|
<p />
|
|
<table border="0" cellspacing="0" cellpadding="5">
|
|
<tr valign=top bgcolor=#cccc99>
|
|
<td background="/images/background-mem.gif"><b>TITLE</b></td>
|
|
<td background="/images/background-mem.gif"><b>AUTHOR</b></td>
|
|
<td background="/images/background-mem.gif"><b>©</b></td>
|
|
</tr>
|
|
EOF
|
|
|
|
for (my $i = $offset; $i < $total; $i++) {
|
|
if ($i % 2) {
|
|
print << "EOF";
|
|
<tr valign="top" bgcolor="#ffffcc">
|
|
EOF
|
|
} else {
|
|
print << "EOF";
|
|
<tr valign="top" bgcolor="#ffffff">
|
|
EOF
|
|
} # else
|
|
|
|
print << "EOF";
|
|
<td><a href="additem.pl?biblionumber=$results[$i]->{'biblionumber'}">$results[$i]->{'title'}</a></td>
|
|
<td><a href="additem.pl?biblionumber=$results[$i]->{'biblionumber'}">$results[$i]->{'author'}</a></td>
|
|
<td>$results[$i]->{'copyrightdate'}</td>
|
|
</tr>
|
|
EOF
|
|
} # for
|
|
print << "EOF";
|
|
<tr valign=top bgcolor=#cccc99>
|
|
<td background="/images/background-mem.gif"> </td>
|
|
<td background="/images/background-mem.gif"> </td>
|
|
<td background="/images/background-mem.gif"> </td>
|
|
</tr>
|
|
</table>
|
|
<br />
|
|
EOF
|
|
|
|
for (my $i = 0; ($i * $num) < $count; $i++) {
|
|
my $newoffset = $i * $num;
|
|
print << "EOF";
|
|
<a href="keywordsearch.pl?keyword=$keywords&offset=$newoffset&num=$num">$i</a>
|
|
EOF
|
|
} # for
|
|
|
|
print << "EOF";
|
|
<p />
|
|
Results per page:
|
|
<a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=5">5</a>
|
|
<a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=10">10</a>
|
|
<a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=20">20</a>
|
|
<a href="keywordsearch.pl?keyword=$keywords&offset=$offset&num=50">50</a>
|
|
</CENTER>
|
|
<br clear="all" />
|
|
<p> </p>
|
|
EOF
|
|
|
|
print endmenu();
|
|
print endpage();
|
|
} # else
|