import torrus 1.0.9
[freeside.git] / httemplate / config / config-image.cgi
1 <% $logo %>
2 <%init>
3
4 die "access denied"
5   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
6
7 my $conf = new FS::Conf;
8
9 http_header( 'Content-Type' => 'image/png' ); #just png for now
10
11 $cgi->param('key') =~ /^([-\w.]+)$/ or die "illegal config option";
12 my $name = $1;
13
14 my $agentnum = '';
15 if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
16   $agentnum = $1;
17 }
18
19 my $logo = $conf->config_binary($name, $agentnum);
20 $logo = eps2png($logo) if $name =~ /\.eps$/i;
21
22 </%init>