<?php
 require "../commonincludefiles.php";
 
 $product_name		= Escape($_REQUEST['Productname']);
 $product_id		  = Escape($_REQUEST['Product_id']);
 if($product_name !="" ) 
 {
	
	$condition=""; 
	
	if($product_name != ""){
		$condition .= " and product_name='$product_name'";
	}
	if($product_id!='0'){
		$condition .="and product_id!='$product_id'";
	}

	$objproductMgmt = new ProductMgmt();
	$out = $objproductMgmt ->getAllRecords(0,0,$condition,"","");
	$count=dbRows($out);	
	if($count > 0){ echo "{success:'false'}" ; }
    else { echo "{success:'true'}";}
 }
 /*else
 {
     echo "{success:'true'}";
 }*/
?>