2008-09-28 19:05:17 +02:00
|
|
|
#!/usr/bin/perl
|
|
|
|
use HTML::Template;
|
|
|
|
|
2009-11-25 09:44:12 +01:00
|
|
|
my $skin_dir = "/usr/local/lemonldap-ng/htdocs/portal/skins";
|
2008-09-28 19:05:17 +02:00
|
|
|
|
2009-11-25 09:44:12 +01:00
|
|
|
my $portal = Lemonldap::NG::Portal::SharedConf->new(
|
|
|
|
# PORTAL CUSTOMIZATION
|
|
|
|
# Skin
|
|
|
|
#portalSkin => 'pastel',
|
|
|
|
);
|
2008-09-28 19:05:17 +02:00
|
|
|
|
2009-11-25 09:44:12 +01:00
|
|
|
my $skin = $portal->{portalSkin};
|
|
|
|
my $portal_url = $portal->{portal};
|
2008-09-28 19:05:17 +02:00
|
|
|
my $logout_url = "$portal_url?logout=1";
|
|
|
|
|
2009-12-03 16:45:13 +01:00
|
|
|
# Which HTTP error?
|
|
|
|
my $http_error = $portal->param('error');
|
|
|
|
|
|
|
|
my $error500 = 1 if ( $http_error eq "500" );
|
|
|
|
my $error403 = 1 if ( $http_error eq "403" or !$error500 );
|
|
|
|
|
2008-09-28 19:05:17 +02:00
|
|
|
my $template = HTML::Template->new(
|
|
|
|
filename => "$skin_dir/$skin/error.tpl",
|
|
|
|
die_on_bad_params => 0,
|
|
|
|
cache => 0,
|
|
|
|
filter => sub{$portal->translate_template(@_)}
|
|
|
|
);
|
|
|
|
|
|
|
|
$template->param( PORTAL_URL => "$portal_url" );
|
|
|
|
$template->param( LOGOUT_URL => "$logout_url" );
|
2009-06-25 17:43:14 +02:00
|
|
|
$template->param( SKIN => "$skin" );
|
2009-12-03 16:45:13 +01:00
|
|
|
$template->param( ERROR403 => "$error403" );
|
|
|
|
$template->param( ERROR500 => "$error500" );
|
2008-09-28 19:05:17 +02:00
|
|
|
|
|
|
|
print $portal->header('text/html; charset=utf8');
|
|
|
|
print $template->output;
|