File: error.pl

package info (click to toggle)
lemonldap-ng 0.9.4.1-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,840 kB
  • ctags: 1,187
  • sloc: perl: 10,032; makefile: 478; xml: 93; sh: 73; sql: 69
file content (25 lines) | stat: -rwxr-xr-x 656 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl
use Lemonldap::NG::Portal::Error;
use HTML::Template;

my $skin        = "pastel";
my $skin_dir    = "__SKINDIR__";

my $portal = Lemonldap::NG::Portal::Error->new();

my $portal_url = $portal->getPortal;
my $logout_url = "$portal_url?logout=1";

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" );
$template->param( SKIN       => "$skin" );

print $portal->header('text/html; charset=utf8');
print $template->output;