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') ) {
13 $templatename = $cgi->param('template') || $cgi->param('templatename');
14 my $cust_bill = qsearchs('cust_bill', { 'invnum' => $cgi->param('invnum') } )
15 or die 'unknown invnum';
16 $conf = $cust_bill->conf;
17 $agentnum = $cust_bill->cust_main->agentnum;
19 # assume the default config
20 $conf = FS::Conf->new;
21 my($query) = $cgi->keywords;
22 $query =~ /^([^\.\/]*)$/ or die 'illegal query';
26 if ( $templatename && $conf->exists("logo_$templatename.png") ) {
27 $templatename = "_$templatename";
32 http_header('Content-Type' => 'image/png' );