<?php
include ("../../include/session.php");
include ("../../include/db.php");
if(!$session->isAdmin() && !$session->isRadstoneReceptionUser()){
	header("Location: ../../employeeMenu.php");
} else {
	$id = mysql_real_escape_string($_POST['id']);
	$comments = mysql_real_escape_string($_POST['comments']);
	$type = mysql_real_escape_string($_POST['type']);
	$empId = mysql_real_escape_string($_POST['empId']);
//	echo $type;
	if($type == "remark"){
		$q = "UPDATE minorviolations SET VioDetails = '$comments' WHERE vioId = '$id'";
		$r = execsql($q);
		header("Location: ../searchAndDisplayE.php?empId=$empId&type=discipline");
	}elseif($type == "timekeeping"){
		$q = "UPDATE timekeeping SET details = '$comments' WHERE timeId = '$id'";
		$r = execsql($q);
		header("Location: ../searchAndDisplayE.php?empId=$empId&type=discipline");
	}


}