<style>
  .mytable{
    font-size:16px;
	width:700px;
	margin-top:10px;
	color:#000000;
  }
  
  .mytableth{
    background-color:#000000;
	color:#FFCC00;
	padding:5px 5px 5px 5px;
  }
  
  .mybtn{
    width:100px;
	font-size:14px;
	font-weight: bold;
	font-family: Arial;
  }
    
  .mytext{
    text-align: center;
    padding: 3px;
  }
</style>
<?
  $teaid = $_GET["teaid"];
  $pdate = $_GET["pdate"];
?>
<?
  $qtea = "SELECT * FROM punchsys_staff WHERE id='$teaid'";
  $rtea = mysqli_query($conn,$qtea);
  $ntea = mysqli_num_rows($rtea);
  $i=0;
  while($myrow = mysqli_fetch_array($rtea)){
  
    $id = $myrow["id"];
    $ename = $myrow["eName"];
	if( strlen($ename)>20 ){
	  $ename = substr($ename,0,19) . "...";
	}
    $cname = $myrow["cName"];
  
    $teaName = $cname . " " . $ename;
  
    $i++;
  }
?>
<?
  $qevent = "SELECT * FROM punchsys_remarkevent";
  $revent = mysqli_query($conn,$qevent);
  $nevent = mysqli_num_rows($revent);
  $i=0;
  while($myrow = mysqli_fetch_array($revent)){
  
    $id = $myrow["id"];
	$event = $myrow["event"];
	$arrEvent[$id] = $event;
  
    $i++;
  }
?>

<center>
<form action="rmktsksav2.php" method="post">
<table border="0" cellpadding="0" cellspacing="1" class="mytable">
<tr>
  <th colspan="2" class="mytableth">ADD REMARK</th>
</tr>
<tr>
<?
  //------ teacher id part -----------------
?>
  <td class="mytableth">STAFF</td>
  <td style="padding-left: 10px; background-color: #CCCCCC;"><?= $teaName ?></td>
</tr>
<input type="hidden" name="teaid" value="<?= $teaid ?>" />
<?
  //------ date part -------------------------
?>
<tr>
  <td class="mytableth">DATE </td>
  <td style="padding-left: 10px; background-color: #CCCCCC;">
	<input type="date" id="txtDatefrom" name="txtDatefrom" size="9" value="<?= $pdate ?>">
	~ 
	<input type="date" id="txtDatetil" name="txtDatetil" size="9" value="<?= $pdate ?>">
  </td>
</tr>
<?
  //------ event part -------------------------
?>
<tr>
  <td class="mytableth">EVENT</td>
  <td style="padding-left: 10px; background-color: #CCCCCC;">
    <select name="eventid">
<?
  foreach($arrEvent as $id=>$event){
    echo "<option value='$id'>$event</option>";
  }
?>
    </select>
  </td>
</tr>
<?
  //------ desc part -------------------------
?>
<tr>
  <td class="mytableth">DESCRIPTION</td>
  <td style="padding-left: 10px; background-color: #CCCCCC;">
    <textarea name="notice" rows="3" cols="30"></textarea>
  </td>
</tr>
<?
  //------ submit part -------------------------
?>
<input type="hidden" name="apvdate" value="<?= $today_date ?>" />
<tr>
  <td align="center" colspan="2"  class="mytableth">
    <input type="submit" value="SUBMIT" class="mybtn" style="color: #0000FF">
  </td>
</tr>
</table>
</form>
</center>