2 #script to provide bookshelf management
3 # WARNING: This file uses 4-character tabs!
7 # Copyright 2000-2002 Katipo Communications
9 # This file is part of Koha.
11 # Koha is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
16 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License along with
21 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
22 # Suite 330, Boston, MA 02111-1307 USA
30 use C4::Circulation::Circ2;
32 use C4::Interface::CGI::Output;
37 my $biblionumber = $query->param('biblionumber');
38 my $shelfnumber = $query->param('shelfnumber');
39 my $newbookshelf = $query->param('newbookshelf');
40 my $category = $query->param('category');
42 my ($template, $loggedinuser, $cookie)
43 = get_template_and_user({template_name => "opac-addbookbybiblionumber.tmpl",
50 ($x,$x,$shelfnumber) = AddShelf('',$newbookshelf,$loggedinuser,$category) if $newbookshelf;
53 &AddToShelfFromBiblio($env, $biblionumber, $shelfnumber);
54 print "Content-Type: text/html\n\n<html><body onload=\"window.close()\"></body></html>";
58 my ( $bibliocount, @biblios ) = getbiblio($biblionumber);
60 my ($shelflist) = GetShelfList($loggedinuser,3);
63 foreach my $element (sort keys %$shelflist) {
64 push (@shelvesloop, $element);
65 $shelvesloop{$element} = $shelflist->{$element}->{'shelfname'};
68 my $CGIbookshelves=CGI::scrolling_list( -name => 'shelfnumber',
69 -values => \@shelvesloop,
70 -labels => \%shelvesloop,
74 $template->param(biblionumber => $biblionumber,
75 title => $biblios[0]->{'title'},
76 author => $biblios[0]->{'author'},
77 CGIbookshelves => $CGIbookshelves,
80 output_html_with_http_headers $query, $cookie, $template->output;
83 # Revision 1.1 2005/01/03 11:09:59 tipaul
84 # *** empty log message ***