blob: 0e04ab5bc78ea6f70567efacc5df5d6f12c90544 (
plain)
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
26
27
|
<% $logo %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
http_header( 'Content-Type' => 'image/png' ); #just png for now
$cgi->param('key') =~ /^([-\w.]+)$/ or die "illegal config option";
my $name = $1;
my $agentnum = '';
if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
$agentnum = $1;
}
my $locale = '';
if ( $cgi->param('locale') =~ /^(\w+)$/ ) {
$locale = $1;
}
my $conf = new FS::Conf { 'locale' => $locale };
my $logo = $conf->config_binary($name, $agentnum);
$logo = eps2png($logo) if $name =~ /\.eps$/i;
</%init>
|