<?php  
require "commonincludefiles.php";	
if ($_SESSION['VedantnrCollegeId']!="" && isset($_SESSION['VedantnrCollegeId'])) {

$branch_id	         	=$_REQUEST["branch_hidden"] ;
$year_id 	        =$_REQUEST["year_hidden"] ;
$branchyear_id 	        =$_REQUEST["branchyear_hidden"] ;
$semester_id 	        =$_REQUEST["semester_hidden"] ;

$student_id 	= explode(",",substr($_REQUEST['student_id'],0,-1));

$roll_no 		= explode(",",substr($_REQUEST['roll_no'],0,-1));

$objStudentMgmt = new StudentMgmt();
$condition="";
if($branch_id !=""){
	$condition.="AND cur_branchid =$branch_id  ";
} 
if($year_id !=""){
	$condition.="AND year_id = $year_id  ";
} 
if($branchyear_id !=""){
	$condition.="AND cur_branchyearid =$branchyear_id  ";
} 
if($semester_id !=""){
	$condition.="AND cur_semesterid =$semester_id  ";
} 
	
	for($i = 0; $i < count($student_id); $i++){
		
		if($student_id[$i]!='' && $roll_no[$i]!=''){
			$objStudentMgmt->student_id=$student_id[$i];

			$objStudentMgmt->student_rollno=$roll_no[$i];	
			$objStudentMgmt->branch_id=$branch_id;	
			$objStudentMgmt->year_id=$year_id;	
			$objStudentMgmt->branchyear_id=$branchyear_id;	
			$objStudentMgmt->semester_id=$semester_id;	
			$objStudentMgmt->updateRollNo($condition);
		}
	}	
	
	echo '{"success":"true"}';
					
}

?>