<?php  
	require "commonincludefiles.php";
	
	if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
	{
		$objSemester = new LecMgmt();
		$objSemester->semester_allocate_time_id	= $_REQUEST['semester_allocate_time_id'];
		$objSemester->branch_id 	         	= $_REQUEST["branch_hidden"] ;
		$objSemester->year_id 	         	= $_REQUEST["year_hidden"] ;
		$objSemester->branchyear_id 	        = $_REQUEST["branchyear_hidden"] ;
		$objSemester->semester_id 	        = $_REQUEST["semester_hidden"] ;
		$objSemester->lec_id = $_REQUEST['hidden_lecture_id']; 
		$objSemester->time_start_name = $_REQUEST['time_start_name']; 
		$objSemester->time_end_name = $_REQUEST['time_end_name']; 
			
		if($objSemester->semester_allocate_time_id == "0"){
			$objSemester->addsmesterallocate();
		}
		else{			
			if($_REQUEST['act'] == "del")
				$objSemester->deletesmesterallocate();
			else
				$objSemester->editsmesterallocate();
		}
		echo '{"success":"true"}';
	}
	else
	{
		echo '{"success":"false","msg":"session expiry"}';
	}
?>