<?php
require "../commonincludefiles.php";

if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
{	

 	$employeename		   = 	Escape($_REQUEST['employeename']);
	$school_id		      = 	$_SESSION["VedantnrCollegeId"];
	$employee_id		    = 	Escape($_REQUEST['employee_id']);

 if(($employeename !="" ) && ($_SESSION["VedantnrCollegeId"])!="" && ($employee_id)!="")
 {
	
	$condition="";
	
	if($school_id != ""){
		$condition .= " and school_id='$school_id' ";
	}

	if($employeename != ""){
		$condition .= " and employee_shortname='$employeename' ";
	}
	
	if($employee_id != ""){
		$condition .= " and employee_id !='$employee_id' ";
	}
				
				
	 $objemployee_masterMgmt = new EmployeeMgmt();
	 $result = $objemployee_masterMgmt ->getAllRecords1(0,0,$condition,"","");
	 $total = dbRows($result);			
	
	 if($total > 0){ echo "{success:'false'}"; }
     else { echo "{success:'true'}";}
 }
 else { echo "{success:'false'}"; }
}
?>