summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_bill-logo.cgi
diff options
context:
space:
mode:
authorivan <ivan>2007-02-05 12:51:05 +0000
committerivan <ivan>2007-02-05 12:51:05 +0000
commit17856ff5c299e4db21da28116f2666655c03f2c7 (patch)
tree0311558e18ed2b79765658a334d656330207c33b /httemplate/view/cust_bill-logo.cgi
parent8b3782a95dcbc9fe5311b0522416791055a32f4d (diff)
C is for Cookie^WControl
Diffstat (limited to 'httemplate/view/cust_bill-logo.cgi')
-rwxr-xr-xhttemplate/view/cust_bill-logo.cgi34
1 files changed, 19 insertions, 15 deletions
diff --git a/httemplate/view/cust_bill-logo.cgi b/httemplate/view/cust_bill-logo.cgi
index fd6a81a75..e2f810c3f 100755
--- a/httemplate/view/cust_bill-logo.cgi
+++ b/httemplate/view/cust_bill-logo.cgi
@@ -1,16 +1,20 @@
-%
-%
-%my $conf = new FS::Conf;
-%
-%my($query) = $cgi->keywords;
-%$query =~ /^([^\.\/]*)$/;
-%my $templatename = $1;
-%if ( $templatename && $conf->exists("logo_$templatename.png") ) {
-% $templatename = "_$templatename";
-%} else {
-% $templatename = '';
-%}
-%
-%http_header('Content-Type' => 'image/png' );
-%
<% $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;
+if ( $templatename && $conf->exists("logo_$templatename.png") ) {
+ $templatename = "_$templatename";
+} else {
+ $templatename = '';
+}
+
+http_header('Content-Type' => 'image/png' );
+
+</%init>