<?php 
require "../commonincludefiles.php";
if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
{	
	$objallowancesMgmt = new allowancesMgmt();
	$limit=0;
	$start=0;
	$condition="";
	$order_field="allowances_id";
	$order_type="ASC";
	$result = $objallowancesMgmt->getAllRecords(0,0,$condition,$order_field,$order_type) ;
	$total = dbRows($result);
	$i=0;
	$allowancesData = array("count" => $total, "rowa" => array());
	if	(dbRows($result) > 0) 
	{
				$temparray = array();
				while($row = dbArray($result)){				
					$temparray["allowances_id"]  		= $row["allowances_id"];
					$temparray["allowances_name"]   	= $row["allowances_name"];
					$temparray["allowances_percentage"] = $row["allowances_percentage"];
					$temparray["allowances_value"]   	= $row["allowances_value"];					
					$allowancesData["rowa"][$i] 		= $temparray;   
				$i++;
			}										
	}				   		 
 	echo json_encode($allowancesData);	
}
?>