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