2008-11-04 17:35:16 +01:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
use strict;
|
2012-10-16 16:46:54 +02:00
|
|
|
use Lemonldap::NG::Manager;
|
2008-11-04 17:35:16 +01:00
|
|
|
use Lemonldap::NG::Manager::Sessions;
|
2010-04-28 21:57:16 +02:00
|
|
|
use HTML::Template;
|
2008-11-04 17:35:16 +01:00
|
|
|
|
2010-04-28 21:57:16 +02:00
|
|
|
my $cgi = Lemonldap::NG::Manager::Sessions->new(
|
2010-03-20 18:14:28 +01:00
|
|
|
{
|
2008-12-25 21:06:23 +01:00
|
|
|
|
2010-04-28 21:57:16 +02:00
|
|
|
# SESSION EXPLORER CUSTOMIZATION
|
|
|
|
#managerSkin => 'default',
|
2009-05-20 11:29:52 +02:00
|
|
|
|
|
|
|
# ACCESS TO CONFIGURATION
|
2010-04-28 21:57:16 +02:00
|
|
|
|
2008-12-25 21:06:23 +01:00
|
|
|
# By default, Lemonldap::NG uses the default storage.conf file to know
|
|
|
|
# where to find is configuration
|
|
|
|
# (generaly /etc/lemonldap-ng/storage.conf)
|
|
|
|
# You can specify by yourself this file :
|
2010-04-28 21:57:16 +02:00
|
|
|
#configStorage => { type => 'File', dirName => '/path/to/my/file' },
|
2008-12-25 21:06:23 +01:00
|
|
|
|
|
|
|
# You can also specify directly the configuration
|
|
|
|
# (see Lemonldap::NG::Handler::SharedConf(3))
|
|
|
|
#configStorage => {
|
|
|
|
# type => 'File',
|
2010-04-28 21:57:16 +02:00
|
|
|
# directory => '/usr/local/lemonlda-ng/conf/'
|
2008-12-25 21:06:23 +01:00
|
|
|
#},
|
2010-03-20 18:14:28 +01:00
|
|
|
}
|
2010-04-28 21:57:16 +02:00
|
|
|
) or Lemonldap::NG::Common::CGI->abort('Unable to start sessions explorer');
|
|
|
|
|
2011-01-25 17:41:31 +01:00
|
|
|
my $skin = $cgi->{managerSkin} or $cgi->abort('managerSkin is not defined');
|
|
|
|
my $css = 'tree.css';
|
2010-11-29 16:31:26 +01:00
|
|
|
my $css_theme = 'ui-lightness';
|
2011-01-25 17:41:31 +01:00
|
|
|
my $skin_dir = 'skins';
|
2012-06-13 20:43:27 +02:00
|
|
|
my $main_dir = $cgi->getApacheHtdocsPath;
|
2010-04-28 21:57:16 +02:00
|
|
|
|
|
|
|
my $template = HTML::Template->new(
|
|
|
|
filename => "$main_dir/$skin_dir/$skin/sessions.tpl",
|
|
|
|
die_on_bad_params => 0,
|
|
|
|
cache => 0,
|
|
|
|
filter => sub { $cgi->translate_template(@_) },
|
2010-03-20 18:14:28 +01:00
|
|
|
);
|
2011-01-25 17:41:31 +01:00
|
|
|
$template->param( SCRIPT_NAME => $ENV{SCRIPT_NAME} );
|
|
|
|
$template->param( TREE => $cgi->tree() );
|
|
|
|
$template->param( DIR => "$skin_dir/$skin" );
|
|
|
|
$template->param( CSS => $css );
|
2010-11-29 16:31:26 +01:00
|
|
|
$template->param( CSS_THEME => $css_theme );
|
2012-10-16 16:46:54 +02:00
|
|
|
$template->param( VERSION => $Lemonldap::NG::Manager::VERSION );
|
2014-07-02 16:38:13 +02:00
|
|
|
$template->param( LANG => shift @{ $cgi->{lang} } );
|
2010-04-28 21:57:16 +02:00
|
|
|
print $cgi->header('text/html; charset=utf-8');
|
|
|
|
print $template->output;
|
2008-11-04 17:35:16 +01:00
|
|
|
|