<html>
<head>
<title>WA6CGR 2004 10 GHz and Up Contest Pictures</title>
</head>
<body bgcolor=#ffffff>
<center>
<h1>WA6CGR 2004 10 GHz and Up Contest Pictures</h1>
<?php
   $wide = 5;
   $wt = 150;
   $ht = 150;
   $dr = $_SERVER["DOCUMENT_ROOT"];

   $i = -1;
   $dir1 = scandir(".");
   $wc = $wt + 5;
   $hc = $ht + 5;

   echo "<table>\n";
   echo "<colgroup width=$wc>\n";
   echo "<thead>\n";
   echo "<tr height=$hc>\n";

   foreach($dir1 as $file) {
	if (is_dir("$file") && "$file" != "." && "$file" != "..") {
	    echo "<td width=$wc align=center><a href=";
	    echo '"';
	    echo rawurlencode($file);
	    echo '"';
	    echo "><img src=/icons/dir.png border=0></a>\n";
	    echo "<p>$file</p></td>\n";
	    ++$i;
	    if (($i % $wide) == ($wide - 1)) echo "</tr><tr height=$hc>\n";
	    
	} elseif (preg_match("/(.*)\.jpe?g$/i", "$file", $matches) ||
	          preg_match("/(.*)\.png$/i", "$file", $matches) ||
	          preg_match("/(.*)\.gif$/i", "$file", $matches)) {
	    echo "<td width=$wc align=center><a href=";
	    echo '"';
	    echo rawurlencode($file);
	    echo '"';
	    echo "><img src=\"thumbnail.php?";
	    echo rawurlencode($file);
	    echo "\" border=0></a>\n";
	    if (file_exists("$matches[1].txt")) {
		echo "<p>";
		print file_get_contents("$matches[1].txt");
		echo "</p>\n";
	    }
	    echo "</td>\n";
	    ++$i;
	    if (($i % $wide) == ($wide - 1)) echo "</tr><tr height=$hc>\n";
	}
   }
?>
</tr>
</table>
</center>
</body>
</html>
