Preliminary fix of the CGI.pm problem of always assuming that everything is
[wip/koha-chris_n.git] / catalogue-home.pl
1 #!/usr/bin/perl
2
3 use strict;
4 use CGI;
5 use C4::Auth;
6 use C4::Output;
7 use C4::Charset;
8 use C4::Database;
9 use HTML::Template;
10
11 my $query = new CGI;
12 my ($template, $loggedinuser, $cookie)
13     = get_template_and_user({template_name => "catalogue/catalogue-home.tmpl",
14                              query => $query,
15                              type => "intranet",
16                              authnotrequired => 0,
17                              flagsrequired => {parameters => 1},
18                              debug => 1,
19                              });
20
21 my $classlist='';
22 #open C, "$intranetdir/htdocs/includes/cat-class-list.inc";
23 #while (<C>) {
24 #   $classlist.=$_;
25 #}
26 $template->param(loggedinuser => $loggedinuser,
27                                                 classlist => $classlist,
28                                                 type => 'intranet',);
29
30 print $query->header(
31     -type => guesstype($template->output),
32     -cookie => $cookie
33 ), $template->output;