default to a session cookie instead of setting an explicit timeout, weird timezone...
[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 http_header( 'Content-Type' => 'image/png' ); #just png for now
8
9 $cgi->param('key') =~ /^([-\w.]+)$/ or die "illegal config option";
10 my $name = $1;
11
12 my $agentnum = '';
13 if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
14   $agentnum = $1;
15 }
16
17 my $locale = '';
18 if ( $cgi->param('locale') =~ /^(\w+)$/ ) {
19   $locale = $1;
20 }
21
22 my $conf = new FS::Conf { 'locale' => $locale };
23
24 my $logo = $conf->config_binary($name, $agentnum);
25 $logo = eps2png($logo) if $name =~ /\.eps$/i;
26
27 </%init>