<?php  
	require "commonincludefiles.php";
	
	if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
	{
		$objSiteConfigMgmt = new SiteConfigMgmt();
		
		$objSiteConfigMgmt->config_key	= "smsusername";
		$objSiteConfigMgmt->config_value = $_POST['smsusername'];	
		$objSiteConfigMgmt->edit();	

		$objSiteConfigMgmt->config_key	= "smspassword";
		$objSiteConfigMgmt->config_value = $_POST['smspassword'];		
		$objSiteConfigMgmt->edit();	
		
		if($_POST['FeeSms']=="on")
		{
		
			$objSiteConfigMgmt->config_key	= "FeeSms";
			$objSiteConfigMgmt->config_value = 1;		
			$objSiteConfigMgmt->edit();	
		}else{
			
			$objSiteConfigMgmt->config_key	= "FeeSms";
			$objSiteConfigMgmt->config_value = 0;		
			$objSiteConfigMgmt->edit();	
		}
		
		
		if($_POST['FeeSmsP']=="on")
		{
			$objSiteConfigMgmt->config_key	= "FeeSmsP";
			$objSiteConfigMgmt->config_value = 1;		
			$objSiteConfigMgmt->edit();	
		}else{
			$objSiteConfigMgmt->config_key	= "FeeSmsP";
			$objSiteConfigMgmt->config_value = 0;		
			$objSiteConfigMgmt->edit();	
		}
		
		if($_POST['FeeSmsS']=="on")
		{
			$objSiteConfigMgmt->config_key	= "FeeSmsS";
			$objSiteConfigMgmt->config_value = 1;		
			$objSiteConfigMgmt->edit();	
		}else{
			$objSiteConfigMgmt->config_key	= "FeeSmsS";
			$objSiteConfigMgmt->config_value = 0;		
			$objSiteConfigMgmt->edit();	
		}
	
		if($_POST['PresentSMS']=="on")
		{
			$objSiteConfigMgmt->config_key	= "PresentSMS";
			$objSiteConfigMgmt->config_value = 1;		
			$objSiteConfigMgmt->edit();	
		}else{
			$objSiteConfigMgmt->config_key	= "PresentSMS";
			$objSiteConfigMgmt->config_value = 0;		
			$objSiteConfigMgmt->edit();	
		}
		
		if($_POST['PresentSMSP']=="on")
		{
			$objSiteConfigMgmt->config_key	= "PresentSMSP";
			$objSiteConfigMgmt->config_value = 1;		
			$objSiteConfigMgmt->edit();	
		}else{
			$objSiteConfigMgmt->config_key	= "PresentSMSP";
			$objSiteConfigMgmt->config_value = 0;		
			$objSiteConfigMgmt->edit();	
		}
		
		if($_POST['PresentSMSS']=="on")
		{
			$objSiteConfigMgmt->config_key	= "PresentSMSS";
			$objSiteConfigMgmt->config_value = 1;		
			$objSiteConfigMgmt->edit();	
		}else{
			$objSiteConfigMgmt->config_key	= "PresentSMSS";
			$objSiteConfigMgmt->config_value = 0;		
			$objSiteConfigMgmt->edit();	
		}
		
		
		
		
		if($_POST['librarySms']=="on")
		{
			$objSiteConfigMgmt->config_key	= "librarySms";
			$objSiteConfigMgmt->config_value = 1;		
			$objSiteConfigMgmt->edit();	
		}else{
			$objSiteConfigMgmt->config_key	= "librarySms";
			$objSiteConfigMgmt->config_value = 0;		
			$objSiteConfigMgmt->edit();	
		}
		
		if($_POST['librarysmsS']=="on")
		{
			$objSiteConfigMgmt->config_key	= "librarysmsS";
			$objSiteConfigMgmt->config_value = 1;		
			$objSiteConfigMgmt->edit();	
		}else{
			$objSiteConfigMgmt->config_key	= "librarysmsS";
			$objSiteConfigMgmt->config_value = 0;		
			$objSiteConfigMgmt->edit();	
		}
		
		if($_POST['librarysmsP']=="on")
		{
			$objSiteConfigMgmt->config_key	= "librarysmsP";
			$objSiteConfigMgmt->config_value = 1;		
			$objSiteConfigMgmt->edit();	
		}else{
			$objSiteConfigMgmt->config_key	= "librarysmsP";
			$objSiteConfigMgmt->config_value = 0;		
			$objSiteConfigMgmt->edit();	
		}
			
		echo '{"success":"true"}';
	}
	else
	{
		echo '{"success":"false","msg":"session expiry"}';
	}
?>