diff -u -r karmapools.orig/view.pool.php karmapools/view.pool.php --- karmapools.orig/view.pool.php 2004-09-11 11:48:21.996697000 -0500 +++ karmapools/view.pool.php 2004-09-11 12:56:25.683882584 -0500 @@ -26,6 +26,22 @@ $cur_date = date('Y-m-d 01:00:00'); $cur_ts = strtotime($cur_date); $pool_desc = stripslashes($info_ar['pool_desc']); + +$first_day = date('l',$start_ts); +$first_mon = date('F',$start_ts); +$first_year = date('Y',$start_ts); +$last_year = $first_year; +$last_month = $first_mon; +$day_header = array("Monday","Tuesday","Wednesday","Thursday","Friday", + "Saturday","Sunday"); +// fix the calendar so that Monday is the first day +$pad_cells = 0; +for($j=0; $j < count($day_header); $j++) { + if ("$day_header[$j]" == "$first_day") { + $pad_cells = $j; + break; + } + } pageHeader(true,$title); tableOpen(true,array('width'=>'100%')); ?>