<?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";
	$arr = array();
	$total = 0;
 
 	$objVendorMgmt = new VendorMgmt();		
		
	$rs = $objVendorMgmt->getAllRecords($limit,$start,$where,$order_field,$order_type);
	
	$total = $objVendorMgmt->getCountRecords(0,0,$where,"","");
		$AccountMasterMgmt = new AccountMasterMgmt();	
	$i=0;
	if($total > 0) {
		$temparray = array();
	 	 while($row = dbArray($rs)){
			
				$temparray["vendor_id"]   	  	 = $row["vendor_id"];
				$temparray["vendor_orgname"]	 = $row["vendor_orgname"];				
				$griddata[$i] = $temparray;   
				$i++;
			}		
	}
		echo '{"total":"'.$total.'","data":'.json_encode($griddata).'}';
?>