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