Changeset 479 for branches/htmlform/cgi-bin/CommonWeb.pm
- Timestamp:
- 09/17/10 18:49:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/htmlform/cgi-bin/CommonWeb.pm
r450 r479 16 16 $VERSION = 1.00; 17 17 @ISA = qw(Exporter); 18 @EXPORT_OK = qw( &print Header &printError &printAndExit &desanitize &cleanInput &desanitize);18 @EXPORT_OK = qw( &printError &printAndExit &desanitize &cleanInput &desanitize); 19 19 20 20 @EXPORT = (); #export nothing by default … … 25 25 ); 26 26 27 28 sub printHeader {29 my $title = shift;30 print "Content-type: text/html\n\n";31 # This doesn't work well. Must investigate.32 # my $realm = shift;33 # print qq(WWW-Authenticate: Basic realm="$realm"\n) if $realm;34 open FILE, "../header.inc"35 or carp $!;36 my $html = join('',<FILE>);37 close FILE;38 39 $html =~ s/\$\$TITLE\$\$/$title/;40 # Necessary for mangling arbitrary bits of the header41 my $i=0;42 while (defined(my $param = shift)) {43 $html =~ s/\$\$EXTRA$i\$\$/$param/g;44 $i++;45 }46 print $html;47 }48 27 49 28 sub printError($)
Note:
See TracChangeset
for help on using the changeset viewer.