10 my ($template, $borrowernumber, $cookie)
11 = get_template_and_user({template_name => "opac-detail.tmpl",
15 flagsrequired => {borrow => 1},
18 my $biblionumber=$query->param('bib');
19 $template->param(biblionumber => $biblionumber);
22 # change back when ive fixed request.pl
23 my @items = &ItemInfo(undef, $biblionumber, 'opac');
24 my $dat = &bibdata($biblionumber);
25 my ($authorcount, $addauthor) = &addauthor($biblionumber);
26 my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
27 my ($websitecount, @websites) = &getwebsites($biblionumber);
29 $dat->{'count'}=@items;
31 $dat->{'additional'}=$addauthor->[0]->{'author'};
32 for (my $i = 1; $i < $authorcount; $i++) {
33 $dat->{'additional'} .= "|" . $addauthor->[$i]->{'author'};
37 foreach my $itm (@items) {
38 $norequests = 0 unless $itm->{'notforloan'};
39 $itm->{$itm->{'publictype'}} = 1;
42 $template->param(norequests => $norequests);
44 my @results = ($dat,);
46 my $resultsarray=\@results;
47 my $itemsarray=\@items;
48 my $webarray=\@webbiblioitems;
49 my $sitearray=\@websites;
51 $template->param(BIBLIO_RESULTS => $resultsarray);
52 $template->param(ITEM_RESULTS => $itemsarray);
53 $template->param(WEB_RESULTS => $webarray);
54 $template->param(SITE_RESULTS => $sitearray);
56 print $query->header(-cookie => $cookie), $template->output;