<?
  include "include/CEVENT.php";
?>
<?
  $arrStaff = getTeaList();
  $arrEvent = getEventList();
  if($remarkDate!=""){
    $remarkDate = $_GET["pdte"];
  }else{
    $remarkDate = $pdate;
  }
?>
<?
  $query = "SELECT * FROM xoops_pc_remarkrecord WHERE remarkDate='$remarkDate'";
  $result = mysql_query($query);
  $num = mysql_num_rows($result);
  $i=0;
  while($i<$num){
  
    $tid = mysql_result($result,$i,"id");
	$tstaffId = mysql_result($result,$i,"staffId");
	$teventId = mysql_result($result,$i,"eventId");
	$tnotice = mysql_result($result,$i,"notice");
  
    $arrRmk[$tid]["staffId"] = $tstaffId;
    $arrRmk[$tid]["eventId"] = $teventId;
	$arrRmk[$tid]["notice"] = $tnotice;
	
    $i++;
  }
?>
<table width="100%" border="1" bordercolor="#FFFFFF">
<form action="rmkdeltsk2_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="pdte" value="<?= $_GET["pdte"] ?>" />
<tr>
  <th style="width:25px">&nbsp;</th>
  <th style="width:25px">&nbsp;</th>
  <th>NAME</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><?= substr($arrStaff[$trmk["staffId"]]["ename"],0,30) ?></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>