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

		$objEmployeeMgmt = new EmployeeMgmt();
		
		
		$result		= $objEmployeeMgmt->employeeGridFilter($limit,$start,$where,$order_field,$order_type);
		$total  = $objEmployeeMgmt->employeeGridFilterCount(0,0,$where,"","");;
		
		
		    
			$i=0;
		    $employeeData = array("count" => $total, "employee" => array());
			
			if	(dbRows($result) > 0) {
					$temparray = array();
					while($row = dbArray($result)){
						$temparray["employee_id"]   = $row["employee_id"];
						$temparray["employee_name"]  = $row["employee_name"];
						$employeeData["employee"][$i] = $temparray;   
         				$i++;
					}										
		}				   		 
		 echo json_encode($employeeData);	
	}
?>