<?php

$dir = opendir('./');
echo "<table>\n";
echo "<tr><th>Size</th><th>Href</th></tr>\n";
while ($f = readdir($dir)) {
  if ($f == 'index.php' or substr($f,0,1) == '.');
  else {
    if (is_dir($f)) {
      $f = $f.'/';
      $size = '';
    } else {
      $size = @filesize($f);
    }
    echo "<td align=right>$size</td><td><a href=\"", str_replace(' ','%20',$f), "\">$f</a></td></tr>\n";
  }
}
echo "</table>\n";

?>
