<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Octoberfest 2004</title>

<style>
<!-- 
P, h1, h2, h3 {
	margin-left :   70px;
	margin-right : 70px ;
} 
h1.norm, h3.norm, P.norm {	margin-left :    0px;
	margin-right :  0px ;
}
 LI {
	list-style-type : disk ;
}
UL {
	margin-left :   90px;
	margin-right : 70px ;
} 
-->
</style>
 
</head>

<?php

function result_posted($fnam, $dat){
// Test whether file is newer than a date
// args  are a filename and a date string like "30 Jan 2002 9:00"  Local time
// don't forget the year.  If no year, it returns -1 
//  return TRUE ; // for testing
	if(!file_exists($fnam)) return FALSE ;
	$filetime = filectime($fnam) ;  // get file time stamp
	$testtime = strtotime($dat) ;   // convert test date to timestamp
//  return TRUE ; // for testing
	if($filetime > $testtime) return TRUE ;  // is file newer than test date? 
		else return FALSE ;
}

function updated($fnam){
	if(!file_exists($fnam)) return FALSE ;
	$filetime = filectime($fnam) ; // file time stamp
	return date("F  j, Y", $filetime) ;
	}
?>
</head>
<?php
$n = result_posted("nooct.html", "2 October 2004 13:00") ;
$mp = result_posted("main.html", "2 October 2004 13:00") ;
$gp = result_posted("green.html", "2 October 2004 13:00") ;
$op = result_posted("opti.html", "2 October 2004 13:00") ;
$m = result_posted("main.html", "3 October 2004 13:00") ;
$g = result_posted("green.html", "3 October 2004 13:00") ;
$o = result_posted("opti.html", "3 October 2004 13:00") ;
$posted = $mp || $gp ||$op ;
$finished = $m && $g && $o ;
if($posted){
	echo '
<BODY TEXT="#000066" BGCOLOR="#EEEEEE" LINK="#0000FF" VLINK="#F00003" ALINK="#FF3300">
<p class="norm"><IMG SRC="../graphix/burgee1.gif" HEIGHT=61 WIDTH=106 ALIGN=RIGHT> <IMG SRC="../graphix/burgee1.gif" HEIGHT=61 WIDTH=106 ALIGN=LEFT>
</p>

 

<div align="center">
<h1>Octoberfest</h1>
<p>Corinthian Yacht Club of Seattle and Sail Sand Point<br> ' ;
	if(!$finished) echo '
	October 2, 2004 </p></div>
	<div align="center"><h2> First day results results</h2></div>
	' ;
	else echo '
	October 2-3, 2004 </p></div>
	<div align="center"><h2> Final results</h2></div>
	' ;
	echo '<ul>';
	if($mp) echo '<li> <a href="main.html">All but Optimists</a> </li>' ;
	if($op) echo '<li> <a href="opti.html">Optimists</a> </li>' ;
	if($gp) echo '<li> <a href="green.html">Opti- Green (Novice)</a> </li>' ;
	echo '</ul>' ;
	if(!$finished){
		$start = FALSE ;
		echo '<p>' ;
		if(!$mp){ echo ' non-Optimist ';
			 $start = TRUE ;
			 }
		if($start) echo ' and ' ;
		if(!$op){ echo ' Optimist ';
			 $start = TRUE ;
			 }
		if($start) echo ' and ' ;
		if(!$gp) echo ' Opti-Green (Novice) ' ;
		echo ' will be posted shortly </p>' ;	
	}
}	
 else if($n) {
 	 include "nooct.html" ;
	}
	else{
    include "octnor.html" ;
 }
?>
  </body></html>
