summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/Conf.pm15
-rw-r--r--conf/invoice_html2
-rwxr-xr-xhttemplate/view/cust_bill-logo.cgi15
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") %>