*** empty log message ***
[koha.git] / reports.pl
blobd6f8c82634d4dbb4ffba83fe6644d8dc6cfc3745
1 #!/usr/bin/perl
3 # $Id$
5 #script to display reports
6 #written 8/11/99
9 # Copyright 2000-2002 Katipo Communications
11 # This file is part of Koha.
13 # Koha is free software; you can redistribute it and/or modify it under the
14 # terms of the GNU General Public License as published by the Free Software
15 # Foundation; either version 2 of the License, or (at your option) any later
16 # version.
18 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
19 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
20 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License along with
23 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
24 # Suite 330, Boston, MA 02111-1307 USA
26 use strict;
27 use CGI;
28 use C4::Output;
29 use C4::Stats;
30 use C4::Stock;
31 use HTML::Template;
33 my $input = new CGI;
34 my $type=$input->param('type');
35 # 2002/12/19 hdl@ifrance.com templating
36 my $template=gettemplate("reports.tmpl");
37 #print startpage();
38 #print startmenu('issue');
39 # 2002/12/19 hdl@ifrance.com templating end
41 my @dataloop;
42 if ($type eq 'search'){
43 @dataloop=statsreport('search','something');
45 if ($type eq 'issue'){
46 @dataloop=statsreport('issue','today');
48 if ($type eq 'stock'){
49 @dataloop=stockreport();
52 # 2002/12/19 hdl@ifrance.com templating
53 $template->param( type => $type,
54 dataloop => \@dataloop);
55 #print endmenu('issue');
56 #print endpage();
57 print "Content-Type: text/html\n\n", $template->output;
58 # 2002/12/19 hdl@ifrance.com templating