Changeset 233 for trunk/cgi-bin/CommonWeb.pm
- Timestamp:
- 04/15/05 18:11:39 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/CommonWeb.pm
r105 r233 53 53 } 54 54 55 sub printHeader($) #(cgiurl) 56 { 57 my $cgiURL = $_[0]; 58 print "Content-type: text/html\n\n"; 59 open(FILE, "../header.inc") || die $!; 60 while (<FILE>) 61 { 62 $_ =~ s/\$\$CGIURL\$\$/$cgiURL/g; 63 print $_; 64 } 65 close(FILE); 55 56 sub printHeader { 57 my $title = shift; 58 print "Content-type: text/html\n\n"; 59 # This doesn't work well. Must investigate. 60 # my $realm = shift; 61 # print qq(WWW-Authenticate: Basic realm="$realm"\n) if $realm; 62 open FILE, "../header.inc" 63 or carp $!; 64 my $html = join('',<FILE>); 65 close FILE; 66 67 $html =~ s/\$\$TITLE\$\$/$title/; 68 # Necessary for mangling arbitrary bits of the header 69 my $i=0; 70 while (defined(my $param = shift)) { 71 $html =~ s/\$\$EXTRA$i\$\$/$param/g; 72 $i++; 73 } 74 print $html; 66 75 } 67 76
Note:
See TracChangeset
for help on using the changeset viewer.