diff options
author | ivan <ivan> | 2005-05-14 17:04:55 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-05-14 17:04:55 +0000 |
commit | df185d34f354c5788e8c4693182b7689a3333839 (patch) | |
tree | debe1c2c86b5e8661140915b5740470133412c31 | |
parent | 691a587e56557208e9b3834c77f36ca47f3a1a25 (diff) |
html invoices: when displaying, use the actual logo from the conf dir - same as the emailed copy
-rw-r--r-- | FS/FS/Conf.pm | 15 | ||||
-rw-r--r-- | conf/invoice_html | 2 | ||||
-rwxr-xr-x | httemplate/view/cust_bill-logo.cgi | 15 |
3 files changed, 31 insertions, 1 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 15ac23d53..ea2785bdf 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -95,6 +95,21 @@ sub config { } } +=item config_binary KEY + +Returns the exact scalar value for key. + +=cut + +sub config_binary { + my($self,$file)=@_; + my($dir)=$self->dir; + my $fh = new IO::File "<$dir/$file" or return; + local $/; + my $content = <$fh>; + $content; +} + =item exists KEY Returns true if the specified key exists, even if the corresponding value diff --git a/conf/invoice_html b/conf/invoice_html index 7b8a85bcc..e4e145e41 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -14,7 +14,7 @@ <table class="invoice_header" width="100%"> <tr> - <td><img src="<%= $cid ? "cid:$cid" : '../images/small-logo.png' %>"></td> + <td><img src="<%= $cid ? "cid:$cid" : 'cust_bill-logo.cgi' %>"></td> <td align="left"><%= $returnaddress %></td> <td align="right"> <table CLASS="invoice_headerright" cellspacing=0> diff --git a/httemplate/view/cust_bill-logo.cgi b/httemplate/view/cust_bill-logo.cgi new file mode 100755 index 000000000..3e9c67fcc --- /dev/null +++ b/httemplate/view/cust_bill-logo.cgi @@ -0,0 +1,15 @@ +<% + +##untaint invnum +#my($query) = $cgi->keywords; +#$query =~ /^((.+)-)?(\d+)$/; +#my $templatename = $2; +#my $invnum = $3; + +my $templatename = ''; + +my $conf = new FS::Conf; +http_header('Content-Type' => 'image/png' ); + +http_header('Content-Type' => 'image/png' ); +%><%= $conf->config_binary("logo$templatename.png") %> |