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