<?php 
require "../commonincludefiles.php";
if($_SESSION["cCompany_id"]!="" && isset($_SESSION["cCompany_id"]))
{
	$schoolid = $_SESSION["cCompany_id"];
	$objSection = new AccountMasterMgmt();
	$limit=0;
	$start=0;
	$condition="";
	
	$order_type="ASC";
	$result = $objSection->getAllRecords(0,0,$condition,"",$order_type) ;
	$total = dbRows($result);
	$i=0;
	$sectionData = array("count" => $total, "rows" => array());
	if	(dbRows($result) > 0) 
		   {
				$temparray = array();
				while($row = dbArray($result)){
					
					$temparray["account_name"]   = $row["account_name"];
					$temparray["account_id"]   = $row["account_id"];
					$sectionData["rows"][$i] = $temparray;   
				    $i++;
			}										
	}				   		 
 	echo json_encode($sectionData);	
}
?>