2006-12-18 12:32:33 +01:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
2009-12-11 19:17:00 +01:00
|
|
|
use strict;
|
2006-12-18 12:32:33 +01:00
|
|
|
use Lemonldap::NG::Manager;
|
2009-12-11 19:17:00 +01:00
|
|
|
use HTML::Template;
|
2006-12-18 12:32:33 +01:00
|
|
|
|
2009-12-11 19:17:00 +01:00
|
|
|
my $manager = new Lemonldap::NG::Manager(
|
2007-02-28 13:56:35 +01:00
|
|
|
{
|
2010-03-20 18:14:28 +01:00
|
|
|
|
2008-12-25 21:06:23 +01:00
|
|
|
# ACCESS TO CONFIGURATION
|
|
|
|
|
2009-12-11 19:17:00 +01:00
|
|
|
# By default, Lemonldap::NG uses the default storage.conf file to know
|
2008-12-25 21:06:23 +01:00
|
|
|
# where to find is configuration
|
2009-12-11 19:17:00 +01:00
|
|
|
# (generaly /etc/lemonldap-ng/storage.conf)
|
2008-12-25 21:06:23 +01:00
|
|
|
# You can specify by yourself this file :
|
2010-05-26 17:17:51 +02:00
|
|
|
#configStorage => { confFile => '/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-05-26 17:17:51 +02:00
|
|
|
# directory => '/usr/local/lemonldap-ng/conf/'
|
2008-12-25 21:06:23 +01:00
|
|
|
#},
|
|
|
|
|
2007-02-28 13:56:35 +01:00
|
|
|
}
|
2009-12-11 19:17:00 +01:00
|
|
|
) or Lemonldap::NG::Common::CGI->abort('Unable to start manager');
|
|
|
|
|
2010-03-20 18:14:28 +01:00
|
|
|
our $skin = $manager->{managerSkin};
|
|
|
|
our $skin_dir = 'skins';
|
2012-06-13 20:43:27 +02:00
|
|
|
our $main_dir = $manager->getApacheHtdocsPath;
|
2010-01-08 22:51:16 +01:00
|
|
|
|
2009-12-11 19:17:00 +01:00
|
|
|
my $template = HTML::Template->new(
|
|
|
|
filename => "$main_dir/$skin_dir/$skin/manager.tpl",
|
|
|
|
die_on_bad_params => 0,
|
|
|
|
cache => 0,
|
|
|
|
filter => sub { $manager->translate_template(@_) },
|
|
|
|
);
|
2010-03-20 18:14:28 +01:00
|
|
|
$template->param( SCRIPT_NAME => $ENV{SCRIPT_NAME} );
|
|
|
|
$template->param( MENU => $manager->menu() );
|
|
|
|
$template->param( DIR => "$skin_dir/$skin" );
|
|
|
|
$template->param( CFGNUM => $manager->{cfgNum} );
|
|
|
|
$template->param( TREE_AUTOCLOSE => $manager->{managerTreeAutoClose} );
|
|
|
|
$template->param( TREE_JQUERYCSS => $manager->{managerTreeJqueryCss} );
|
|
|
|
$template->param( CSS => $manager->{managerCss} );
|
2010-11-05 15:01:57 +01:00
|
|
|
$template->param( CSS_THEME => $manager->{managerCssTheme} );
|
2012-10-16 16:46:54 +02:00
|
|
|
$template->param( VERSION => $Lemonldap::NG::Manager::VERSION );
|
2014-06-29 14:57:36 +02:00
|
|
|
$template->param( LANG => shift @{ $manager->{lang} } );
|
2014-07-19 15:13:04 +02:00
|
|
|
$template->param( PORTAL_URL => $manager->{portal} );
|
2009-12-11 19:17:00 +01:00
|
|
|
print $manager->header('text/html; charset=utf-8');
|
|
|
|
print $template->output;
|
2006-12-18 12:32:33 +01:00
|
|
|
|