road to 1.3.2 : adding a biblio in MARC format.

seems to work a few.
still to do :
* manage html checks (mandatory subfields...)
* add list of acceptable values (authorities)
* manage ## in MARC format
* manage correctly repeatable fields
and probably a LOT of bugfixes
This commit is contained in:
tipaul 2002-10-22 15:50:23 +00:00
parent b83190843c
commit ebc08585d4
6 changed files with 664 additions and 145 deletions

View file

@ -29,73 +29,235 @@
use CGI;
use strict;
use C4::Output;
use C4::Biblio;
use C4::Context;
use HTML::Template;
use MARC::File::USMARC;
sub find_value {
my ($tagfield,$subfield,$record) = @_;
my $result;
foreach my $field ($record->field($tagfield)) {
my @subfields = $field->subfields();
foreach my $subfield (@subfields) {
if (@$subfield[0] eq $subfield) {
$result .= @$subfield[1];
}
}
}
}
sub MARCfindbreeding {
my ($dbh,$isbn) = @_;
my $sth = $dbh->prepare("select file,marc from marc_breeding where isbn=?");
$sth->execute($isbn);
my ($file,$marc) = $sth->fetchrow;
if ($marc) {
my $record = MARC::File::USMARC::decode($marc);
if (ref($record) eq undef) {
warn "not a MARC record !";
return -1;
} else {
return $record;
}
}
warn "not MARC";
return -1;
}
my $input = new CGI;
my $error = $input->param('error');
my $oldbiblionumber=$input->param('bib'); # if bib exists, it's a modif, not a new biblio.
my $isbn = $input->param('isbn');
my $op = $input->param('op');
my $dbh = C4::Context->dbh;
my $bibid;
if ($oldbiblionumber) {;
$bibid = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$oldbiblionumber)
}else {
$bibid = $input->param('bibid');
}
my $template;
print $input->header;
print startpage();
print startmenu('acquisitions');
my $tagslib = &MARCgettagslib($dbh,1);
print << "EOF";
<FONT SIZE=6><em>Adding a new Biblio</em></FONT><br>
my $record = MARCgetbiblio($dbh,$bibid) if ($oldbiblionumber);
#my $record = MARCfindbreeding($dbh,$isbn) if ($isbn);
<table bgcolor="#ffcc00" width="80%" cellpadding="5">
<tr>
<td><FONT SIZE=5>Section One: Copyright Information </font></td>
</tr>
</table>
EOF
#------------------------------------------------------------------------------------------------------------------------------
if ($op eq "addbiblio") {
#------------------------------------------------------------------------------------------------------------------------------
# rebuild
my @tags = $input->param('tag[]');
my @subfields = $input->param('subfield[]');
my @values = $input->param('value[]');
my $record = MARChtml2marc($dbh,\@tags,\@subfields,\@values);
# MARC::Record builded => now, record in DB
my ($bibid,$oldbibnum,$oldbibitemnum) = NEWnewbiblio($dbh,$record);
# build item screen. There is no item for instance.
my @loop_data =();
my $i=0;
foreach my $tag (keys %{$tagslib}) {
my $previous_tag = '';
# loop through each subfield
foreach my $subfield (keys %{$tagslib->{$tag}}) {
next if ($subfield eq 'lib');
next if ($subfield eq 'tab');
next if ($tagslib->{$tag}->{$subfield}->{'tab'} ne "10");
my %subfield_data;
$subfield_data{tag}=$tag;
$subfield_data{subfield}=$subfield;
$subfield_data{marc_lib}=$tagslib->{$tag}->{$subfield}->{lib};
$subfield_data{marc_mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
$subfield_data{marc_repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
$subfield_data{marc_value}="<input type=\"text\" name=\"value[]\">";
push(@loop_data, \%subfield_data);
$i++
}
}
$template = gettemplate("acqui.simple/addbiblio2.tmpl");
$template->param(bibid => $bibid,
item => \@loop_data);
#------------------------------------------------------------------------------------------------------------------------------
} elsif ($op eq "additem") {
#------------------------------------------------------------------------------------------------------------------------------
my @tags = $input->param('tag[]');
my @subfields = $input->param('subfield[]');
my @values = $input->param('value[]');
my $record = MARChtml2marc($dbh,\@tags,\@subfields,\@values);
my ($bibid,$oldbibnum,$oldbibitemnum) = NEWnewitem($dbh,$record,$bibid);
# now, build existiing item list
my $temp = MARCgetbiblio($dbh,$bibid);
my @fields = $temp->fields();
my %witness; #---- stores the list of subfields used at least once, with the "meaning" of the code
my @big_array;
foreach my $field (@fields) {
my @subf=$field->subfields;
my %this_row;
# loop through each subfield
for my $i (0..$#subf) {
next if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{tab} ne 10);
$witness{$subf[$i][0]} = $tagslib->{$field->tag()}->{$subf[$i][0]}->{lib};
$this_row{$subf[$i][0]} =$subf[$i][1];
}
if (%this_row) {
push(@big_array, \%this_row);
}
}
#fill big_row with missing datas
foreach my $subfield_code (keys(%witness)) {
for (my $i=0;$i<=$#big_array;$i++) {
$big_array[$i]{$subfield_code}="&nbsp;" unless ($big_array[$i]{$subfield_code});
}
}
# now, construct template !
my @item_value_loop;
my @header_value_loop;
for (my $i=0;$i<=$#big_array; $i++) {
my $items_data;
foreach my $subfield_code (keys(%witness)) {
$items_data .="<td>".$big_array[$i]{$subfield_code}."</td>";
}
my %row_data;
$row_data{item_value} = $items_data;
push(@item_value_loop,\%row_data);
}
foreach my $subfield_code (keys(%witness)) {
my %header_value;
$header_value{header_value} = $witness{$subfield_code};
push(@header_value_loop, \%header_value);
}
if ($error eq "notitle") {
print << "EOF";
<p />
<center>
<font color="#FF0000">Please Specify a Title</font>
</center>
EOF
} # if
print << "EOF";
<FORM action="savebiblio.pl" method="post">
<table align="center">
<tr>
<td>Title: *</td>
<td><INPUT name="title" size="40" /></td>
</tr>
<tr>
<td>Subtitle:</td>
<td><INPUT name="subtitle" size="40" /></td>
</tr>
<tr>
<td>Author:</td>
<td><INPUT name="author" size="40" /></td>
</tr>
<tr valign="top">
<td>Series Title:<br />
<i>(if applicable)</i></td>
<td><INPUT name="seriestitle" size="40" /></td>
</tr>
<tr>
<td>Copyright Date:</td>
<td><INPUT name="copyrightdate" size="40" /></td>
</tr>
<tr valign="top">
<td>Abstract:</td>
<td><textarea cols="30" rows="6" name="abstract"></textarea></td>
</tr>
<tr valign="top">
<td>Notes:</td>
<td><textarea cols="30" rows="6" name="notes"></textarea></td>
</tr>
<tr valign="top">
<td colspan="2"><center><input type="submit" value="Submit"></center></td>
</tr>
</table>
</FORM>
* Required
EOF
print endmenu();
print endpage();
# next item form
my @loop_data =();
my $i=0;
foreach my $tag (keys %{$tagslib}) {
my $previous_tag = '';
# loop through each subfield
foreach my $subfield (keys %{$tagslib->{$tag}}) {
next if ($subfield eq 'lib');
next if ($subfield eq 'tab');
next if ($tagslib->{$tag}->{$subfield}->{'tab'} ne "10");
my %subfield_data;
$subfield_data{tag}=$tag;
$subfield_data{subfield}=$subfield;
$subfield_data{marc_lib}=$tagslib->{$tag}->{$subfield}->{lib};
$subfield_data{marc_mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
$subfield_data{marc_repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
$subfield_data{marc_value}="<input type=\"text\" name=\"value[]\">";
push(@loop_data, \%subfield_data);
$i++
}
}
$template = gettemplate("acqui.simple/addbiblio2.tmpl");
$template->param(item_loop => \@item_value_loop,
item_header_loop => \@header_value_loop,
bibid => $bibid,
item => \@loop_data);
#------------------------------------------------------------------------------------------------------------------------------
} else {
#------------------------------------------------------------------------------------------------------------------------------
$template = gettemplate("acqui.simple/addbiblio.tmpl");
# fill arrays
my @loop_data =();
my $tag;
# loop through each tab 0 through 9
for (my $tabloop = 0; $tabloop<=9;$tabloop++) {
# loop through each tag
# my @fields = $record->fields();
my @loop_data =();
foreach my $tag (keys %{$tagslib}) {
my $previous_tag = '';
my @subfields_data;
# loop through each subfield
foreach my $subfield (keys %{$tagslib->{$tag}}) {
next if ($subfield eq 'lib');
next if ($subfield eq 'tab');
next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
my %subfield_data;
$subfield_data{tag}=$tag;
$subfield_data{subfield}=$subfield;
$subfield_data{marc_lib}=$tagslib->{$tag}->{$subfield}->{lib};
$subfield_data{mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
$subfield_data{repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
if ($record ne -1) {
my $value ="";# &find_value($tag,$subfield,$record);
$subfield_data{marc_value}="<input type=\"text\" name=\"value[]\" value=\"$value\">";
} else {
$subfield_data{marc_value}="<input type=\"text\" name=\"value[]\">";
}
push(@subfields_data, \%subfield_data);
}
if ($#subfields_data>=0) {
my %tag_data;
$tag_data{tag}=$tag.' -'. $tagslib->{$tag}->{lib};
$tag_data{subfield} = \@subfields_data;
push (@loop_data, \%tag_data);
}
}
$template->param($tabloop."XX" =>\@loop_data);
}
# now, build hidden datas => we store everything, even if we show only requested subfields.
my @loop_data =();
my $i=0;
foreach my $tag (keys %{$tagslib}) {
my $previous_tag = '';
# loop through each subfield
foreach my $subfield (keys %{$tagslib->{$tag}}) {
next if ($subfield eq 'lib');
next if ($subfield eq 'tab');
next if ($tagslib->{$tag}->{$subfield}->{'tab'} ne "-1");
my %subfield_data;
$subfield_data{marc_lib}=$tagslib->{$tag}->{$subfield}->{lib};
$subfield_data{marc_mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
$subfield_data{marc_repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
$subfield_data{marc_value}="<input type=\"hidden\" name=\"value[]\">";
push(@loop_data, \%subfield_data);
$i++
}
}
$template->param(
biblionumber => $oldbiblionumber,
bibid => $bibid);
}
print "Content-Type: text/html\n\n", $template->output;

View file

@ -24,6 +24,7 @@ use C4::Catalogue;
use C4::Biblio;
use C4::Search;
use C4::Output;
use HTML::Template;
my $input = new CGI;
my $isbn = $input->param('isbn');
@ -33,93 +34,53 @@ my $showoffset = $offset + 1;
my $total;
my $count;
my @results;
my $template = gettemplate("acqui.simple/isbnsearch.tmpl");
if (! $isbn) {
print $input->redirect('addbooks.pl');
print $input->redirect('addbooks.pl');
} else {
if (! $offset) {
$offset = 0;
$showoffset = 1;
};
if (! $num) { $num = 10 };
($count, @results) = isbnsearch($isbn);
if (! $offset) {
$offset = 0;
$showoffset = 1;
};
if (! $num) { $num = 10 };
($count, @results) = isbnsearch($isbn);
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>Biblio Search Results</em></font><br />
<CENTER>
You searched on <b>ISBN $isbn,</b> $count results found <br />
Results $showoffset 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>&copy;</b></td>
</tr>
EOF
for (my $i = $offset; $i < $total; $i++) {
if ($i % 2) {
print << "EOF";
<tr valign="top" bgcolor="#ffffcc">
EOF
if ($count < ($offset + $num)) {
$total = $count;
} else {
print << "EOF";
<tr valign="top" bgcolor="#ffffff">
EOF
$total = $offset + $num;
} # 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
my @loop_data = ();
my $toggle;
for (my $i = $offset; $i < $total; $i++) {
if ($i % 2) {
$toggle="#ffffcc";
} else {
$toggle="white";
}
my %row_data; # get a fresh hash for the row data
$row_data{toggle} = $toggle;
$row_data{biblionumber} =$results[$i]->{'biblionumber'};
$row_data{title} = $results[$i]->{'title'};
$row_data{author} = $results[$i]->{'author'};
$row_data{copyrightdate} = $results[$i]->{'copyrightdate'};
push(@loop_data, \%row_data);
}
my @loop_links = ();
for (my $i = 0; ($i * $num) < $count; $i++) {
my %row_data;
$row_data{newoffset} = $i * $num;
$row_data{shownumber} = $i + 1;
$row_data{num} = $num;
push (@loop_links,\%row_data);
} # for
$template->param(isbn => $isbn,
showoffset => $showoffset,
total => $total,
offset => $offset,
loop => \@loop_data,
loop_links => \@loop_links);
print << "EOF";
<tr valign=top bgcolor=#cccc99>
<td background="/images/background-mem.gif">&nbsp;</td>
<td background="/images/background-mem.gif">&nbsp;</td>
<td background="/images/background-mem.gif">&nbsp;</td>
</tr>
</table>
<br />
EOF
for (my $i = 0; ($i * $num) < $count; $i++) {
my $newoffset = $i * $num;
my $shownumber = $i + 1;
print << "EOF";
<a href="isbnsearch.pl?isbn=$isbn&offset=$newoffset&num=$num">$shownumber</a>
EOF
} # for
print << "EOF";
<p />
Results per page:
<a href="isbnsearch.pl?isbn=$isbn&offset=$offset&num=5">5</a>
<a href="isbnsearch.pl?isbn=$isbn&offset=$offset&num=10">10</a>
<a href="isbnsearch.pl?isbn=$isbn&offset=$offset&num=20">20</a>
<a href="isbnsearch.pl?isbn=$isbn&offset=$offset&num=50">50</a>
</CENTER>
<br clear="all" />
<p>&nbsp;</p>
EOF
print endmenu();
print endpage();
print "Content-Type: text/html\n\n", $template->output;
} # else

View file

@ -36,7 +36,7 @@ use DBI;
# Koha modules used
use C4::Context;
#use C4::Database;
use C4::Acquisitions;
#use C4::Acquisitions;
use C4::Output;
use C4::Input;
use C4::Biblio;
@ -117,6 +117,9 @@ if ($uploadmarc && length($uploadmarc)>0) {
($breedingresult) = $searchbreeding->fetchrow;
}
if (!$breedingresult || $overwrite_biblio) {
if ($oldbiblio->{isbn} eq '0025003402') {
warn "IMPORT => $marcarray[$i]\x1D')";
}
$insertsql ->execute($filename,$oldbiblio->{isbn}.$oldbiblio->{issn},$marcarray[$i]."\x1D')");
$imported++;
} else {
@ -793,6 +796,16 @@ sub FormatMarcText {
#---------------
# log cleared, as marcimport is (almost) rewritten from scratch.
# $Log$
# Revision 1.21 2002/10/22 15:50:23 tipaul
# road to 1.3.2 : adding a biblio in MARC format.
# seems to work a few.
# still to do :
# * manage html checks (mandatory subfields...)
# * add list of acceptable values (authorities)
# * manage ## in MARC format
# * manage correctly repeatable fields
# and probably a LOT of bugfixes
#
# Revision 1.20 2002/10/16 12:46:19 arensb
# Added a FIXME comment.
#

View file

@ -0,0 +1,268 @@
<TMPL_INCLUDE NAME="acquisitions-top.inc">
<form method="post">
<table width=100% cellspacing=0 cellpadding=5 border=1>
<tr background="/images/background-mem.gif">
<th>MARC biblio : <TMPL_VAR name="bibid"></th>
</tr>
<tr>
<td>
<table width=100% border=0 colspacing=0 cellpadding=0>
<tr>
<td width=9% align="center"><a href="javascript:active(0)"><div id="link0">0xx</div></a></td>
<td width=9% align="center"><a href="javascript:active(1)" ><div id="link1">1xx</div></a></td>
<td width=9% align="center"><a href="javascript:active(2)"><div id="link2">2xx</div></a></td>
<td width=9% align="center"><a href="javascript:active(3)"><div id="link3">3xx</div></a></td>
<td width=9% align="center"><a href="javascript:active(4)"><div id="link4">4xx</div></a></td>
<td width=9% align="center"><a href="javascript:active(5)"><div id="link5">5xx</div></a></td>
<td width=9% align="center"><a href="javascript:active(6)"><div id="link6">6xx</div></a></td>
<td width=9% align="center"><a href="javascript:active(7)"><div id="link7">7xx</div></a></td>
<td width=9% align="center"><a href="javascript:active(8)"><div id="link8">8xx</div></a></td>
<td width=9% align="center"><a href="javascript:active(9)"><div id="link9">9xx</div></a></td>
<td width=10% align="center"><input type="hidden" name="op" value="addbiblio"><input type="submit" value=">>> items"></td>
</tr>
</table>
</td>
</tr>
</table>
<DIV name="0XX" id="0XX" style="position:absolute;left:40px;top:150px;visibility:visible;width:90%">
<table width=100% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="0XX">
<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
<TMPL_LOOP name="subfield">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><TMPL_VAR name="subfield"></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</tmpl_loop>
</tmpl_loop>
</table>
</DIV>
<DIV name="1XX" id="1XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="1XX">
<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
<TMPL_LOOP name="subfield">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="2XX" id="2XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="2XX">
<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
<TMPL_LOOP name="subfield">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="3XX" id="3XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="3XX">
<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
<TMPL_LOOP name="subfield">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><<TMPL_IF name="mandatory"></b></TMPL_IF>/td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="4XX" id="4XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="4XX">
<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
<TMPL_LOOP name="subfield">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="5XX" id="5XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="5XX">
<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
<TMPL_LOOP name="subfield">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="6XX" id="6XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
<table width=90% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="6XX">
<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
<TMPL_LOOP name="subfield">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="7XX" id="7XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="7XX">
<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
<TMPL_LOOP name="subfield">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="8XX" id="8XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="8XX">
<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
<TMPL_LOOP name="subfield">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="9XX" id="9XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
<table width=90% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="9XX">
<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
<TMPL_LOOP name="subfield">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="hidden" id="hidden" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
<table width=90% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="hidden_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</TMPL_LOOP>
</table>
</DIV>
</form>
<script LANGUAGE="JavaScript">
function active(numlayer)
{
for (i=0; i <= 10 ; i++ ) {
ong = i+"XX";
link = "link"+i;
if (numlayer==i) {
document.getElementById(ong).style.visibility="visible";
document.getElementById(link).style.backgroundColor="#11AA11";
document.getElementById(link).style.backgroundImage="url(/images/background-mem.gif)";
} else {
document.getElementById(ong).style.visibility="hidden";
document.getElementById(link).style.backgroundColor="#FFFFFF";
document.getElementById(link).style.backgroundImage="";
}
}
}
</script>
</body>
</html>

View file

@ -0,0 +1,73 @@
<TMPL_INCLUDE NAME="acquisitions-top.inc">
<form method="post">
<table width=100% cellspacing=0 cellpadding=5 border=1>
<tr background="/images/background-mem.gif">
<th>MARC biblio : <TMPL_VAR name="bibid"></th>
</tr>
<tr>
<td>
<table width=100% border=0 colspacing=0 cellpadding=0>
<tr>
<td width=9% align="center">&nbsp;</td>
<td width=9% align="center">&nbsp;</td>
<td width=9% align="center">&nbsp;</td>
<td width=9% align="center">&nbsp;</td>
<td width=9% align="center">&nbsp;</td>
<td width=9% align="center">&nbsp;</td>
<td width=9% align="center">&nbsp;</td>
<td width=9% align="center">&nbsp;</td>
<td width=9% align="center">&nbsp;</td>
<td width=9% align="center">&nbsp;</td>
<td width=10% align="center">
<input type="hidden" name="op" value="additem">
<input type="hidden" name="bibid" value="<TMPL_VAR name="bibid">">
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<center>
<DIV name="10XX" id="10XX">
<table border=1 cellspacing=0 cellpadding=5 width=100%>
<tr background="/images/background-mem.gif">
<th>Existing items</th>
</tr>
</table>
<table border=1 cellspacing=0 cellpadding=0 width=100%>
<tr background="/images/background-mem.gif">
<TMPL_LOOP name="item_header_loop"><th><tmpl_var name="header_value"></th></TMPL_LOOP>
</tr>
<TMPL_LOOP name="item_loop">
<tr>
<TMPL_VAR name="item_value">
</tr>
</TMPL_LOOP>
</table>
</DIV>
<br /><br />
<table border=1 cellspacing=0 cellpadding=5 width=100%>
<tr background="/images/background-mem.gif">
<th>New items</th>
</tr>
</table><table width=100% cellspacing=0 cellpadding=5 border=0>
<TMPL_LOOP name="item">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><TMPL_VAR name="subfield"></td>
<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
</td>
</tr>
</tmpl_loop>
</table>
<input type="submit" value=">>> Enter item">
</center>
</form>
</body>
</html>

View file

@ -0,0 +1,42 @@
<TMPL_INCLUDE NAME="acquisitions-top.inc">
<font size="6"><em>Biblio Search Results</em></font><br />
<CENTER>
You searched on <b>ISBN <TMPL_VAR name="isbn">,</b> <TMPL_VAR name="count"> results found <br />
Results <TMPL_VAR name="showoffset"> to <TMPL_VAR name="total"> displayed
<div align="right">
<h2><a href="addbiblio.pl?isbn=<TMPL_VAR name="isbn">">Add New Biblio</a></h2>
</div>
<p />
<table border="0" cellspacing="0" cellpadding="5">
<tr valign=top bgcolor=#ffcc00>
<td><b>TITLE</b></td>
<td><b>AUTHOR</b></td>
<td><b>&copy;</b></td>
<td><b>Items</b></td>
</tr>
<TMPL_LOOP name="loop">
<tr valign="top" bgcolor="<TMPL_VAR name="toggle">">
<td><a href="additem.pl?biblionumber=<TMPL_VAR name="biblionumber">"><TMPL_VAR name="title"></a></td>
<td><TMPL_VAR name="author"></td>
<td><TMPL_VAR name="copyrightdate"></td>
<td><a href="additem.pl?biblionumber=<TMPL_VAR name="biblionumber">">Edit...</a></td>
</tr>
</TMPL_LOOP>
</table>
<br />
<TMPL_LOOP name="loop_links">
<a href="isbnsearch.pl?isbn=<TMPL_VAR name="isbn">&offset=<TMPL_VAR name="newoffset">&num=<TMPL_VAR name="num">"><TMPL_VAR name="shownumber"></a>
</TMPL_LOOP>
<p />
Results per page:
<a href="isbnsearch.pl?isbn=<TMPL_VAR name="isbn">offset=<TMPL_VAR name="offset">&num=5">5</a>
<a href="isbnsearch.pl?isbn=<TMPL_VAR name="isbn">&offset=<TMPL_VAR name="offset">&num=10">10</a>
<a href="isbnsearch.pl?isbn=<TMPL_VAR name="isbn">&offset=<TMPL_VAR name="offset">&num=20">20</a>
<a href="isbnsearch.pl?isbn=<TMPL_VAR name="isbn">&offset=<TMPL_VAR name="offset">&num=50">50</a>
</CENTER>
<br clear="all" />
<p>&nbsp;</p>
<TMPL_INCLUDE NAME="acquisitions-bottom.inc">