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=5f344a32ea8cec17c6796a40cc53575dc8518a90;hb=HEAD;hpb=c648976f0b7975f2328ebd7ba8c711fad0ca4195 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 5f344a32e..253f853f8 --- a/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi +++ b/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi @@ -7,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' => $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',