first cut at perl script to create the about page.
[wip/koha-chris_n.git] / about.pl
1 #!/usr/bin/perl
2 use HTML::Template;
3 use strict;
4 require Exporter;
5 use C4::Database;
6 use C4::Output;  # contains gettemplate
7 use C4::Interface::CGI::Output;
8 use C4::Auth;
9 use C4::Context;
10 use CGI;
11
12 my $query = new CGI;
13 my ($template, $loggedinuser, $cookie)
14     = get_template_and_user({template_name => "intranet-main.tmpl",
15                              query => $query,
16                              type => "intranet",
17                              authnotrequired => 0,
18                              flagsrequired => {parameters => 1},
19                              debug => 1,
20                              });
21
22 my $kohaVersion = C4::Context->config("kohaversion");
23 my $osVersion = `/bin/uname -a`;
24 my $perlVersion = `/usr/bin/perl -v`;
25 my $mysqlVersion = "unknown";
26 my $apacheVersion =  "unknown";
27
28 $template>param(
29                         osVersion          => $osVersion,
30                         perlVersion        => $perlVersion,
31                         mysqlVersion       => $mysqlVersion,
32                         apacheVersion      => $apacheVersion,
33                 );
34
35 output_html_with_http_headers $query, $cookie, $template->output;