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

 $productname	= 	Escape($_REQUEST['productname']);
 $product_id	 = 	Escape($_REQUEST['productid']);
 if($productname !="")
 {

	$condition="";
	
	
	
	if($productname != ""){
		$condition .= " and product_name='$productname' ";
	}
	
	if($product_id != ""){
		$condition .= " and product_id!='$product_id' ";
	}
	
	$condition .= " and company_id='".$_SESSION["cCompany_id"]."' ";

	$objProductMgmt = new ProductMgmt();	
	$out = $objProductMgmt ->getAllRecords(0,0,$condition,"","");
	
	$count=dbRows($out);

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

}
?>