8 use C4::Circulation::Circ2;
12 use C4::Interface::CGI::Output;
15 my ($template, $borrowernumber, $cookie)
16 = get_template_and_user({template_name => "opac-readingrecord.tmpl",
20 flagsrequired => {borrow => 1},
24 # get borrower information ....
25 my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
28 $template->param($borr);
31 my $order=$query->param('order');
34 $order2="date_due desc";
35 $template->param(orderbydate => 1);
38 if($order2 eq 'title'){
39 $template->param(orderbytitle => 1);
42 if($order2 eq 'author'){
43 $template->param(orderbyauthor => 1);
46 my $limit=$query->param('limit');
47 if ($limit eq 'full'){
52 my ($count,$issues)=allissues($borrowernumber,$order2,$limit);
56 #foreach my $row (@$issues) {
57 # $row->{'even'} = 1 if $num % 2 == 0;
58 # $row->{'odd'} = 1 if $num % 2 == 1;
64 for (my $i=0;$i<$count;$i++){
69 $line{biblionumber}=$issues->[$i]->{'biblionumber'};
70 $line{title}=$issues->[$i]->{'title'};
71 $line{author}=$issues->[$i]->{'author'};
72 $line{classification} = $issues->[$i]->{'classification'};
73 $line{date_due}=format_date($issues->[$i]->{'date_due'});
74 $line{returndate}=format_date($issues->[$i]->{'returndate'});
75 $line{volumeddesc}=$issues->[$i]->{'volumeddesc'};
76 $line{counter} = $i + 1;
77 push(@loop_reading,\%line);
80 $template->param(count => $count);
81 $template->param(READING_RECORD => \@loop_reading,
83 showfulllink => ($count > 50),
84 LibraryName => C4::Context->preference("LibraryName"),
85 suggestion => C4::Context->preference("suggestion"),
86 virtualshelves => C4::Context->preference("virtualshelves"),
90 output_html_with_http_headers $query, $cookie, $template->output;