$title = &get_html_framed_title();
&PrintHeader();
$cols = &get_product_name() eq 'usermin' ? 180 : 230;
-print <<EOF;
-<html>
-<head> <title>$title</title> </head>
+&popup_header($title, undef, undef, 1);
+print <<EOF;
<frameset cols="$cols,*" border=0>
<frame name="left" src="left.cgi$cat" scrolling="auto">
<frame name="right" src="$goto" noresize>
<noframes>
<body>
-
<p>This page uses frames, but your browser doesn't support them.</p>
-
</body>
</noframes>
</frameset>
-</html>
EOF
+&popup_footer();
}
print "$tconfig{'headhtml'}\n" if ($tconfig{'headhtml'});
if ($tconfig{'headinclude'}) {
- local $_;
- open(INC, "$theme_root_directory/$tconfig{'headinclude'}");
- while(<INC>) {
- print;
- }
- close(INC);
+ print &read_file_contents(
+ "$theme_root_directory/$tconfig{'headinclude'}");
}
print "</head>\n";
my $bgcolor = defined($tconfig{'cs_page'}) ? $tconfig{'cs_page'} :
}
}
-=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
=item body-stuff - HTML attributes to be include in the <body> tag.
+=item no-body - If set to 1, don't generate a body tag
+
=cut
sub popup_header
{
print $_[1];
print "$tconfig{'headhtml'}\n" if ($tconfig{'headhtml'});
if ($tconfig{'headinclude'}) {
- local $_;
- open(INC, "$theme_root_directory/$tconfig{'headinclude'}");
- while(<INC>) {
- print;
- }
- close(INC);
+ print &read_file_contents(
+ "$theme_root_directory/$tconfig{'headinclude'}");
}
print "</head>\n";
my $bgcolor = defined($tconfig{'cs_page'}) ? $tconfig{'cs_page'} :
defined($gconfig{'cs_text'}) ? $gconfig{'cs_text'} : "000000";
my $bgimage = defined($tconfig{'bgimage'}) ? "background=$tconfig{'bgimage'}"
: "";
-print "<body id='popup' bgcolor=#$bgcolor link=#$link vlink=#$link ",
- "text=#$text $bgimage $tconfig{'inbody'} $_[2]>\n";
-if (defined(&theme_popup_prebody)) {
- &theme_popup_prebody(@_);
+if (!$_[3]) {
+ print "<body id='popup' bgcolor=#$bgcolor link=#$link vlink=#$link ",
+ "text=#$text $bgimage $tconfig{'inbody'} $_[2]>\n";
+ if (defined(&theme_popup_prebody)) {
+ &theme_popup_prebody(@_);
+ }
}
}
}
}
-=head2 popup_footer
+=head2 popup_footer([no-body])
Outputs html for a footer for a popup window, started by popup_header.
&theme_popup_footer(@_);
return;
}
-print "</body></html>\n";
+if (!$_[0]) {
+ print "</body>\n";
+ }
+print "</html>\n";
}
=head2 load_theme_library