title = $biblio->{'title'},
author = $biblio->{'author'},
copyrightdate = $biblio->{'copyright'},
-series = $series;
+serial = $series,
seriestitle = $biblio->{'seriestitle'},
notes = $biblio->{'notes'},
abstract = $biblio->{'abstract'}";
$sth = $dbh->prepare($query);
-# print $query;
$sth->execute;
$sth->finish;
barcode = $barcode,
booksellerid = $item->{'booksellerid'},
dateaccessioned = NOW(),
-homebranch = $item->{'branch'},
-holdingbranch = $item->{'branch'},
+homebranch = $item->{'homebranch'},
+holdingbranch = $item->{'homebranch'},
price = $item->{'price'},
replacementprice = $item->{'replacementprice'},
replacementpricedate = NOW(),
-notforloan = $item->{'loan'},
itemnotes = $item->{'itemnotes'}";
+ if ($item->{'loan'}) {
+ $query .= ",
+notforloan = $item->{'loan'}";
+ } # if
+
$sth = $dbh->prepare($query);
$sth->execute;
} else {
($count, @results) = &getbiblio($biblionumber);
- $title = @results[0]->{'title'};
+
+ if (! $count) {
+ print $input->redirect('addbooks.pl');
+ } else {
+ $title = @results[0]->{'title'};
- print $input->header;
- print startpage();
- print startmenu('acquisitions');
+ print $input->header;
+ print startpage();
+ print startmenu('acquisitions');
- print << "EOF";
+ print << "EOF";
<font size="6"><em>Adding New Group Information - $title</em></font>
<table bgcolor="#ffcc00" width="80%" cellpadding="5">
<tr valign="center">
<td colspan="3"><select name="itemtype">
EOF
- ($count, @results) = &getitemtypes;
- for (my $i = 0; $i < $count; $i++) {
- print << "EOF";
+ ($count, @results) = &getitemtypes;
+ for (my $i = 0; $i < $count; $i++) {
+ print << "EOF";
<option value="$results[$i]->{'itemtype'}">$results[$i]->{'itemtype'} - $results[$i]->{'description'}
EOF
- } # for
+ } # for
- print << "EOF";
+ print << "EOF";
</select></td>
</tr>
<tr>
</table></FORM>
EOF
- print endmenu();
- print endpage();
+ print endmenu();
+ print endpage();
+ } # else
} # else
if (! $biblioitemnum) {
print $input->redirect('addbooks.pl');
} else {
-
+
($count, @results) = &getbiblioitem($biblioitemnum);
if (! $count) {
print << "EOF";
<center>
<h2>Section Three: Specific Item Information</h2>
-<form action="saveitems" method="post">
+<form action="saveitem.pl" method="post">
<input type="hidden" name="biblioitemnum" value="$biblioitemnum">
<table>
<tr>
use C4::Acquisitions;
my $input = new CGI;
-my $biblio->{'title'} = $input->param('title');
-my $biblio->{'subtitle'} = $input->param('subtitle');
-my $biblio->{'author'} = $input->param('author');
-my $biblio->{'seriestitle'} = $input->param('seriestitle');
-my $biblio->{'copyright'} = $input->param('copyrightdate');
-my $biblio->{'abstract'} = $input->param('abstract');
-my $biblio->{'notes'} = $input->param('notes');
+my $biblio = { title => $input->param('title'),
+ subtitle => $input->param('subtitle'),
+ author => $input->param('author'),
+ seriestitle => $input->param('seriestitle'),
+ copyright => $input->param('copyrightdate'),
+ abstract => $input->param('abstract'),
+ notes => $input->param('notes')
+ }; # my $biblio
my $biblionumber;
if (! $biblio->{'title'}) {
} else {
$biblionumber = &newbiblio($biblio);
- &newsubtitle($biblionumber, $subtitle);
+ &newsubtitle($biblionumber, $biblio->{'subtitle'});
- print $input->redirect('addbiblioitem.pl?biblionumber=$biblionumber');
+ print $input->redirect("addbiblioitem.pl?biblionumber=$biblionumber");
} # else
$biblioitemnum = &newbiblioitem($biblioitem);
- print $input->redirect('additem.pl?biblioitemnum=$biblioitemnum');
+ print $input->redirect("additem.pl?biblioitemnum=$biblioitemnum");
} # else
my $barcode = $input->param('barcode');
my $biblioitemnum = $input->param('biblioitemnum');
my $item = {
- biblioitemnum => $biblioitemnum,
+ biblioitemnumber => $biblioitemnum,
homebranch => $input->param('homebranch'),
replacementprice => $input->param('replacementprice'),
itemnotes => $input->param('notes')
$item->{'biblionumber'} = $results[0]->{'biblionumber'};
&newitems($item, ($barcode));
- print $input->redirect('additem.pl?biblioitemnum=$biblioitemnum');
+ print $input->redirect("additem.pl?biblioitemnum=$biblioitemnum");
} # else
} # else
#written 8/11/99
use strict;
-#use DBI;
use C4::Search;
use CGI;
use C4::Output;
my $input = new CGI;
-print $input->header;
-#whether it is called from the opac of the intranet
-my $type=$input->param('type');
-if ($type eq ''){
- $type='intra';
-}
-#setup colours
+my $type = $input->param('type');
+my $bib = $input->param('bib');
+my $title = $input->param('title');
+my @items = &ItemInfo(undef, $bib, $type);
+my $dat = &bibdata($bib);
+my $count = @items;
+my ($count3, $addauthor) = &addauthor($bib);
+my $additional = $addauthor->[0]->{'author'};
+my @temp = split('\t', $items[0]);
my $main;
my $secondary;
+
+if ($type eq ''){
+ $type = 'opac';
+} # if
+
+# setup colours
if ($type eq 'opac'){
- $main='#99cccc';
- $secondary='#efe5ef';
+ $main = '#99cccc';
+ $secondary = '#efe5ef';
} else {
- $main='#cccc99';
- $secondary='#ffffcc';
-}
+ $main = '#cccc99';
+ $secondary = '#ffffcc';
+} # else
+
+print $input->header;
print startpage();
print startmenu($type);
-#print $type;
-my $blah;
-my $bib=$input->param('bib');
-my $title=$input->param('title');
+
if ($type ne 'opac'){
- print "<a href=request.pl?bib=$bib><img height=42 WIDTH=120 BORDER=0 src=\"/images/requests.gif\" align=right border=0></a>";
-}
+ print << "EOF";
+<a href=request.pl?bib=$bib><img height=42 WIDTH=120 BORDER=0 src=\"/images/requests.gif\" align=right border=0></a>
+EOF
+} # if
+for (my $i = 1; $i < $count3; $i++) {
+ $additional .= "|" . $addauthor->[$i]->{'author'};
+} # for
-my @items=ItemInfo(\$blah,$bib,$type);
-my $dat=bibdata($bib);
-my $count=@items;
-my ($count3,$addauthor)=addauthor($bib);
-my $additional=$addauthor->[0]->{'author'};
-for (my $i=1;$i<$count3;$i++){
- $additional=$additional."|".$addauthor->[$i]->{'author'};
-}
-my @temp=split('\t',$items[0]);
if ($type eq 'catmain'){
print mkheadr(3,"Catalogue Maintenance");
-}
+} # if
+
if ($dat->{'author'} ne ''){
print mkheadr(3,"$dat->{'title'} ($dat->{'author'}) $temp[4]");
} else {
print mkheadr(3,"$dat->{'title'} $temp[4]");
}
-print <<printend
+print << "EOF";
<TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left width="220">
<TR VALIGN=TOP>
<td bgcolor="$main"
-printend
-;
+EOF
+
if ($type ne 'opac'){
print "background=\"/images/background-mem.gif\"";
}
-print <<printend
+print << "EOF";
><B>BIBLIO RECORD
-printend
-;
+EOF
+
if ($type ne 'opac'){
print "$bib";
}
-print <<printend
+print << "EOF";
</TD></TR>
<tr VALIGN=TOP >
<TD>
-printend
-;
+EOF
+
if ($type ne 'opac'){
print "<INPUT TYPE=\"image\" name=\"submit\" VALUE=\"modify\" height=42 WIDTH=93 BORDER=0 src=\"/images/modify-mem.gif\">
<INPUT TYPE=\"image\" name=\"delete\" VALUE=\"delete\" height=42 WIDTH=93 BORDER=0 src=\"/images/delete-mem.gif\">";
}
-print <<printend
+print << "EOF";
<br>
<FONT SIZE=2 face="arial, helvetica">
-printend
-;
+EOF
if ($type ne 'opac'){
-print <<printend
+print << "EOF";
<b>Subtitle:</b> $dat->{'subtitle'}<br>
<b>Author:</b> $dat->{'author'}<br>
<b>Additional Author:</b> $additional<br>
<b>Serial:</b> $dat->{'serial'}<br>
<b>Total Number of Items:</b> $count
<p>
-printend
-;
+EOF
+
}
else {
if ($dat->{'subtitle'} ne ''){
";
}
-print <<printend
+print << "EOF";
</form>
</font></TD>
</TR>
</TABLE>
<img src="/images/holder.gif" width=16 height=300 align=left>
-
-printend
-;
-
-
-#print @items;
+EOF
my $i=0;
print center();
}
my $colour=1;
while ($i < $count){
-# print $items[$i],"<br>";
- my @results=split('\t',$items[$i]);
+
+ my @results = split('\t', $items[$i]);
if ($type ne 'opac'){
$results[1]=mklink("/cgi-bin/koha/moredetail.pl?item=$results[5]&bib=$bib&bi=$results[8]&type=$type",$results[1]);
}
print "<p>";
print mktablehdr();
if ($type ne 'opac'){
-print <<printend
+print << "EOF";
<TR VALIGN=TOP>
<TD bgcolor="99cc33" background="/images/background-mem.gif" colspan=2><p><b>HELP</b><br>
<b>Update Biblio for all Items:</b> Click on the <b>Modify</b> button [left] to amend the biblio. Any changes you make will update the record for <b>all</b> the items listed above. <p>
<b>Updating the Biblio for only ONE or SOME Items:</b>
-printend
-;
+EOF
+
if ($type eq 'catmain'){
-print <<printend
+print << "EOF";
If some of the items listed above need a different biblio,
you need to click on the wrong item, then shift the group it belongs to, to the correct biblio.
You will need to know the correct biblio number
<p>
</TR>
-printend
-;
+EOF
+
} else {
-print <<printend
+print << "EOF";
If some of the items listed above need a different biblio, or are on the wrong biblio, you must use the <a href="acquisitions/">acquisitions</a> process to fix this. You will need to "re-order" the items, and delete them from this biblio.
<p>
</TR>
-printend
-;
+EOF
+
}
}
print mktableft();