X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_bill-logo.cgi;h=9c1c1d71d2289e83cfbccbd9129612b182b7d31b;hb=70838ab866bfcb2d596ed2ca96bb2c23c6cba5c1;hp=50812ea10e66cab053bac25e9dbbd380e28572ed;hpb=0452430dac4d639796581be77e8674207653f42b;p=freeside.git diff --git a/httemplate/view/cust_bill-logo.cgi b/httemplate/view/cust_bill-logo.cgi index 50812ea10..9c1c1d71d 100755 --- a/httemplate/view/cust_bill-logo.cgi +++ b/httemplate/view/cust_bill-logo.cgi @@ -1,12 +1,21 @@ -<% +<% $conf->config_binary("logo$templatename.png") %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('View invoices') + or $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $conf = new FS::Conf; my($query) = $cgi->keywords; $query =~ /^([^\.\/]*)$/; my $templatename = $1; -$templatename = "_$templatename" if $templatename; +if ( $templatename && $conf->exists("logo_$templatename.png") ) { + $templatename = "_$templatename"; +} else { + $templatename = ''; +} -my $conf = new FS::Conf; http_header('Content-Type' => 'image/png' ); -http_header('Content-Type' => 'image/png' ); -%><%= $conf->config_binary("logo$templatename.png") %> +