bug fix: wrong address for redirect in mancredit.pl and mainvoice.pl
[koha.git] / opac / opac-showreviews.pl
1 #!/usr/bin/perl
2 use strict;
3 require Exporter;
4 use CGI;
5
6 use C4::Auth;
7 use C4::Koha;
8 use HTML::Template;
9 use C4::Interface::CGI::Output;
10 use C4::Search;
11 use C4::Circulation::Circ2;
12 use C4::Review;
13 use C4::Biblio;
14
15 my $query = new CGI;
16 my $biblionumber = $query->param('biblionumber');
17
18 my ($template, $borrowernumber, $cookie) 
19     = get_template_and_user({template_name => "opac-showreviews.tmpl",
20                              query => $query,
21                              type => "opac",
22                              authnotrequired => 0,
23                              flagsrequired => {borrow => 1},
24                              debug => 1,
25                              });
26
27 my $biblio=bibdata($biblionumber,'opac');
28 my $reviews=getreviews($biblionumber,1);
29
30 $template->param('reviews' => $reviews,
31 'title' => $biblio->{'title'});
32
33 output_html_with_http_headers $query, $cookie, $template->output;
34