<?

include('library.php');

$override = true;

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title>W.Simpson, Weblog</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>

<body>

<a name="weblog"></a><img src="header_weblog.jpg" alt="weblog">

<table border="0" cellpadding="12" cellspacing="4">
<tr><td>

<?

if ( $handle = opendir('./weblogfiles') ) {

 while ( false != ( $file = readdir($handle) ) ) {
  if ( $file != "" & strlen($file) > 2 ) $logs[] = substr($file,0,strlen($file)-4);
 }
 closedir($handle);

 sort($logs);
 $logs = array_reverse($logs);
 
 $maxentries = count($logs);
 
 for ( $i = 0; $i < $maxentries; $i++ ) {
  if ( isset($logs[$i]) ) {
   $year = substr($logs[$i],0,2);
   $month = substr($logs[$i],2,2);
   $day = substr($logs[$i],4,2);
   echo("$day / $month / 20$year");
   include('./weblogfiles/'.$logs[$i].'.php');
   echo("<hr>");
  }
 }

}

?>

</td></tr>
</table>

</body>
</html>
