<?php
require "../commonincludefiles.php";
error_reporting(1);

$company_name = Escape($_REQUEST['Comapanyname']);
$company_id = Escape($_REQUEST['company_id']);

if ($company_name != "") {

	$condition = "";

	if ($company_name != "") {
		$condition .= " and company_name='$company_name'";
	}
	if ($company_id != '0') {
		$condition .= "and company_id='$company_id'";
	}

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