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


	$objcms_batchmasterMgmt= new cms_batchmasterMgmt();
	$objcms_batchmasterMgmt->batch_id=$_POST['batch_id1'];
	$objcms_batchmasterMgmt->batch_name=$_POST['batch_name'];
	
	if($objcms_batchmasterMgmt->batch_id == "0" ||  $objcms_batchmasterMgmt->batch_id== ""){ 
			$objcms_batchmasterMgmt->add(); 
	} 
	else{
	if($_REQUEST['act'] == "del")
	 {$objcms_batchmasterMgmt->delete();
	 }else
	 {$objcms_batchmasterMgmt->edit();
	}
	}
	echo'{"success":"true"}'; 
}						 
else {
	echo '{"success":"false","msg":"session expiry"}';
}	
?>