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

if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
{
 		
 
 	$objStudentinquiry = new StudentMgmt();

	$objStudentinquiry->college_id           =$_SESSION["VedantnrCollegeId"] ;
	$objStudentinquiry->branch_id 	         	=$_REQUEST["branch_hidden"] ;
	
	
	
	$objStudentinquiry->university_name 	        	=$_REQUEST["university_name"] ;
	$objStudentinquiry->passing_year 	    =$_REQUEST["passing_year"] ;
	$objStudentinquiry->reference 	    	=$_REQUEST["reference"] ;
	$objStudentinquiry->enrollment_no 	  	=$_REQUEST["enrollment_no"] ;
	$objStudentinquiry->sem_one 	  		=$_REQUEST["sem_one"] ;
	$objStudentinquiry->sem_two 	  	=$_REQUEST["sem_two"] ;
	$objStudentinquiry->sem_three 	      	=$_REQUEST["sem_three"] ;
	$objStudentinquiry->sem_four 	    	=$_REQUEST["sem_four"] ;
	$objStudentinquiry->sem_five 			=$_REQUEST["sem_five"] ;
	$objStudentinquiry->sem_six 	  	=$_REQUEST["sem_six"] ;
	$objStudentinquiry->enrollment_no_cgpa 	    =$_REQUEST["enrollment_no_cgpa"] ;
	$objStudentinquiry->cgpa			=$_REQUEST["cgpa"] ;
	$objStudentinquiry->enrollment_no_stpi 	  		=$_REQUEST["enrollment_no_stpi"] ;
	$objStudentinquiry->stpi 	    	=$_REQUEST["stpi"] ;
	
	$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->diploma_inquiry_no 		=$_REQUEST["diploma_inquiry_no"];

	
 	// 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 -> addinquirydiploma();
		
		}	
	echo '{"success":"true"}';
}	         
?>
