<?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";
$custname		= 	Escape($_REQUEST['custname']);
$customer_id	 = 	Escape($_REQUEST['custid']);

if($custname !="")
 {
	$condition="";
	if($custname != ""){
		$condition .= " and customer_orgname ='$custname' ";
	}
	if($customer_id != ""){
		$condition .= " and customer_id!='$customer_id' ";
	}
	$condition .= " and company_id='".$_SESSION["cCompany_id"]."' ";
	$objCustomerMgmt = new CustomerMgmt();	
	$out = $objCustomerMgmt ->getAllRecords(0,0,$condition,"","");
	$count=dbRows($out);
	if($count > 0){ echo "{success:'false'}"; }
    else { 
     echo "{success:'true'}";
	}

}
?>