1 <% $conf->config_binary("logo$templatename.png", $agentnum) %>
5 unless $FS::CurrentUser::CurrentUser->access_right('View invoices')
6 or $FS::CurrentUser::CurrentUser->access_right('Configuration');
12 if ( $cgi->param('invnum') =~ /^(\d+)$/ ) {
14 $templatename = $cgi->param('template') || $cgi->param('templatename');
15 my $cust_bill = FS::cust_bill->by_key($invnum)
16 || FS::cust_bill_void->by_key($invnum);
17 die 'unknown invnum' unless $cust_bill;
18 $conf = $cust_bill->conf;
19 $agentnum = $cust_bill->cust_main->agentnum;
21 # assume the default config
22 $conf = FS::Conf->new;
23 my($query) = $cgi->keywords;
24 $query =~ /^([^\.\/]*)$/ or die 'illegal query';
28 if ( $templatename && $conf->exists("logo_$templatename.png") ) {
29 $templatename = "_$templatename";
34 http_header('Content-Type' => 'image/png' );