fixes + improvment. shows now apache and mysql versions
[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 => "about.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 = `uname -a`;
24 my $perlVersion = `perl -v`;
25 my $mysqlVersion = `mysql -V`;
26 my $apacheVersion =  `httpd -V`;
27
28 $template->param(
29                                         kohaVersion => $kohaVersion,
30                                         osVersion          => $osVersion,
31                                         perlVersion        => $perlVersion,
32                                         mysqlVersion       => $mysqlVersion,
33                                         apacheVersion      => $apacheVersion,
34                 );
35
36 output_html_with_http_headers $query, $cookie, $template->output;