#!/usr/bin/perl -w #------------------------------------------------------------ # docs.cgi # # Web-based text file viewer. # Copyright Paul Mutton, 2000. #------------------------------------------------------------ use strict; use CGI; $| = 1; # Settings my ($left) = "../left.inc" ; my ($title) = "../title.inc"; my ($bottom) = "../bottom.inc"; my ($query) = new CGI; my ($doci) = ($query->param('doc') =~ /^\s*(.*?\.txt)\s*$/); my ($doc) = "../documentation/$doci"; print "content-type: text/html\n\n"; print <<"END";
END &print_file($left); print <<"END"; |
END
&print_file($title);
print "\n"; &print_file($doc); print "\n"; &print_file($bottom); print <<"END"; |