<center>TITLE REPORT</center>
<hr width="720">
<center>
<?
  $myArrDate = getDateBtw($datefrom,$datetil);
  foreach($myArrDate as $key=>$mydate){
  
    $myweek = getWeek($mydate);
?>
<table width="720">
  <tr>
    <td align="center">DATE : <?= $mydate . " " . $myweek ?></td>
  </tr>
</table>
<table width="720" border="1" style="border-collapse:collapse; font-family:Arial; font-size:12px ">
  <tr>
    <th width="170" >NAME</th>
    <th width="85">PUNCH IN</th>
    <th width="85">COME LATE</th>
    <th width="85">PUNCH OUT</th>
    <th width="85">LEAVE EARLY</th>
    <th>NOTE</th>
  </tr>
<?
  $i=0;
  foreach($arrTea as $teaid=>$teaname){
    if( strlen($teaname)>15 ){
	  $teaname = substr($teaname,0,14) . "...";
	}
	
	$punchin = $arrPunchIn[$teaid][$mydate];
	$comLate = $arrComeLate[$teaid][$mydate];
	$punchout = $arrPunchOut[$teaid][$mydate];
	$levEarly = $arrLevEarly[$teaid][$mydate];
	$mynote = $arrNote[$staffId][$punchDate];
	
    $myhol = chkPubHol($mydate);

  
    if( getWeek($mydate)=="Sun" || $myhol!="" ){
	  if($myhol!=""){
	    $mynote=$myhol;
	  }else{
	    if( getWeek($mydate)=="Sun" ){
		  $mynote = "SUNDAY";
		}
	  }
	  $colors="style='color:#999999'";
	}else{
	  $colors="";
	}
?>
  <tr align="center" >
    <td align="left">(<?= $teaid ?>) - <?= $teaname ?></td>
	<td><?= $punchin ?></td>
	<td><?= $comLate ?></td>
	<td><?= $punchout ?></td>
	<td><?= $levEarly ?></td>
	<td><?= $mynote ?></td>
  </tr>
<?
  }
?>
</table>
<?
  if($_POST["radPgbrk"]=="y"){
    echo "<p style='page-break-after:always'></p>";
  }
?>
<?
  }
?>
</center>