<?php
	require "../commonincludefiles.php";
   	$objBranch = new BranchMgmt();
	$i=0;
	$order_field=" branch_id ";
	$order_type=" ASC ";
	$limit="";
	$start="";
	$where="";
	$rs = $objBranch->getAllRecords($limit,$start,$where,$order_field,$order_type);
	$total = dbRows($rs);
	$BranchData = array("count" => $total, "data" => array());
	if(dbRows($rs) > 0){
		while($row = dbArray($rs)){
			$temparray["branch_id"]  = $row["branch_id"];
			$temparray["branch_name"]  = $row["branch_name"];
			$BranchData["data"][$i] = $temparray;   
			$i++;
		}
	}
	echo json_encode($BranchData);	
?>