<?php
require "../commonincludefiles.php";
if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
{	
 $allowancesname			= 	Escape($_REQUEST['allowancesname']);
 $allowances_id		    = 	Escape($_REQUEST['allowances_id']);
	
 if(($allowancesname !="" ) && ($allowances_id)!="")
 {

	$condition="";
	
	if($allowancesname != ""){
		$condition .= " and cms_allowances.allowances_name='$allowancesname' ";
	}
	
	if($allowances_id != ""){
		$condition .= " and cms_allowances.allowances_id !='$allowances_id' ";
	}
	
	$objallowancesMgmt = new allowancesMgmt();	
	$out = $objallowancesMgmt ->getAllRecords(0,0,$condition,"","");

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