projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix status colors in mozilla
[freeside.git]
/
httemplate
/
view
/
cust_bill-logo.cgi
diff --git
a/httemplate/view/cust_bill-logo.cgi
b/httemplate/view/cust_bill-logo.cgi
index
3e9c67f
..
e2f810c
100755
(executable)
--- a/
httemplate/view/cust_bill-logo.cgi
+++ b/
httemplate/view/cust_bill-logo.cgi
@@
-1,15
+1,20
@@
-<%
+<% $conf->config_binary("logo$templatename.png") %>
+<%init>
-##untaint invnum
-#my($query) = $cgi->keywords;
-#$query =~ /^((.+)-)?(\d+)$/;
-#my $templatename = $2;
-#my $invnum = $3;
-
-my $templatename = '';
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('View invoices');
my $conf = new FS::Conf;
my $conf = new FS::Conf;
-http_header('Content-Type' => 'image/png' );
+
+my($query) = $cgi->keywords;
+$query =~ /^([^\.\/]*)$/;
+my $templatename = $1;
+if ( $templatename && $conf->exists("logo_$templatename.png") ) {
+ $templatename = "_$templatename";
+} else {
+ $templatename = '';
+}
http_header('Content-Type' => 'image/png' );
http_header('Content-Type' => 'image/png' );
-%><%= $conf->config_binary("logo$templatename.png") %>
+
+</%init>