selfservice command to suspend packages, RT#9989
[freeside.git] / fs_selfservice / FS-SelfService / cgi / cust_bill-logo.cgi
1 #!/usr/bin/perl -T
2 #!/usr/bin/perl -Tw
3
4 use strict;
5 use CGI;
6 use FS::SelfService qw( invoice_logo );
7
8 my $cgi = new CGI;
9
10 my %hash = ();
11 if ( $cgi->param('invnum') ) {
12   $hash{$_} = scalar($cgi->param($_)) foreach qw( invnum template );
13 } else {
14   my($query) = $cgi->keywords;
15   $query =~ /^([^\.\/]*)$/ or '' =~ /^()$/;
16   $hash{'template'} = $1;
17 }
18
19 my $hashref = invoice_logo(%hash);
20
21 print $cgi->header( '-type'    => $hashref->{'content_type'},
22                     '-expires' => 'now',
23                   ).
24       $hashref->{'logo'};
25