<?php  
	require "commonincludefiles.php";
	
	if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
	{
		
		$objcms_branchsemesterMgmt= new cms_branchsemesterMgmt();
		$objcms_branchsemesterMgmt->branchsemester_id=$_POST['branchsemester_id'];
		$objcms_branchsemesterMgmt->college_id=$_POST['college_id'];
		$objcms_branchsemesterMgmt->branch_id=$_POST['branch_hidden'];
		$objcms_branchsemesterMgmt->semester_id=$_POST['semester_hidden'];
		$objcms_branchsemesterMgmt->noofdiv=$_POST['noofdiv'];

		if($objcms_branchsemesterMgmt->branchsemester_id == "0" ||  $objcms_branchsemesterMgmt->branchsemester_id== ""){ 
	
			$objcms_branchsemesterMgmt->add(); 
		} 
		else{
		
			if($_REQUEST['act'] == "del")
			 {
				 $objcms_branchsemesterMgmt->delete();
			 
			 }else
			 {
				 $objcms_branchsemesterMgmt->edit();
			}
		
		 }
		 echo'{"success":"true"}'; 

	}
	else
	{
		echo '{"success":"false","msg":"session expiry"}';
	}
?>