<?php
require "commonincludefiles.php";

if ($_SESSION["VedantnrCollegeId"] != "" && isset($_SESSION["VedantnrCollegeId"])) {
	$objStudentScholarshipMgmt = new StudentScholarshipMgmt();
	$objStudentScholarshipMgmt->studentscholarship_id = $_POST['studentscholarship_id'];
	$objStudentScholarshipMgmt->scholarship_id = $_POST['scholarship_hidden'];
	$objStudentScholarshipMgmt->semester_id = $_POST['semester_hidden'];
	$objStudentScholarshipMgmt->year_id = $_POST['year_hidden'];
	$objStudentScholarshipMgmt->student_id = $_POST['student_hidden'];
	$objStudentScholarshipMgmt->branch_id = $_POST['branch_hidden'];
	$objStudentScholarshipMgmt->branchyear_id = $_POST['branchyear_hidden'];
	$objStudentScholarshipMgmt->financial_year = $_POST['financial_year'];
	
	$objStudentScholarshipMgmt->formfill_date = $_POST['formfill_date'];
	$objStudentScholarshipMgmt->scholarshipaprove_date = $_POST['scholarshipaprove_date'];
	$objStudentScholarshipMgmt->scholarshiprecive_date = $_POST['scholarshiprecive_date'];
	$objStudentScholarshipMgmt->scholarshiprecive_price = $_POST['scholarshiprecive_price'];
	$objStudentScholarshipMgmt->collegerecive_date = $_POST['collegerecive_date'];
	$objStudentScholarshipMgmt->collegerecive_price = $_POST['collegerecive_price'];


	if ($objStudentScholarshipMgmt->studentscholarship_id == "0") {
		$objStudentScholarshipMgmt->add();
	} 
	elseif($_REQUEST['act'] == "del"){		
		
			$objStudentScholarshipMgmt->delete();
	}else{
			$objStudentScholarshipMgmt->edit();
	}
	
	echo '{"success":"true"}';
} else {
	echo '{"success":"false","msg":"session expiry"}';
}
?>