<?php 
/**
 * This is general file which contains
 * connection file, common function file, etc.,
 *
 * PHP version 5
 *
 * @category Admin_Tool
 * @package  Admin_Tool
 * @author   Aum Infosys <admin@auminfosys.com>
 * @license  ACE
 * @version  CVS:1.0.1
 * @link     http://auminfosys.com/
 * @filesource
 */
 
/**
 * This is general file which contains
 * connection file, common function file, etc.,
 *
 */
	require "../commonincludefiles.php";

	if($_SESSION["cCompany_id"]!="" && isset($_SESSION["cCompany_id"])){	
		$objProductMgmt = new ProductMgmt();	
		
		$result = $objProductMgmt->getDistinctMeasurement();
		$total = dbRows($result);
		$i=0;
		
		$GroupData = array("count" => $total, "rows1" => array());
		if(dbRows($result) > 0){
			$temparray = array();
			while($row = dbArray($result)){
				$temparray["measurement"]   = $row["product_measurement"];
				$GroupData["rows1"][$i] = $temparray;   
				$i++;
			}										
		}				   		 
		echo json_encode($GroupData);
	}
?>