Source listing of dispt.cgi.

Source listing of dispt.cgi.

source   back   launcher

#!/usr/bin/perl
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use File::Basename;
print "Content-type: text/html\n\n";
$| = 1;
open (STDERR, ">&STDOUT");
if (!defined($thissource=param('thissource'))) {$thissource=$0;}
$base=basename($thissource);
$base2=basename($0);
if (!defined($orig=param('orig'))) {$orig=$base;}
$title="Source listing of $base.";
print "<HTML><HEADER><TITLE>$title</TITLE></HEADER><BODY>";
print "<FONT size=5 face=arial><H1>$title</H1>";
print "<A HREF=$base2?orig=$orig>source</A>&nbsp;&nbsp;
<A HREF=$orig>back</A>&nbsp;&nbsp;
<A href=../launcher.html>launcher</A><BR><BR>";
open(SOURCE, $base) or die ("Can't open $base: $!");
@lines = <SOURCE>;
close(SOURCE) or die ("Can't close $base: $!");
foreach $storey (@lines){
chop($storey);
$storey =~s/&/&amp;/g;
$storey =~s/</&lt;/g;
$storey =~s/>/&gt;/g;
print "$storey<BR>\n";
}
print "Page created on Wednesday September 2nd 2020.<BR><BR></BODY></HTML>";

Page created on Wednesday September 2nd 2020.