<?php
 require "../commonincludefiles.php";
 if($_SESSION["cCompany_id"]!="" && isset($_SESSION["cCompany_id"]))
 {
		
	$condition="";
	$arr = array();
    $total = 0;	

		$objEmployeeMgmt = new EmployeeMgmt();	
		$result = $objEmployeeMgmt -> getAllRecords(0,0,$condition,"","");
		$total = dbRows($result);
		
		$i=0;
		$employeeData = array("count" => $total, "employee" => array());
		
		if	(dbRows($result) > 0) {
				$temparray = array();
				while($row = dbArray($result)){
					$temparray["employee_name"]  = $row["employee_name"];
					$temparray["employee_id"]   = $row["employee_id"];
					$employeeData["employee"][$i] = $temparray;   
					$i++;
				}										
	}				   		 
	 echo json_encode($employeeData);				

}
	
?>