Make your own free website on Tripod.com
7) && ($month % 2 == 0)) ) // $days = 31; // if ( (($month < 8) && ($month % 2 == 0)) || (($month > 7) && ($month % 2 == 1)) ) // $days = 30; // if ($month == 2) // $days = (date("L",time())) ? 29 : 28; $days = date("t",mktime(1,1,1,$month,1,$year)); $dayone = date("w",mktime(1,1,1,$month,1,$year)); $daylast = date("w",mktime(1,1,1,$month,$days,$year)); $dayarray = array("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); ?> $dayarray[$i]\n"; //echo " \n"; endfor; echo "\n"; //done printing the top row of days $span1 = $dayone; $span2 = 6 - $daylast; for($i = 1; $i <= $days; $i++): $dayofweek = date("w",mktime(1,1,1,$month,$i,$year)); $width = ($dayofweek == 0 || $dayofweek == 6) ? "15%" : "14%"; //sets the col width switch ($i): case $today: //sets background color for today $fontcolor = $todayfontcolor; $bgcellcolor = $todaybgcolor; break; default: //sets background color for other days $fontcolor = $defaultfontcolor; $bgcellcolor = $defaultbgcolor; break; endswitch; // if($i == putdayhere): #use this for *special* days of the month, can be set ahead as well w/ &&... // $fontcolor = puthexcolorhere; // $bgcellcolor = puthexcolorhere; // endif; if($i == 1 || $dayofweek == 0): echo " \n"; if($span1 > 0 && $i == 1) echo " \n"; endif; //use the css (default) or the html version (commented out) underneath if you want full compatibility echo " \n"; //echo " \n"; if($i == $days && $span2 > 0) echo " \n"; if($dayofweek == 6 || $i == $days) echo " \n"; endfor; echo "
$i
 $i$i 
\n"; ?>