<?
  include "include/CEVENT.php";
?>
<?
  $arrEvent = getEventList();
  $teaid = $_GET["teaid"];
  $mth = $_GET["mth"];
?>
<?
  $query = "SELECT * FROM xoops_pc_remarkrecord WHERE staffId='$teaid' AND MONTH(remarkDate)='$mth' AND YEAR(remarkDate)='$yr'";
  $result = mysql_query($query);
  $num = mysql_num_rows($result);
  $i=0;
  while($i<$num){
  
    $tid = mysql_result($result,$i,"id");
	$tremarkDate = mysql_result($result,$i,"remarkDate");
	$teventId = mysql_result($result,$i,"eventId");
	$tnotice = mysql_result($result,$i,"notice");
  
    $arrRmk[$tid]["remarkDate"] = $tremarkDate;
    $arrRmk[$tid]["eventId"] = $teventId;
	$arrRmk[$tid]["notice"] = $tnotice;
	
    $i++;
  }
?>
<table width="100%" border="1" bordercolor="#FFFFFF">
<form action="rmkdeltsk1_del.php" method="post">
<input type="hidden" name="pg" value="<?= $_GET["pg"] ?>" />
<input type="hidden" name="ac" value="<?= $_GET["ac"] ?>" />
<input type="hidden" name="op" value="<?= $_GET["op"] ?>" />
<input type="hidden" name="teaid" value="<?= $_GET["teaid"] ?>" />
<input type="hidden" name="mth" value="<?= $_GET["mth"] ?>" />
<input type="hidden" name="yr" value="<?= $_GET["yr"] ?>" />
<tr>
  <th style="width:25px">&nbsp;</th>
  <th style="width:25px">&nbsp;</th>
  <th style="width:80px">DATE</th>
  <th>EVENT</th>
  <th>NOTICE</th>
</tr>
<?
$i=1;
foreach($arrRmk as $tid=>$trmk){
  $nmeRmkId = "rmkId[$tid]";
?>
<tr style="font-size:12px">
  <td><input type="checkbox" name="<?= $nmeRmkId ?>" value="<?= $tid ?>" /></td>
  <td><?= $i ?></td>
  <td><?= $trmk["remarkDate"] ?></td>
  <td><?= $arrEvent[$trmk["eventId"]]["event"] ?></td>
  <td><?= $trmk["notice"] ?></td>
</tr>
<?
  $i++;
}
?>
<tr>
  <th colspan="5" style="background-color:#999999">
  <input type="submit" value="DELETE" />
  </th>
</tr>
</form>
</table>