X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fcust_bill-logo.cgi;h=253f853f87b45a78ce5d0902d372b2af937ae39d;hp=e353b4489f669fda0bfe98ba35ec26888d0cf725;hb=HEAD;hpb=cea76425e837641044923ac3622a2d0a35e4cfb2 diff --git a/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi b/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi old mode 100644 new mode 100755 index e353b4489..253f853f8 --- a/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi +++ b/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi @@ -1,3 +1,4 @@ +#!/usr/bin/perl -T #!/usr/bin/perl -Tw use strict; @@ -6,10 +7,16 @@ use FS::SelfService qw( invoice_logo ); my $cgi = new CGI; -my($query) = $cgi->keywords; -$query =~ /^([^\.\/]*)$/ or '' =~ /^()$/; -my $templatename = $1; -my $hashref = invoice_logo($templatename); +my %hash = (); +if ( $cgi->param('invnum') ) { + $hash{$_} = scalar($cgi->param($_)) foreach qw( invnum template ); +} else { + my($query) = $cgi->keywords; + $query =~ /^([^\.\/]*)$/ or '' =~ /^()$/; + $hash{'template'} = $1; +} + +my $hashref = invoice_logo(%hash); print $cgi->header( '-type' => $hashref->{'content_type'}, '-expires' => 'now',