<?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";

 $vendorname	= 	Escape($_REQUEST['vendorname']);
 $vendor_id	 = 	Escape($_REQUEST['vendorid']);
 
 if($vendorname !="")
 {

	$condition="";
	
	if($vendorname != ""){
		$condition .= " and lv.vendor_orgname='$vendorname' ";
	}
	
	if($vendor_id != ""){
		$condition .= " and lv.vendor_id!='$vendor_id' ";
	}
	
	$objVendorMgmt = new VendorMgmt();	
	$out = $objVendorMgmt ->getAllRecords(0,0,$condition,"","");
	
	$count=dbRows($out);

	if($count > 0){ echo "{success:'false'}"; }
    else { 
     echo "{success:'true'}";
	}

}
?>