self-service interface: move from text to html invoices
[freeside.git] / fs_selfservice / FS-SelfService / cgi / cust_bill-logo.cgi
diff --git a/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi b/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi
new file mode 100644 (file)
index 0000000..bf82a87
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/perl -Tw
+
+use strict;
+use CGI;
+use FS::SelfService qw( invoice_logo );
+
+$cgi = new CGI;
+
+my($query) = $cgi->keywords;
+$query =~ /^([^\.\/]*)$/ or '' =~ /^()$/;
+my $templatename = $1;
+invoice_logo($templatename);
+
+print $cgi->header( '-type'    => $content_type,
+                    '-expires' => 'now',
+                  ).
+      $logo;
+