<?php
	require "../commonincludefiles.php";
	$where = '';	
 	$school_id	=	$_SESSION["VedantnrCollegeId"];
	$objEmployeeMgmt = new EmployeeMgmt();
	$arr = array();
	$k=0;
	$i=0;
	if($_REQUEST['section']!=""){
		
		$where.= " and em.branch_name = '".Escape($_REQUEST['section'])."'";
	}
	$where .= "and em.employee_active='Yes'";
	$rs = $objEmployeeMgmt->getAllRecords($limit,$start,$where,$order_field,$order_type);
	$total = dbRows($rs);
	$EmpData = array("count" => $total, "data" => array());
	if($total > 0){
		while($row = dbArray($rs)){
		
			$temparray["employee_id"]  					= $row["employee_id"];    	
			$temparray["employee_name"]  				= ucwords($row["employee_name"]); 	
			$temparray["branch_name"]  					= $row["branch_name"]; 	
			$temparray["BranchName"]  					= ($row["BranchName"]==""?$row["branch_name"]:$row["BranchName"]); 	
			$temparray["employee_designation"]  		= $row["employee_designation"]; 	
			$temparray["employee_isteaching"]  			= $row["employee_isteaching"]; 	
			$temparray["employee_mobile"]  				= $row["employee_phone"]; 	
			$EmpData["data"][$i] = $temparray;   
			$i++;
		}
	}
	echo json_encode($EmpData);	
?>
