<?php
	require "../commonincludefiles.php";
	if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"])){

			$start   = isset($_REQUEST['start'])  ? $_REQUEST['start']  :  0;
			$limit   = isset($_REQUEST['limit'])  ? $_REQUEST['limit']  : 30;
			$condition="";
			$total=0;
			
			$condition .= "AND employee_active='Yes' ";

			$condition.="AND employee_isteaching='Teaching Staff'";

			$objemployee_masterMgmt = new EmployeeMgmt();
			$result = $objemployee_masterMgmt ->getAllRecords1($limit,$start,$condition,"","");
			$total = dbRows($result);

			$arr = array();
			$i=0;
			$generalsearchData = array("count" => $total, "result" => array());
			
			if(dbRows($result) > 0){
				$temparray = array();
				while($row = dbArray($result)){
					$temparray["employee_id"] = $row["employee_id"];
					$temparray["employee_name"]  				= $row["employee_name"];
					$temparray["employee_workingperiods"]  	  = $row["employee_workingperiods"];
					$temparray["employee_shortname"]  	       = $row["employee_shortname"];
						$temparray["school_id"]  	       = $row["school_id"];
					$generalsearchData["result"][$i]	       = $temparray;   
					$i++;
				}										
			}	
			echo json_encode($generalsearchData);
		}	
?>