<?php  
	require "commonincludefiles.php";
	
	if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
	{
		$objSemester = new LecMgmt();
		$objSemester->time_id	= $_POST['time_id'];
		$objSemester->time_start_name = $_POST['time_start_name'];
		$objSemester->time_end_name = $_POST['time_end_name'];
		$objSemester->lec_id = $_POST['hidden_lecture_id']; 
		
		
		if($objSemester->time_id == 0){
			$objSemester->addtime();
		}
		else{			
			if($_REQUEST['act'] == "del")
				$objSemester->deletetime();
			else
				$objSemester->edittime();
		}
		echo '{"success":"true"}';
	}
	else
	{
		echo '{"success":"false","msg":"session expiry"}';
	}
?>