# help.cgi
# Displays help HTML for some module, with substitutions
-require './web-lib.pl';
+BEGIN { push(@INC, ".."); };
+use WebminCore;
+
+$trust_unknown_referers = 1;
&init_config();
&error_setup($text{'help_err'});
$ENV{'PATH_INFO'} !~ /[\\\&\;\`\'\"\|\*\?\~\<\>\^\(\)\[\]\{\}\$\n\r]/ ||
close(HELP);
# find and replace the <header> section
-if ($help =~ s/<header>([^<]+)<\/header>/<center><h3>$1<\/h3><\/center><hr>/i) {
- &header($1);
+if ($help =~ s/<header>([^<]+)<\/header>//i) {
+ &popup_header($1);
+ print &ui_subheading($1);
}
else {
&helperror($text{'help_eheader'});
}
+# replace any explicit use of <hr> with the ui-lib function
+$uihr = &ui_hr();
+$help =~ s/<hr>/$uihr/ig;
+
# find and replace the <footer> section
-$help =~ s/<footer>/<p><hr>/i;
+$help =~ s/<footer>/<p>/i;
# find and replace <include> directives
$help =~ s/<include\s+(\S+)>/inchelp($1)/ige;
# output the HTML
print $help;
-&footer();
+&popup_footer();
# inchelp(path)
sub inchelp