<?php require "../commonincludefiles.php"; 
error_reporting(1);?>
<?php
if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"])) {
	$employee_id = Escape($_REQUEST['employee_id']);
	$year = Escape($_REQUEST['year']);
	$month = Escape($_REQUEST['month']);
	$condition="";
	
	if($employee_id != "" && $employee_id != 0){
		$condition .= " and em.employee_salaryno = '$employee_id' ";
	}
	
	$objEmployeeMgmt = new EmployeeMgmt();	
	$out = $objEmployeeMgmt -> getAllRecords(0,0,$condition,"","");
	
	$count=dbRows($out);
	if	(dbRows($out)== 1)
	{
		while($row = dbArray($out)){
			$joindate  		= $row["employee_schooljoindate"];
		}
		$joinyear  		= substr($joindate,0,4);
		$joinmonth  		= substr($joindate,5,2);
		if($joinyear > $year )
			echo "{success:true}";
		if($joinyear == $year)
		{
			if($joinmonth <= $month)
			{
				echo "{success:false}";
			}
			else {
				echo "{success:true}";
			}
		}
		if($joinyear < $year)
		{
				echo "{success:false}";
		}
	}
}
else
{
	echo "Session Expired.";
}
?>