<?php  
	require "commonincludefiles.php";
	if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
	{
		$feedback_start_date = date('Y-m-d',strtotime(str_replace('/','-',$_POST['feedback_start_date'])));
		$feedback_end_date = date('Y-m-d',strtotime(str_replace('/','-',$_POST['feedback_end_date'])));
		$objSiteConfigMgmt = new SiteConfigMgmt();
		$objSiteConfigMgmt->config_key	= "feedback_start_date";
		$objSiteConfigMgmt->config_value = $feedback_start_date;
		$objSiteConfigMgmt->edit();	

		$objSiteConfigMgmt->config_key	= "feedback_end_date";
		$objSiteConfigMgmt->config_value = $feedback_end_date;
		$objSiteConfigMgmt->edit();	
		

		$objSiteConfigMgmt->config_key	= "feedback_branch";
		$objSiteConfigMgmt->config_value = $_REQUEST['branch_hidden'];
		$objSiteConfigMgmt->edit();	

		$objSiteConfigMgmt->config_key	= "feedback_year";
		$objSiteConfigMgmt->config_value = $_REQUEST['year_hidden'];
		$objSiteConfigMgmt->edit();	

		$objSiteConfigMgmt->config_key	= "feedback_branchyear";
		$objSiteConfigMgmt->config_value = $_REQUEST['branchyear_hidden'];
		$objSiteConfigMgmt->edit();	


		$objSiteConfigMgmt->config_key	= "feedback_semester";
		$objSiteConfigMgmt->config_value = $_REQUEST['semester_hidden'];
		$objSiteConfigMgmt->edit();	
		
		if($_POST['feedback_active']=="on")
		{
			$objSiteConfigMgmt->config_key	= "feedback_active";
			$objSiteConfigMgmt->config_value = 1;		
			$objSiteConfigMgmt->edit();	
		}else{
			$objSiteConfigMgmt->config_key	= "feedback_active";
			$objSiteConfigMgmt->config_value = 0;		
			$objSiteConfigMgmt->edit();	
		}
			
		echo '{"success":"true"}';
	}
	else
	{
		echo '{"success":"false","msg":"session expiry"}';
	}
?>