event refactor, landing on HEAD!
[freeside.git] / httemplate / view / cust_bill-logo.cgi
1 <% $conf->config_binary("logo$templatename.png") %>
2 <%init>
3
4 die "access denied"
5   unless $FS::CurrentUser::CurrentUser->access_right('View invoices')
6       or $FS::CurrentUser::CurrentUser->access_right('Configuration');
7
8 my $conf = new FS::Conf;
9
10 my($query) = $cgi->keywords;
11 $query =~ /^([^\.\/]*)$/;
12 my $templatename = $1;
13 if ( $templatename && $conf->exists("logo_$templatename.png") ) {
14   $templatename = "_$templatename";
15 } else {
16   $templatename = '';
17 }
18
19 http_header('Content-Type' => 'image/png' );
20
21 </%init>