<?php  
	require "commonincludefiles.php";
	
	if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
	{
		$objcms_gtufeesheadMgmt = new cms_gtufeesheadMgmt();
		$objcms_gtufeesheadMgmt->gtuhead_id	= $_POST['gtuhead_id'];
		$objcms_gtufeesheadMgmt->gtuhead_name	= $_POST['gtuhead_name'];
		$objcms_gtufeesheadMgmt->gtuhead_amount		= $_POST['gtuhead_amount'];
		$objcms_gtufeesheadMgmt->max_amount = $_POST['max_amount'];	
		$objcms_gtufeesheadMgmt->gtufee_type = $_POST['gtufee_type'];
		$objcms_gtufeesheadMgmt->head_active = '1';			
		if($objcms_gtufeesheadMgmt->gtuhead_id == "0"){
			$objcms_gtufeesheadMgmt->add();
		}
		else{			
			if($_REQUEST['act'] == "del")
				$objcms_gtufeesheadMgmt->delete();
			else
				$objcms_gtufeesheadMgmt->edit();
		}
		echo '{"success":"true"}';
	}
	else
	{
		echo '{"success":"false","msg":"session expiry"}';
	}
?>