<?php 
require "commonincludefiles.php";
require "data/sendingsms_studentpresant.php";

if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
{
 		
 
 	$objStudentinquiry = new StudentMgmt();
//echo $_REQUEST["branch_hidden"]; exit;
	$objStudentinquiry->college_id           =$_SESSION["VedantnrCollegeId"] ;
	$objStudentinquiry->branch_id 	         	=$_REQUEST["branch_hidden"] ;
	
	
	
	$objStudentinquiry->twle_seat 	        	=$_REQUEST["twle_seat"] ;
	$objStudentinquiry->twle_total_mark 	    =$_REQUEST["twle_total_mark"] ;
	$objStudentinquiry->obtain_mark 	    	=$_REQUEST["obtain_mark"] ;
	$objStudentinquiry->twle_percentage 	  	=$_REQUEST["twle_percentage"] ;
	$objStudentinquiry->twle_maths 	  		=$_REQUEST["twle_maths"] ;
	$objStudentinquiry->twle_chemistry 	  	=$_REQUEST["twle_chemistry"] ;
	$objStudentinquiry->twle_physics 	      	=$_REQUEST["twle_physics"] ;
	$objStudentinquiry->twle_other 	    	=$_REQUEST["twle_other"] ;
	$objStudentinquiry->gujcet_seat 			=$_REQUEST["gujcet_seat"] ;
	$objStudentinquiry->gujcet_physics 	  	=$_REQUEST["gujcet_physics"] ;
	$objStudentinquiry->gujcet_chemistry 	    =$_REQUEST["gujcet_chemistry"] ;
	$objStudentinquiry->gujcet_maths			=$_REQUEST["gujcet_maths"] ;
	$objStudentinquiry->gujcet_total 	  		=$_REQUEST["gujcet_total"] ;
	$objStudentinquiry->gujcet_obtain 	    	=$_REQUEST["gujcet_obtain"] ;
	$objStudentinquiry->gujcet_percentage 		=$_REQUEST["gujcet_percentage"] ;
	$objStudentinquiry->jee_seat 	  			=$_REQUEST["jee_seat"] ;
	$objStudentinquiry->jee_physics 			=$_REQUEST["jee_physics"] ;
	$objStudentinquiry->jee_chemistry 			=$_REQUEST["jee_chemistry"] ;
	$objStudentinquiry->jee_maths 	    		=$_REQUEST["jee_maths"] ;
	$objStudentinquiry->jee_total 	    		=$_REQUEST["jee_total"] ;
	$objStudentinquiry->jee_obtain 	    	=$_REQUEST["jee_obtain"] ;
	$objStudentinquiry->jee_percentage 	    =$_REQUEST["jee_percentage"] ;
	$objStudentinquiry->student_surname		=$_REQUEST["student_surname"] ;
	$objStudentinquiry->student_firstname		=$_REQUEST["student_firstname"] ;
	$objStudentinquiry->student_lastname 	    =$_REQUEST["student_lastname"] ;
	$objStudentinquiry->student_mother 		=$_REQUEST["student_mother"] ;
	$objStudentinquiry->student_gender 		=$_REQUEST["student_gender"] ;
	$objStudentinquiry->student_category 		=$_REQUEST["student_category"] ;
	$objStudentinquiry->student_address 	    =$_REQUEST["student_address"] ;
	$objStudentinquiry->occupation 	    	=$_REQUEST["occupation"] ;
	$objStudentinquiry->student_birthdate 		=$_REQUEST["student_birthdate"];
	$objStudentinquiry->student_phoneo 		=$_REQUEST["student_phoneo"]; 
	$objStudentinquiry->student_phoner 		=$_REQUEST["student_phoner"];
	$objStudentinquiry->reference 		=$_REQUEST["reference"];
	

	
 	// edit mode 
	if ($_REQUEST["ID"] > 0 && isset($_REQUEST["ID"])){   
	 	$objStudentinquiry->student_id = $_REQUEST["ID"];
		$objStudentinquiry -> edit();   						
    }
	else if ($_REQUEST["ID"] ==0 && isset($_REQUEST["ID"])){    
		$objStudentinquiry -> addinquiry();
		
		}	
	echo '{"success":"true"}';
}	         
?>
