function caldraw($cat,$days,$start,$zip,$shift){
$today=strtotime('today',time());
echo '<DIV class="calcatheader">'.$cat.'</div><table width="100%" border="0" cellspacing="0" bgcolor="white" cellpadding="0">
<tr>';
for($i=0;$i<$days;$i++){
if($today==strtotime("+$i day last monday",time())){
$color = '#FF0000;';
$fcolor = '#FFFFFF';
}
else
{
$color = '';
$fcolor = '';
}
echo
'<td ><div style="background-color:'.$color.';color:'.$fcolor.';text-align:center; font-size:1em;font-weight:bold; border-right-width: 1px;border-bottom-width: 1px;border-right-style: solid;border-bottom-style:solid;border-right-color:#000000;">'.date('D dS',strtotime("+$i day last monday",time() )).
'</div><DIV style="background-color:'.$color.';color:'.$fcolor.';font-size:.9em;padding-left:3px">aaaa'.$this->getevents().'</DIV></td>';
}
echo '</tr>
<tr>';
for($i=0;$i<$days;$i++){
if($today==strtotime("+$i day last monday",time())){
$color = '#FF0000;';
$fcolor = '#FFFFFF';
}
else
{
$color = '';
$fcolor = '';
}
echo
'<td ><DIV style="background-color:'.$color.';color:'.$fcolor.';font-size:.9em;padding-left:3px">'.$this->getevents().'?????</DIV></td>';
}
echo '</tr></table><BR>';
}
function getevents(){
echo '11';
}
}
for some reasion the getevents() call does NOT obey the flow of the code.
the "11s" are all up out of flow...
<div class="calcatheader">SCHOOLS</div>1111111111111111111111111111
<table bgcolor="white" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr><td><div style="border-right: 1px solid rgb(0, 0, 0); text-align: center; font-size: 1em; font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid;">Mon 14th</div><div style="font-size: 0.9em; padding-left: 3px;">aaaa</div></td><td><div style="border-right: 1px solid rgb(0, 0, 0); text-align: center; font-size: 1em; font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid;">Tue 15th</div><div style="font-size: 0.9em; padding-left: 3px;">aaaa</div></td><td><div style="border-right: 1px solid rgb(0, 0, 0); text-align: center; font-size: 1em; font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid;">Wed 16th</div><div style="font-size: 0.9em; padding-left: 3px;">aaaa</div></td><td><div style="border-right: 1px solid rgb(0, 0, 0); text-align: center; font-size: 1em; font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid;">Thu 17th</div><div style="font-size: 0.9em; padding-left: 3px;">aaaa</div></td><td><div style="border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 0, 0); color: rgb(255, 255, 255); text-align: center; font-size: 1em; font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid;">Fri 18th</div><div style="background-color: rgb(255, 0, 0); color: rgb(255, 255, 255); font-size: 0.9em; padding-left: 3px;">aaaa</div></td><td><div style="border-right: 1px solid rgb(0, 0, 0); text-align: center; font-size: 1em; font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid;">Sat 19th</div><div style="font-size: 0.9em; padding-left: 3px;">aaaa</div></td><td><div style="border-right: 1px solid rgb(0, 0, 0); text-align: center; font-size: 1em; font-weight: bold; border-bottom-width: 1px; border-bottom-style: solid;">Sun 20th</div><div style="font-size: 0.9em; padding-left: 3px;">aaaa</div></td></tr>
<tr><td><div style="font-size: 0.9em; padding-left: 3px;">?????</div></td><td><div style="font-size: 0.9em; padding-left: 3px;">?????</div></td><td><div style="font-size: 0.9em; padding-left: 3px;">?????</div></td><td><div style="font-size: 0.9em; padding-left: 3px;">?????</div></td><td><div style="background-color: rgb(255, 0, 0); color: rgb(255, 255, 255); font-size: 0.9em; padding-left: 3px;">?????</div></td><td><div style="font-size: 0.9em; padding-left: 3px;">?????</div></td><td><div style="font-size: 0.9em; padding-left: 3px;">?????</div></td></tr></tbody></table><br><div class="calcatheader">GOVERNMENT</div>1111111111111111111111111111<table bgcolor="white" border="0" cellpadding="0" cellspacing="0" width="100%">
I'm stumped