#!/usr/bin/perl -wT

my $http_cookie = $ENV{'HTTP_COOKIE'};
my $script_name = $ENV{'SCRIPT_NAME'};
my $file;
my $misties;
my $buf;
my @comments;
my @paths;


if($http_cookie =~ "mst3k=1")
{
  $file = "templates/mst3k.html";
  open(FH, $file);
  read(FH, $misties, 8192);
  close(FH);
  @paths = split (/\//,$script_name);
  $file = 'comments/' . pop(@paths) . '.txt';
  open(FH, $file);
  read(FH, $buf, 1024);
  @comments = split(/\n/,$buf);
  for($i = 0;$i < 3;$i++)
  {
    $random = int(rand(@comments));
    $random = splice(@comments,$random,1);
    $misties =~ s/TEXT/$random/;
  }
  $misties =~ s/FILENAME/$file/;
}

use strict;

print <<END_OF_PAGE;

<html>
<head>
<title>links</title>
</head>
<style type="text/css">
        body {; background : #003838 ;
        color : #70A0A0; }
        A:link, A:visited { text-decoration : none }
        A:visited { color : #001010}
        A:link { color : #001010 }
        A:hover { color : #E0E000;
	background : ;}

</style>
<body>
<a href = "http://www.yikes.com/~pengo">main</a>.links
<br>
<br>
<center>
<table border = "0" cellpadding = "0" cellspacing ="5">
 <tr>
  <td bgcolor = "707070" height = "15" width ="15" rowspan = "3">
  </td>
  <td height = "15" width ="15">
  </td>
  <td bgcolor = "607575" height = "15" width ="15">
  </td>
  <td bgcolor = "508080" height = "15" width ="15"colspan = "2">
  </td>
  <td bgcolor = "408585" height = "15" width ="15"rowspan = "3">
  </td>
  <td bgcolor = "408585" height = "15" width ="15">
  </td>
  <td bgcolor = "309090" height = "15" width ="15"rowspan = "2">
  </td>
  <td bgcolor = "309090" height = "15" width ="15">
  </td>
 </tr>
 <tr>
  <td height = "15" width ="15">
  </td>
  <td bgcolor = "607575" height = "15" width ="15" rowspan = "2">
  </td>
  <td bgcolor = "508080" height = "15" width ="15" rowspan = "2">
  </td>
  <td bgcolor = "508080" height = "15" width ="15" rowspan = "2">
  </td>
  <td bgcolor = "408585" height = "15" width ="15" rowspan = "2">
  </td>
  <td bgcolor = "309090" height = "15" width ="15" rowspan = "2">
  </td>
 </tr>
 <tr>
  <td bgcolor = "707070" height = "15" width ="15">
  </td>
  <td bgcolor = "309090" height = "15" width ="15" colspan = "2">
  </td>
 </tr>
</table>
<br>
<br>
<table border = "0" cellpadding = "10" cellspacing ="10">
 <tr> 
  <td height = "50" width ="50">
  </td>
  <td height = "50" width ="125">
  </td>
  <td height = "50" width ="0">
  </td>
  <td bgcolor = "702070" height = "50" width ="50">
  </td>
  <td bgcolor = "E07070" height = "50" width ="125">
  </td>
  <td width ="0" rowspan ="8">
  </td>
  <td height = "50" width ="50">
  </td>
  <td height = "50" width ="125">
  </td>
 </tr>
 <tr>
  <td bgcolor = "70D0D0" height = "50">
  </td>
  <td bgcolor = "707070">
  </td>
  <td>
  </td>
  <td bgcolor = "702070" rowspan = "5" valign = "top" align = "left">
   <font face = "arial" color = "#000000" size = "+3">F<br>U<br>N<br></font>
  </td>
  <td bgcolor = "E07070" rowspan = "5" valign = "top">
   <font face = "Courier New" size = "-1">
   <a href="http://www.logicmazes.com/theseus.html">Thesus and the Minotaur</a><br>
   <a href="http://www.mi.uib.no/~ingeke/anagram/index_eng.html">Anagram Generator</a><br>
   <a href="http://www.student.uwa.edu.au/~fractoid/javagames/slime2p.html">Slime Volleyball</a><br>
   <a href="http://www.vgmusic.com">Videogame Music</a><br>
   <a href="http://www.homestarrunner.com/sbemail.html">StrongBad Email</a><br>
   <a href="http://www.apple.com/trailers/">Movie Trailers</a><br>
   <a href="http://www.bridgebuilder-game.com">BridgeBuilder</a><br>
   <a href="http://www.shoutcast.com">ShoutCast</a><br>
   <a href="http://www.engrish.com">Engrish</a><br>
   <a href="http://www.jippii.com/games">jippii</a><br>
   <a href="http://maddox.xmission.com/">Maddox</a><br>
   <a href="http://hem.passagen.se/introl/buffy/">Liero</a><br>
   <a href="http://www.fark.com">Fark</a><br>
   </font>
  </td>
  <td>
  </td>
  <td>
  </td>
 </tr>
 <tr>
  <td bgcolor = "70D0D0" rowspan = "5" valign = "top">
   <font face = "arial" color = "#000000" size = "+3">U<Br>S<BR>E<BR>F<BR>U<BR>L</font>
  </td>
  <td valign = "top" colspan="1" rowspan = "5" bgcolor = "#707070">
   <font face = "Courier New" size = "-1">
   <a href="http://developer.netscape.com/docs/manuals/htmlguid/index.htm">HTML reference</a><br>
   <a href="http://www.x10.com/home/optout.cgi?DAY=30-&PAGE=http://www.yikes.com/~pengo/blocked.html">Block X-10 ads</a><br>
   <a href="http://www.sthomas.net/roberts-perl-tutorial.htm">Perl Tutorial</a><br>
   <a href="http://www.davidslife.com/funstuff/cards/index.htm">Card Throwing</a><br>
   <a href="http://www.cia.gov/cia/publications/factbook/index.html">CIA Factbook</a><br>
   <a href="http://www.m-w.com">Dictonary</a><br>
   <a href="crash.html">Crash IE</a><br>
   <a href="http://www.acroname.com">Acroname</a><br>
   <a href="http://www.digikey.com">Digikey</a><br>
   </font>
  </td>
  <td height = "50">
  </td>
  <td bgcolor = "F02020">
  </td>
  <td bgcolor = "F08020">
  </td>
 </tr> 
 <tr>
  <td height = "50">
  </td> 
  <td bgcolor = "F02020" rowspan = "5"valign = "top">
   <font face = "arial" color = "#000000" size = "+3">U<br>S<br>E<br>L<br>E<br>S<br>S<br></font>  </td>
  <td bgcolor = "F08020" rowspan = "5" valign = "top">
   <font face = "Courier New" size = "-1">
    <a href = "http://3.141592653589793238462643383279502884197169399375105820974944592.jp/">3.14159265358</a><br>
    <a href = "http://www.kleinbottle.com">Klein Bottles</a><br>
    <a href = "http://www.dhs.gov/dhspublic/display?theme=29">Threat Level</a><br>
    <a href = "http://www.andyvw.net">Andy's Page</a><br>
    <a href = "http://www.ucsc.edu">U.C.S.C.</a><br>
    <a href = "http://thcnet.net/error/index.php">Zork</a><br>
   </font>
 </td>
 </tr>
 <tr> 
  <td height = "50">
  </td>
 </tr>
 <tr> 
  <td height = "50">
  </td>
 </tr>
 <tr>
  <td height = "50">
  </td> 
  <td>
  </td>
  <td>
  </td>
 </tr>
 <tr>
  <td height = "50">
  </td>
  <td>
  </td>
  <td>
  </td> 
  <td>
  </td>
  <td>
  </td>
 </tr>
</table>
<table border = "0" cellpadding = "10" cellspacing ="10">
 <tr>
  <td height = "50" width = "60" bgcolor = "70C070">
  </td>
  <td bgcolor = "209020">
  </td>
 </tr>
 <tr>
  <td bgcolor = "70C070" valign = "top">
   <font face = "arial" color = "#000000" size = "+3">S<br>H<br>I<br>L<br>L<br>A<br>B<br>E<br>R<br></font>  </td>
  <td bgcolor = "209020" rowspan = "5" valign = "top">
   <font face = "Courier New" size = "-1">
<a href="http://www.123print.com" target="_blank">Business Cards</a><br />

<a href="http://www.giantpartystore.com" target="_blank">Party supplies</a><br />

<a href="http://www.gopromos.com" target="_blank">Promotional Products</a><br />

<a href="http://www.holidayclassics.com" target="_blank">Holiday Cards</a><br />

<a href="http://www.brookhollowcards.com" target="_blank">Holiday Greeting Cards</a> <br />

<a href="http://www.printablegreetingcardsonline.com" target="_blank">Printable Greeting Cards</a><br />

<a href="http://www.mailinglabelsonline.com" title="mailing labels" target="_blank">Mailing Labels</a><br />

<a href="http://www.NameBadgesPlus.com" title="name badges" target="_blank">Name Badges</a><br />

<a href="http://www.nameplatesplus.com" title="name plates" target="_blank">Name Plates</a><br />

<a href="http://www.letterheaddesignsonline.com" target="_blank">Letterhead Designs</a><br />

<a href="http://www.presentationfolderprintingonline.com" target="_blank">Presentation Folder Printing</a><br />

<a href="http://www.BrochurePrintingOnline.com" target="_blank">Brochure Printing</a><br />

<a href="http://www.letterheadPrintingOnline.com" target="_blank">Letterhead Printing</a> <br />

<a href="http://www.LabelPrintingOnline.com" target="_blank">Label Printing</a> <br />

<a href="http://www.qualitypostcardprinting.com" target="_blank">Postcard Printing</a><br />

<a href="http://www.EnvelopePrintingOnline.com" target="_blank">Envelope Printing</a><br />

<a href="http://www.MyCustomEnvelopes.com" target="_blank">Custom Envelopes</a><br />

<a href="http://www.AllAddressLabels.com" target="_blank">Address Labels</a><br />

<a href="http://www.ReceiptBooksOnline.com" target="_blank">Receipt Books</a><br />

<a href="http://www.CustomRubberStampsOnline.com" target="_blank">Custom Rubber Stamps</a><br />

<a href="http://www.rexcraft.com" target="_blank">Wedding Invitations</a><br />

<a href="http://www.uniquelyquince.com" target="_blank">Quinceanera Invitations</a>

 
   </font>
  </td>
 </tr>
</table>
</center>
$misties
</body>
</Html>
END_OF_PAGE

