projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
154d2a6
)
fix agent-virtualization of logos and other images in self-service, RT#23218
author
Ivan Kohler
<ivan@freeside.biz>
Fri, 6 Sep 2013 08:51:13 +0000
(
01:51
-0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Fri, 6 Sep 2013 08:51:13 +0000
(
01:51
-0700)
fs_selfservice/FS-SelfService/cgi/header.html
patch
|
blob
|
history
fs_selfservice/FS-SelfService/cgi/image.cgi
patch
|
blob
|
history
fs_selfservice/FS-SelfService/cgi/myaccount_menu.html
patch
|
blob
|
history
diff --git
a/fs_selfservice/FS-SelfService/cgi/header.html
b/fs_selfservice/FS-SelfService/cgi/header.html
index
7bd5496
..
2c378a6
100644
(file)
--- a/
fs_selfservice/FS-SelfService/cgi/header.html
+++ b/
fs_selfservice/FS-SelfService/cgi/header.html
@@
-55,13
+55,13
@@
<TABLE BORDER=0 WIDTH="100%" CELLPADDING=0 CELLSPACING=0>
<TR STYLE="padding:0px">
<TABLE BORDER=0 WIDTH="100%" CELLPADDING=0 CELLSPACING=0>
<TR STYLE="padding:0px">
- <TD><%= $no_logo ? '' : '<IMG SRC="image.cgi?
logo
">' %></TD>
+ <TD><%= $no_logo ? '' : '<IMG SRC="image.cgi?
name=logo;agentnum='. $agentnum. '
">' %></TD>
<TD WIDTH = "29%"
<TD WIDTH = "29%"
- STYLE = "background: url(image.cgi?
title_left_image
) no-repeat left center; padding:0px">
+ STYLE = "background: url(image.cgi?
name=title_left_image;agentnum=<%= $agentnum %>
) no-repeat left center; padding:0px">
</TD>
<TD WIDTH = "49%"
ALIGN="<%= $title_align || 'left' %>"
</TD>
<TD WIDTH = "49%"
ALIGN="<%= $title_align || 'left' %>"
- STYLE = "background: url(image.cgi?
title_right_image
) no-repeat right center; padding:0px">
+ STYLE = "background: url(image.cgi?
name=title_right_image;agentnum=<%= $agentnum %>
) no-repeat right center; padding:0px">
<FONT SIZE = "<%= $title_size || 5 %>"
COLOR = "<%= $title_color %>"
><%= $INCLUDE_ARGS[0] %> </FONT>
<FONT SIZE = "<%= $title_size || 5 %>"
COLOR = "<%= $title_color %>"
><%= $INCLUDE_ARGS[0] %> </FONT>
diff --git
a/fs_selfservice/FS-SelfService/cgi/image.cgi
b/fs_selfservice/FS-SelfService/cgi/image.cgi
index
e951dcd
..
ee17683
100755
(executable)
--- a/
fs_selfservice/FS-SelfService/cgi/image.cgi
+++ b/
fs_selfservice/FS-SelfService/cgi/image.cgi
@@
-8,10
+8,18
@@
use FS::SelfService qw( skin_info );
my $cgi = new CGI;
my($query) = $cgi->keywords;
my $cgi = new CGI;
my($query) = $cgi->keywords;
-$query =~ /^(\w+)$/ or '' =~ /^()$/;
-my $name = $1;
+my( $name, $agentnum ) = ( '', '' );
+if ( $query =~ /^(\w+)$/ ) {
+ $name = $1;
+} else {
+ $cgi->param('name') =~ /^(\w+)$/ or '' =~ /^()$/;
+ $name = $1;
+ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
+ $agentnum = $1;
+ }
+}
-my $info = skin_info();
+my $info = skin_info(
agentnum=>$agentnum
);
print $cgi->header( '-type' => 'image/png', #for now
#'-expires' => 'now',
print $cgi->header( '-type' => 'image/png', #for now
#'-expires' => 'now',
diff --git
a/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html
b/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html
index
7d1a5f7
..
38e5257
100644
(file)
--- a/
fs_selfservice/FS-SelfService/cgi/myaccount_menu.html
+++ b/
fs_selfservice/FS-SelfService/cgi/myaccount_menu.html
@@
-7,7
+7,7
@@
<%=
if ( $menu_top_image ) {
<%=
if ( $menu_top_image ) {
- $OUT .= '<TR><TD STYLE="padding:0px"><IMG SRC="image.cgi?
menu_top_image
"></TD></TR>';
+ $OUT .= '<TR><TD STYLE="padding:0px"><IMG SRC="image.cgi?
name=menu_top_image;agentnum='. $agentnum. '
"></TD></TR>';
}
my @menu = (
}
my @menu = (
@@
-106,11
+106,11
@@
foreach my $item ( @menu ) {
if ( $menu_body_image ) {
if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
$OUT .= #' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
if ( $menu_body_image ) {
if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
$OUT .= #' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
- ' STYLE="background: url(image.cgi?
menu_body_image
) 0 bottom; '.
+ ' STYLE="background: url(image.cgi?
name=menu_body_image;agentnum='. $agentnum. '
) 0 bottom; '.
' color:#3366CC"; '. #XXX config
' " ';
} else {
' color:#3366CC"; '. #XXX config
' " ';
} else {
- $OUT .= ' STYLE="background: url(image.cgi?
menu_body_image
) 0 bottom" ';
+ $OUT .= ' STYLE="background: url(image.cgi?
name=menu_body_imagei;agentnum='. $agentnum. '
) 0 bottom" ';
}
} else {
if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
}
} else {
if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
@@
-151,7
+151,7
@@
foreach my $item ( @menu ) {
}
if ( $menu_bottom_image ) {
}
if ( $menu_bottom_image ) {
- $OUT .= '<TR><TD STYLE="padding:0px"><IMG SRC="image.cgi?
menu_bottom_image
"></TD></TR>';
+ $OUT .= '<TR><TD STYLE="padding:0px"><IMG SRC="image.cgi?
name=menu_bottom_image;agentnum='. $agentnum. '
"></TD></TR>';
} else {
$OUT .= '<TR><TD STYLE="border-right: 1px solid black" HEIGHT="100%"><BR><BR><BR><BR></TD></TR>';
}
} else {
$OUT .= '<TR><TD STYLE="border-right: 1px solid black" HEIGHT="100%"><BR><BR><BR><BR></TD></TR>';
}