From 57d9974e8e0164453ad7e6b5df4cd8cd78897ef0 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Fri, 6 Sep 2013 01:51:11 -0700 Subject: [PATCH] fix agent-virtualization of logos and other images in self-service, RT#23218 --- fs_selfservice/FS-SelfService/cgi/header.html | 6 +++--- fs_selfservice/FS-SelfService/cgi/image.cgi | 14 +++++++++++--- fs_selfservice/FS-SelfService/cgi/myaccount_menu.html | 8 ++++---- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/fs_selfservice/FS-SelfService/cgi/header.html b/fs_selfservice/FS-SelfService/cgi/header.html index 7bd5496d1..2c378a68e 100644 --- a/fs_selfservice/FS-SelfService/cgi/header.html +++ b/fs_selfservice/FS-SelfService/cgi/header.html @@ -55,13 +55,13 @@ - + '; + $OUT .= ''; } 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' ). '" '. - ' 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 { - $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'} ) { @@ -151,7 +151,7 @@ foreach my $item ( @menu ) { } if ( $menu_bottom_image ) { - $OUT .= ''; + $OUT .= ''; } else { $OUT .= ''; } -- 2.11.0
<%= $no_logo ? '' : '' %><%= $no_logo ? '' : '' %> + STYLE = "background: url(image.cgi?name=title_left_image;agentnum=<%= $agentnum %>) no-repeat left center; padding:0px"> + STYLE = "background: url(image.cgi?name=title_right_image;agentnum=<%= $agentnum %>) no-repeat right center; padding:0px"> <%= $INCLUDE_ARGS[0] %>    diff --git a/fs_selfservice/FS-SelfService/cgi/image.cgi b/fs_selfservice/FS-SelfService/cgi/image.cgi index e951dcd1a..ee17683a6 100755 --- 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; -$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', diff --git a/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html b/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html index 7d1a5f793..38e525772 100644 --- 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 ) { - $OUT .= '