<?php
include ("../include/session.php");
if(!$session->isAdmin() && !$session->isRadstoneReceptionUser() ){
	header("Location: ../HR/employeeMenu.php");
} else {
	include ("../storeHeader.php");
	$id = mysql_real_escape_string($_GET['id']);
	$empId = mysql_real_escape_string($_GET['empId']);
	$type = mysql_real_escape_string($_GET['type']);
//	$q = "SELECT details FROM timekeeping WHERE timeId = '$id'";
	if($type == "remark"){
		$q = "SELECT VioDetails FROM minorviolations WHERE vioId = '$id'";
		$r = execsql($q);
		$text = mysql_result($r, 0, "vioDetails");
	}elseif($type== "timekeeping"){
		$q = "SELECT details FROM timekeeping WHERE timeId = '$id'";
		$r = execsql($q);
		$text = mysql_result($r, 0, "details");
	}

	
	?>
<h3>Edit Comment</h3>
<form action="manipulate/editComments.php" method="POST">
<input type="hidden" name="id" value="<?php echo $id?>" />
<input type="hidden" name="empId" value="<?php echo $empId?>" />
<input type="hidden" name="type" value="<?php echo $type?>" />

<table>
	<td>Comment</td>
	<td><textarea name="comments" cols="40" rows="6"><?php echo $text?></textarea></td>
</table>
<input type="submit" name="submitok" value="Save" /></form>






	<?php }?>