#!/usr/bin/perl -wT

my $http_host = $ENV{'HTTP_HOST'};

use strict;
print "Content-type: text/html\n\n";
print <<END_OF_PAGE;
<HTML>
<HEAD>
<TITLE> </TITLE>
</HEAD>
<SCRIPT language="JavaScript">  
<!--

var stars = new Array(9);

function ch(that)
{
  if (document.all) 
  {
    for(i=0;i<=that;i++)
    {
      stars[i] = "E0E000";
    }
    for(i=9;i>that;i--)
    {
      stars[i] = "#606060";
    }
    s0.style.color = stars[0];
    s1.style.color = stars[1];
    s2.style.color = stars[2];
    s3.style.color = stars[3];
    s4.style.color = stars[4];
    s5.style.color = stars[5];
    s6.style.color = stars[6];
    s7.style.color = stars[7];
    s8.style.color = stars[8];
    s9.style.color = stars[9];
  }
}
//-->
</SCRIPT>
<body bgcolor = "000000" text =#808080>
THIS PAGE UNDER CONSTRUCTION :)<BR>
So that one day it may serve a purpose!<br>
<BR>
<center>
END_OF_PAGE


opendir (DH, "./");
readdir(DH);
readdir(DH);

my $request_uri = $ENV{'REQUEST_URI'};
my $address;
my $thumbnail;
my $i;
my $rating;

while (defined($address = readdir(DH))) {	
    if($address =~ /(\.jpg|\.gif)/){
	$rating = substr($address,0,1);
        print "<a href = \"http://$http_host/~pengo/cgi-bin/imgloader.cgi?$request_uri&$address\" onMouseover=\"ch('$rating')\" onMouseout=\"ch('-1')\">";
	print "<img border = \"0\" height = \"93\" width = \"65\" src = \"$address\" ></a>\n";
    }
}
print <<END_OF_PAGE;
<br>
<br>
<br>
<b><font color = "50A0A0" size = "+2">My Rating: </font></b>
<font face = "Wingdings" size = "+3">
<table>
 <tr>
  <td>
   <div id="s0">
    <font size = "+3">&#0171;</font>
   </div>
  </td>
  <td>
   <div id="s1">
    <font size = "+3">&#0171;</font>
   </div>
  </td>
  <td>
   <div id="s2">
    <font size = "+3">&#0171;</font>
   </div>
  </td>
  <td>
   <div id="s3">
    <font size = "+3">&#0171;</font>
   </div>
  </td>
  <td>
   <div id="s4">
    <font size = "+3">&#0171;</font>
   </div>
  </td>
  <td>
   <div id="s5">
    <font size = "+3">&#0171;</font>
   </div>
  </td>
  <td>
   <div id="s6">
    <font size = "+3">&#0171;</font>
   </div>
  </td>
  <td>
   <div id="s7">
    <font size = "+3">&#0171;</font>
   </div>
  </td>
  <td>
   <div id="s8">
    <font size = "+3">&#0171;</font>
   </div>
  </td>
  <td>
   <div id="s9">
    <font size = "+3">&#0171;</font>
   </div>
  </td>
 </tr>
</table>
</font>
</center>
</body>
</HTML>
END_OF_PAGE

closedir(DH);
