summaryrefslogtreecommitdiff
path: root/httemplate/config/config-image.cgi
blob: 892f7c65beb45157db83e4ec969030ba77493a92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<% $conf->config_binary($name, $agentnum) %>
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

my $conf = new FS::Conf;

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;
}

</%init>