diff --git a/blue-theme/index.cgi b/blue-theme/index.cgi index 1cb4b6f50..29a2f79b8 100755 --- a/blue-theme/index.cgi +++ b/blue-theme/index.cgi @@ -26,21 +26,18 @@ if ($in{'page'}) { $title = &get_html_framed_title(); &PrintHeader(); $cols = &get_product_name() eq 'usermin' ? 180 : 230; -print < - $title +&popup_header($title, undef, undef, 1); +print < <body> - <p>This page uses frames, but your browser doesn't support them.</p> - </body> - EOF +&popup_footer(); diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 43ccadf2b..3d95f9c41 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -789,12 +789,8 @@ if (@_ > 0) { } print "$tconfig{'headhtml'}\n" if ($tconfig{'headhtml'}); if ($tconfig{'headinclude'}) { - local $_; - open(INC, "$theme_root_directory/$tconfig{'headinclude'}"); - while() { - print; - } - close(INC); + print &read_file_contents( + "$theme_root_directory/$tconfig{'headinclude'}"); } print "\n"; my $bgcolor = defined($tconfig{'cs_page'}) ? $tconfig{'cs_page'} : @@ -1021,7 +1017,7 @@ else { } } -=head2 popup_header([title], [head-stuff], [body-stuff]) +=head2 popup_header([title], [head-stuff], [body-stuff], [no-body]) Outputs a page header, suitable for a popup window. If no title is given, absolutely no decorations are output. Also useful in framesets. The parameters @@ -1033,6 +1029,8 @@ are : =item body-stuff - HTML attributes to be include in the tag. +=item no-body - If set to 1, don't generate a body tag + =cut sub popup_header { @@ -1056,12 +1054,8 @@ print "$_[0]\n"; print $_[1]; print "$tconfig{'headhtml'}\n" if ($tconfig{'headhtml'}); if ($tconfig{'headinclude'}) { - local $_; - open(INC, "$theme_root_directory/$tconfig{'headinclude'}"); - while() { - print; - } - close(INC); + print &read_file_contents( + "$theme_root_directory/$tconfig{'headinclude'}"); } print "\n"; my $bgcolor = defined($tconfig{'cs_page'}) ? $tconfig{'cs_page'} : @@ -1072,10 +1066,12 @@ my $text = defined($tconfig{'cs_text'}) ? $tconfig{'cs_text'} : defined($gconfig{'cs_text'}) ? $gconfig{'cs_text'} : "000000"; my $bgimage = defined($tconfig{'bgimage'}) ? "background=$tconfig{'bgimage'}" : ""; -print "\n"; -if (defined(&theme_popup_prebody)) { - &theme_popup_prebody(@_); +if (!$_[3]) { + print "\n"; + if (defined(&theme_popup_prebody)) { + &theme_popup_prebody(@_); + } } } @@ -1152,7 +1148,7 @@ if (!$_[$i]) { } } -=head2 popup_footer +=head2 popup_footer([no-body]) Outputs html for a footer for a popup window, started by popup_header. @@ -1164,7 +1160,10 @@ if (defined(&theme_popup_footer)) { &theme_popup_footer(@_); return; } -print "\n"; +if (!$_[0]) { + print "\n"; + } +print "\n"; } =head2 load_theme_library