+ #grab each type of shelf, open (type 3) should not be limited by user.
+ foreach my $shelftype (1,2,3) {
+ my ($shelflist) = GetRecentShelves($shelftype, undef, $shelftype == 3 ? undef : $loggedinuser);
+ for my $shelf (@{ $shelflist }) {
+ push(@shelvesloop, $shelf->{shelfnumber});
+ $shelvesloop{$shelf->{shelfnumber}} = $shelf->{shelfname};
+ }
+ }
+
+ if( @shelvesloop ){
+ my $CGIvirtualshelves = CGI::scrolling_list
+ (
+ -name => 'shelfnumber',
+ -values => \@shelvesloop,
+ -labels => \%shelvesloop,
+ -size => 1,
+ -tabindex => '',
+ -multiple => 0
+ );
+ $template->param
+ (
+ CGIvirtualshelves => $CGIvirtualshelves,
+ );
+ }
+ my @biblios;
+ for my $bib (@biblionumber) {
+ my $data = GetBiblioData( $bib );
+ push(@biblios,
+ { biblionumber => $bib,
+ title => $data->{'title'},
+ author => $data->{'author'},
+ } );
+ }