<?php  
	require "commonincludefiles.php";
	
	if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
	{
		$objSemester = new SemesterMgmt();
		$objSemester->semester_id	= $_POST['semester_id'];
		$objSemester->semester_name = $_POST['semester_name'];
		$objSemester->branch_id = $_POST['branch_hidden'];
		$objSemester->rollno_print = $_POST['rollno_print'];
		
		if($objSemester->semester_id == "0"){
			$objSemester->add();
		}
		else{			
			if($_REQUEST['act'] == "del")
				$objSemester->delete();
			else
				$objSemester->edit();
		}
		echo '{"success":"true"}';
	}
	else
	{
		echo '{"success":"false","msg":"session expiry"}';
	}
?>