#!/usr/local/bin/perl5
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# scripts.pl #
# #
# Accepts the name of a script. #
# #
# Returns the text of the script. #
# #
# (c) 2000, Benjamin Schak #
# Feel free to use in any way, as long as you keep this notice. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
use CGI_UltraLite;
package main;
print "Content-type: text/html; charset=utf-8\n\n";
CGI_UltraLite::getparse();
$script = $CGI_UltraLite::value[0];
unless (($script eq "viewmonth.pl") || ($script eq "newentry.pl") ||
($script eq "feedback.pl") || ($script eq "scripts.pl") || ($script eq
"CGI_UltraLite.pm")) {
$script = "";
}
print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"
\"http://www.w3.org/TR/html4/strict.dtd\">
<html lang=\"en-us\">
<head>
<title>$script</title>
<meta http-equiv=\"PICS-Label\" content='(PICS-1.1 \"http://www.classify.org/safesurf/\" l gen true for \"http://www.schak.com/\" r (SS~~000 4 SS~~001 6 SS~~0008 2))'>
<meta http-equiv=\"PICS-Label\" content='(PICS-1.1 \"http://www.rsac.org/ratingsv01.html\" l gen true comment \"RSACi North America Server\" for \"http://www.schak.com/\" on \"1999.06.30T18:38-0800\" r (n 0 s 0 v 0 l 3))'>
<link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\">
</head>
<body>
<h1>
$script
</h1>
<div id=\"body\">
<pre>
";
open (FILE, $script);
while (<FILE>) {
s/</\<\;/g;
print;
}
close (FILE);
print " </pre>
</div>
<div id=\"nav\">
<ul>
<li><a href=\"/news\">News</a></li>
<li><a href=\"/links\">Links</a></li>
<li><a href=\"/other\">Other</a></li>
<li><a href=\"/scripts\">Scripts</a>
<ul>
<li><a
href=\"/cgi-bin/scripts.pl?name=viewmonth.pl\">viewmonth.pl</a></li>
<li><a
href=\"/cgi-bin/scripts.pl?name=newentry.pl\">newentry.pl</a></li>
<li><a
href=\"/cgi-bin/scripts.pl?name=feedback.pl\">feedback.pl</a></li>
<li><a
href=\"/cgi-bin/scripts.pl?name=scripts.pl\">scripts.pl</a></li>
<li><a
href=\"/cgi-bin/scripts.pl?name=CGI_UltraLite.pm\">CGI_UltraLite.pm</a></li>
</ul>
</li>
</ul>
</div>
</body>
</html>";