*** empty log message ***
[koha.git] / readingrec.pl
1 #!/usr/bin/perl
2
3 #written 27/01/2000
4 #script to display borrowers reading record
5
6
7
8 # Copyright 2000-2002 Katipo Communications
9 #
10 # This file is part of Koha.
11 #
12 # Koha is free software; you can redistribute it and/or modify it under the
13 # terms of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
15 # version.
16 #
17 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
18 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
19 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License along with
22 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
23 # Suite 330, Boston, MA  02111-1307 USA
24
25 use strict;
26 use C4::Output;
27 use CGI;
28 use C4::Search;
29 my $input=new CGI;
30
31
32 my $bornum=$input->param('bornum');
33 #get borrower details
34 my $data=borrdata('',$bornum);
35 my $order=$input->param('order');
36 my $order2=$order;
37 if ($order2 eq ''){
38   $order2="date_due desc";
39 }
40 my $limit=$input->param('limit');
41 if ($limit eq 'full'){
42   $limit=0;
43 } else {
44   $limit=50;
45 }
46 my ($count,$issues)=allissues($bornum,$order2,$limit);
47
48
49 print $input->header;
50 print startpage();
51 print startmenu('member');
52 #print $count;
53 print mkheadr(3,"$data->{'title'} $data->{'initials'} $data->{'surname'}");
54 print mktablehdr();
55 print mktablerow(1,'white',"<a href=/cgi-bin/koha/readingrec.pl?bornum=$bornum&limit=full>Full output</a>");
56 print mktablerow(4,'white',"<a href=/cgi-bin/koha/readingrec.pl?bornum=$bornum&order=title&limit=$limit><b>TITLE</b></a>","<a href=/cgi-bin/koha/readingrec.pl?bornum=$bornum&order=author&limit=$limit><b>AUTHOR</b></a>","<a href=/cgi-bin/koha/readingrec.pl?bornum=$bornum&limit=$limit><b>DATE</b></a>","<b>Volume</b>");
57 for (my $i=0;$i<$count;$i++){
58   print mktablerow(4,'white',$issues->[$i]->{'title'},$issues->[$i]->{'author'},$issues->[$i]->{'returndate'},$issues->[$i]->{'volumeddesc'});
59 }
60 print mktableft();
61 print endmenu('member');
62 print endpage();
63