synch'ing 2.2 and head
[wip/koha-chris_n.git] / opac / opac-serial-issues.pl
1 #!/usr/bin/perl
2
3 use strict;
4 use CGI;
5 use C4::Auth;
6 use C4::Koha;
7 use C4::Date;
8 use C4::Bull;
9 use C4::Output;
10 use C4::Interface::CGI::Output;
11 use C4::Context;
12 use HTML::Template;
13
14 my $query = new CGI;
15 my $op = $query->param('op');
16 my $dbh = C4::Context->dbh;
17 my $sth;
18 # my $id;
19 my ($template, $loggedinuser, $cookie);
20 my $biblionumber = $query->param('biblionumber');
21 my $subscriptions = get_subscription_list_from_biblionumber($biblionumber);
22
23 ($template, $loggedinuser, $cookie)
24 = get_template_and_user({template_name => "opac-serial-issues.tmpl",
25                                 query => $query,
26                                 type => "opac",
27                                 authnotrequired => 1,
28                                 debug => 1,
29                                 });
30
31 # replace CR by <br> in librarian note
32 # $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
33
34 $template->param(
35         biblionumber => $query->param('biblionumber'),
36         subscription_LOOP => $subscriptions
37         suggestion => C4::Context->preference("suggestion"),
38         virtualshelves => C4::Context->preference("virtualshelves"),
39         );
40
41 output_html_with_http_headers $query, $cookie, $template->output;