0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 13.58.105.80


Current Path : /var/www/html/stph/js/
Upload File :
Current File : /var/www/html/stph/js/admission_approve.js

 $g_se_degree='';
 $g_se_exam='';
function returnMonthValue(val)
{	
	var month_array = new Array();
 	  month_array['Jan'] = '01';
	  month_array['Feb'] = '02';
	  month_array['Mar'] = '03';
	  month_array['Apr'] = '04';
	  month_array['May'] = '05';
	  month_array['Jun'] = '06';
	  month_array['Jul'] = '07';
	  month_array['Aug'] = '08';
	  month_array['Sep'] = '09';
	  month_array['Oct'] = '10';
	  month_array['Nov'] = '11';
	  month_array['Dec'] = '12';  
		
		return month_array[val];	

}
function returnMonthName(val)
{	
	var month_array = new Array();
 	  month_array['Jan'] = '01';
	  month_array['Feb'] = '02';
	  month_array['Mar'] = '03';
	  month_array['Apr'] = '04';
	  month_array['May'] = '05';
	  month_array['Jun'] = '06';
	  month_array['Jul'] = '07';
	  month_array['Aug'] = '08';
	  month_array['Sep'] = '09';
	  month_array['Oct'] = '10';
	  month_array['Nov'] = '11';
	  month_array['Dec'] = '12';  
		
		return month_array[val];	

}
function CallenableAdmissionApprove()
{
	$("#page_main_div").load('html_modules/approve.html',function()
	{	
		document.getElementById('display_module_name').innerHTML = ' Admission Approve ';
		document.getElementById('module_name_for_save').value = 'Admission Approve';
		gsl_no = 0;
		getDefaultHeadFooterLinks('Admission Approve'); 
		loadSelectDropdownList();
		
	});


}


function loadSelectDropdownList()
{
	
	$.ajax({
        type: "POST",
	   	url: $host_url+"GetAllSelectDropdown",
		success: responceLoadSelectDropdownList
  });

}

function responceLoadSelectDropdownList($responce)
{
	$responce = eval('('+$responce+')');
	document.getElementById('appcollege').options.length = 0;
	var $lobj_Option = document.createElement("OPTION");
	$lobj_Option.value = "All";
	$lobj_Option.text = "All";         
	document.getElementById('appcollege').options[0]=($lobj_Option);   
	for($i=0;$i < $responce.data.length;$i++)                                  
	{            
			$op = new Option($responce.data[$i]['value'], $responce.data[$i]['internal_code']);
			$op.id=$responce.data[$i]['internal_code'];//specifying the id  for options
			document.getElementById('appcollege').options.add($op);
			
	}
}


function loadCollegeDegree(collcode)
{
		$.ajax({
        type: "POST",
		data:'&collcode='+collcode,
	   	url: $host_url+"GetCollegeDegreeDropdown",
		success: responceGetCollegeDegreeDropdown
		});
}


function responceGetCollegeDegreeDropdown($responce)
{
	$responce = eval('('+$responce+')');
	document.getElementById('appdegree').options.length = 0;
	var $lobj_Option = document.createElement("OPTION");
	$lobj_Option.value = "All";
	$lobj_Option.text = "All";         
	document.getElementById('appdegree').options[0]=($lobj_Option);   
	for($i=0;$i < $responce.data.length;$i++)                                  
	{            
		$op = new Option($responce.data[$i]['value'], $responce.data[$i]['internal_code']);
		$op.id=$responce.data[$i]['internal_code'];//specifying the id  for options
		document.getElementById('appdegree').options.add($op);
			
	}


}


function loadCollegeDegreeComb(degcode)
{
		$.ajax({
			type: "POST",
			//async:false,
			url: $host_url+"getCombinationNames", 
			data:"&degree="+encodeURIComponent(trim(degcode)),
			success:function($responce)
			{
				$responce = eval('(' +  $responce + ')');
				if($responce.error_code==0)
				{	
					document.getElementById('degcomb').options.length = 0;
					var $lobj_Option = document.createElement("OPTION");
					$lobj_Option.value = "All";
					$lobj_Option.text = "All";         
					document.getElementById('degcomb').options[0]=($lobj_Option);   
					for($i=0;$i < $responce.data.length;$i++)                                  
					{            
							$op = new Option($responce.data[$i]['value'], $responce.data[$i]['internal_code']);
							$op.id=$responce.data[$i]['internal_code'];//specifying the id  for options
							document.getElementById('degcomb').options.add($op);
					}
				}
				else
				{
					document.getElementById('degcomb').options.length = 0;
					var $lobj_Option = document.createElement("OPTION");
					$lobj_Option.value = "All";
					$lobj_Option.text = "All";         
					document.getElementById('degcomb').options[0]=($lobj_Option);   
				}
			}
			});
	
}

var gsrchColl='';
var gsrchDeg = '';
var gsrchComb = '';
var gsrchStatus = '';

function GetAdmissionList()
{

	gsrchColl = $("#appcollege").val();
	gsrchDeg = $("#appdegree").val();
	gsrchComb = $("#degcomb").val();
	gsrchStatus = $("#appr_status").val();
	
	$.ajax({
        type: "POST",
		data:'&collcode='+$("#appcollege").val()+"&degcode="+$("#appdegree").val()
		+"&combcode="+$("#degcomb").val()+"&apprstatus="+$("#appr_status").val(),
	   	url: $host_url+"GetAdmissionList",
		success: responceGetAdmissionList
		});
}
var total;
function responceGetAdmissionList($responce)
{
	$responce = eval('('+$responce+')');
	total = $responce.data['cnt'];
	$("#adm_application_details").html($responce.data['admtable']);
	$("#adm_application_details").show();
	//$("#adm_application_details").contents().find("body").append($responce.data);
	/*var doc = document.getElementById('adm_application_details').contentWindow.document;
	doc.open();
	doc.write($responce.data);
	*/

}

	

function ViewStudentDetailsForApprove(id,degree,collcode)
{
	$.ajax({
			type: "POST",
			//async:false,
			url: $host_url+"getAppStudentDetails", 
			data:"sl_no="+id+"&degree="+degree+"&collcode="+collcode,
			success: EditStudentDetailsForUpdateResponse
		}); 
}
var gsl_no=0;
var gcollcode=0;
var gdegree=0;
var college_code; 
function EditStudentDetailsForUpdateResponse($responce)
{ 	
	$responce = eval('(' + $responce + ')'); 
	document.getElementById('is_add_edit').value = 'Edit';
	
	if($responce.error_code == 0)
	{		
	$("#page_main_div").load('html_modules/admission_entryapp.html',function()
	{
		
		/* $("#error_msg").html(" ");
		gsl_no = $responce.data['FSLNO'];
		gcollcode = $responce.data['FCOLLCODE'];
		gdegree = $responce.data['FDEGREE'];
		document.getElementById('student_entry_slno').value = $responce.data['FSLNO'];
		document.getElementById('student_entry_degree_code').value = $responce.data['FDEGREE'];
		document.getElementById('approvestatus').value = $responce.data['FAPPRSTATUS'];
		document.getElementById('student_entry_degree_code').disabled=true;
		document.getElementById('student_entry_degree_name').disabled=true;
		document.getElementById('student_entry_degree_name').value = $responce.data['FDESCPN'];
		document.getElementById('student_entry_name').value = $responce.data['FNAME'];
	
		if($responce.data['FLANGEXAM'] == 'Kannada')
		$("#student_entry_rdbKannada").attr("checked",true);
		if($responce.data['FLANGEXAM'] == 'English')
		$("#student_entry_rdbEnglish").attr("checked",true);
		
		if($responce.data['Fgender'] == 'Male')
		$("#student_entry_genderm").attr("checked",true);
		if($responce.data['Fgender'] == 'Female')
		$("#student_entry_genderf").attr("checked",true);
		document.getElementById('student_entry_marital').value = $responce.data['FMARITALSTATUS'];
		document.getElementById('student_entry_dob').value = $responce.data['FDOBirth'];
		document.getElementById('student_entry_nationality').value = $responce.data['FNATIONAL'];
		document.getElementById('student_entry_national').value = $responce.data['FNATCANDIDATE'];
		document.getElementById('student_entry_state').value = $responce.data['FSTATE'];
		document.getElementById('sltBelongsToKarnatakaBy').value = $responce.data['FKARBIRTH'];
		document.getElementById('student_entry_religion').value = $responce.data['FRELIGION'];
		document.getElementById('degree_category').value = $responce.data['FCATBIRTH'];
		document.getElementById('student_entry_caste').value = $responce.data['FCASTE'];
		document.getElementById('student_entry_academicYear').value = $responce.data['FACADYEAR'];
		document.getElementById('student_entry_catadm').value = $responce.data['FADMCAT'];
		document.getElementById('combination').value = $responce.data['FCOMBCODE'];
		document.getElementById('student_entry_admdate').value = $responce.data['FADMISDATE'];
		document.getElementById('student_entry_Intake').value = $responce.data['FADMINTAKE'];
		document.getElementById('student_entry_admQuota').value = $responce.data['FADMQUOTA'];
		
		document.getElementById('student_entry_fname').value = $responce.data['FFATNAME'];
		document.getElementById('student_entry_fincome').value = $responce.data['FFATINCOME'];
		document.getElementById('student_entry_mname').value = $responce.data['FMOTNAME'];
		document.getElementById('student_entry_mincome').value = $responce.data['FMOTHINCOME'];
		document.getElementById('student_entry_phone').value = $responce.data['FCONTACT_NO'];
		document.getElementById('student_entry_comm_addr1').value = $responce.data['FCURRADD1'];
		document.getElementById('student_entry_comm_addr2').value = $responce.data['FCURRADD2'];
		document.getElementById('student_entry_comm_addr3').value = $responce.data['FCURRADD3'];
		document.getElementById('student_entry_comm_addr4').value = $responce.data['FCURRADD4'];
		document.getElementById('student_entry_per_add1').value = $responce.data['FPERMADD1'];
		document.getElementById('student_entry_per_add2').value = $responce.data['FPERMADD2'];
		document.getElementById('student_entry_per_add3').value = $responce.data['FPERMADD3'];
		document.getElementById('student_entry_per_add4').value = $responce.data['FPERMADD4'];		
		document.getElementById('student_entry_religion').value =$responce.data['FRELIGION'];		
		document.getElementById('student_entry_email').value=$responce.data['FEMAIL'];	
		document.getElementById('student_entry_mobile').value =$responce.data['FMOBILE_NO'];	
		document.getElementById('seLinguisticMinority').value =$responce.data['FLINGMINORITY'];	
		document.getElementById('seReligiousMinority').value =$responce.data['FREGMINORITY'];	
		document.getElementById('seAadharNumber').value =$responce.data['FAADHARNO'];	
		document.getElementById('degree_category').value = $responce.data['FCATBIRTH'];
		document.getElementById('txtUnvRegFee').value = $responce.data['FUNIVFEE'];
		document.getElementById('txtUnvRegReceiptNo').value = $responce.data['FUNIVRECNO'];
		document.getElementById('txtAdmnFee').value = $responce.data['FLATADMFEE'];
		document.getElementById('txtAdmnReceiptNo').value = $responce.data['FLATRECNO'];
		 
		$.ajax({
				type: "POST",
				url: $host_url+"getCategoryNames.demo",
				data:"id="+'degree_category',
				success:function($responceCat){
				$responceCat = eval('(' +  $responceCat + ')');
				if($responceCat.error_code==0)
				{	
				var optionsAsString = "<option value=''> Select Category </option>";
				for(var i = 0; i < $responceCat.data.length; i++)
				{
					if($responceCat.data[i].internal_code == $responce.data['FCATBIRTH'])
					{
						optionsAsString += "<option value='" + $responceCat.data[i].internal_code + "' selected>" + $responceCat.data[i].value + "</option>";
					}
					else
					optionsAsString += "<option value='" + $responceCat.data[i].internal_code + "'>" + $responceCat.data[i].value + "</option>";
				}
					$("#degree_category" ).append( optionsAsString );
				}
				}
				});
				
			
			$.ajax({
			type: "POST",
			//async:false,
			url: $host_url+"getCombinationNames", 
			data:"&degree="+encodeURIComponent($responce.data['FDEGREE']),
			success:function($responces)
			{
			$responces = eval('(' + $responces + ')');
			
			var optionsAsString = "<option value=''> Select Combination</option>";
			for(var i = 0; i < $responces.data.length; i++) {
				if($responces.data[i].internal_code == $responce.data['FCOMBCODE'])
				{
					optionsAsString += "<option value='" + $responces.data[i].internal_code + "' selected>" + $responces.data[i].value + "</option>";
				}
				else
				optionsAsString += "<option value='" + $responces.data[i].internal_code + "'>" + $responces.data[i].value + "</option>";
			}
			$("#combination" ).append( optionsAsString );
			var inputBoxes = document.getElementsByTagName('input');
		
			for (var counter=0; counter < inputBoxes.length; counter++)
			{
								inputBoxes[counter].disabled=true;
                               
			}
			/* var inputBoxes = document.getElementsByTagName('select');
		
			for (var counter=0; counter < inputBoxes.length; counter++)
			{					
								inputBoxes[counter].disabled=true;
                               
			}
			}
			});			
			
			document.getElementById('combination').value = $responce.data['FCOMBCODE'];
		
		$.ajax({
			type: "POST",
			//async:false,
			url: $host_url+"GetUploadedStudentDocuments", 
			data:"&degree="+encodeURIComponent($responce.data['FDEGREE'])+"&appno="+encodeURIComponent($responce.data['FSLNO'])+"&collcode="+encodeURIComponent(gcollcode),
			success:function(responce)
			{
					responce = eval('(' + responce + ')');

					$("#sedocs_div").html(responce.data);
					
			}
			});
		
		
		document.getElementById('sePADNationality').value = $responce.data['FNATQUALEXAM'];
		document.getElementById('sePADState').value = $responce.data['FSTATEQUALEXM'];
		document.getElementById('seTypeOfQualifyingExam').value = $responce.data['FTYPEQUALEXAM'];
		document.getElementById('seInstitutionName').value = $responce.data['FINSTNAME'];
		document.getElementById('seLocation').value = $responce.data['FINSTLOCAT'];
		document.getElementById('seUniversityName').value = $responce.data['FUNIVNAME'];
		document.getElementById('seExamRegNo').value = $responce.data['FQUALEXREGNO'];
		document.getElementById('seLanguages1').value = $responce.data['FLANGUAGE'];
		document.getElementById('seSpecialization').value = $responce.data['FSUBSPECIAL'];
		document.getElementById('seModeEdu').value = $responce.data['FMODEDU'];
		document.getElementById('seInterval').value = $responce.data['FEXAMINTERVAL'];
		document.getElementById('entranceExamMarks').value = $responce.data['FENTEXMARKS'];
		document.getElementById('nosemYear').value = $responce.data['FNOSEMYEAR'];
		document.getElementById('student_entry_Ph').value = $responce.data['FPHTYPE'];
		document.getElementById('txtEligbFee').value = $responce.data['FELIGFEE'];
		document.getElementById('txtEligbRecNo').value = $responce.data['FELIGRECNO'];
		if($responce.data['FHK'] == 'HK')
		{
			document.getElementById('chkHydKar').checked = true; 
		}
		$('#seWeightedAverage').html($responce.data['FWGHTAVGMARKS']);
		  
		//yearof_pass  mnth_pass  marks_sec  marks_total marks_per
		
		$("#student_entry_photo").attr("src", $responce.data['FPHOTOPATH']);
		$("#student_signature_photo").attr("src", $responce.data['FSIGNPATH']);
		document.getElementById('wghtAvgPer').value = $responce.data['FWGHTAVGMARKS'];
		var yscnt =$responce.data['FNOSEMYEAR'];
		var ystable='';
		ystable +="<tr><td style='width:100px;border:1px solid #000;padding:5px 5px;font-size:14px;'>Sem / Year</td><td style='width:100px;border:1px solid #000;padding:5px 5px;font-size:14px;'>Month of Passing</td><td style='width:100px;border:1px solid #000;padding:5px 5px;font-size:14px;'>Year of Passing</td><td style='width:100px;border:1px solid #000;padding:5px 5px;font-size:14px;'>Marks Scored</td><td style='width:100px;border:1px solid #000;padding:5px 5px;font-size:14px;'>Total Marks</td><td style='border:1px solid #000;padding:5px 5px;font-size:14px;'>% of Marks</td></tr>";
		var passmth = $responce.data['FPASSMNTH'];
		var passmthArray = passmth.split('*'); 
		var passyear = $responce.data['FPASSYER'];
		var passyearArray = passyear.split('*'); 
		var marksecure = $responce.data['FMARKSECURED'];
		var marksecArray = marksecure.split('*'); 
		var markTotal = $responce.data['FMARKTOTAL'];
		var markTotArray = markTotal.split('*'); 
		var markPercnt = $responce.data['FPERMARK'];
		var markPercntArray = markPercnt.split('*'); 
		
		var index = 0;
		var avgSecMarks= 0;
		var avgTotMarks= 0;
		var avgPerMarks =0;
		for(var i=0;i<yscnt;i++)
		{	
			++index;
			avgSecMarks += parseInt(marksecArray[i]);
			avgTotMarks += parseInt(markTotArray[i]);
			
			ystable +="<tr><td style='border:1px solid #000'><input type='text' id='semyear"+index+"' value="+index+" style='width:100px;text-align:center;padding:5px 5px;'/></td><td style='border:1px solid #000'><input type='text' id='mnth_pass"+index+"' value='"+passmthArray[i]+"' maxlength=3 style='width:100px;padding:5px 5px;text-transform: uppercase;'/></td><td style='border:1px solid #000'><input type='text' id='yearof_pass"+index+"' value='"+passyearArray[i]+"' style='width:100px;padding:5px 5px;'/></td><td style='border:1px solid #000'><input type='text' id='marks_sec"+index+"' value='"+marksecArray[i]+"' style='width:100px;padding:5px 5px;'/></td><td style='border:1px solid #000'><input type='text' id='marks_total"+index+"' value='"+markTotArray[i]+"' onblur='calcuPercent("+index+")' style='width:100px;padding:5px 5px;'/></td><td style='border:1px solid #000'><input disabled id='marks_per"+index+"' value='"+markPercntArray[i]+"' style='padding:5px 5px;'></td></tr>";
		}

		avgPerMarks = (parseInt(avgSecMarks) / parseInt(avgTotMarks)) * 100;
		var totalpertage = avgPerMarks.toFixed(2);
		ystable +="<tr><td style='border:1px solid #000;font-size:16px;text-align:center;' colspan='3'>Total </td><td style='border:1px solid #000'><input disabled type='text' id='marks_secTot' value='"+avgSecMarks+"' style='width:100px;padding:5px 5px;'/></td><td style='border:1px solid #000'><input type='text' disabled id='marks_subtotal' value='"+avgTotMarks+"' style='width:100px;padding:5px 5px;'/></td><td style='border:1px solid #000'><input disabled id='marks_Avgper' value='"+totalpertage+"' style='padding:5px 5px;'></td></tr>";
		$("#symdytable").html(ystable);
		var Vmode = 1;
		
		GetCombinationSubjectList($responce.data['FCOLLCODE'],$responce.data['FCOMBCODE']);
		}); */
		
		$("#error_msg").html(" ");
		document.getElementById('student_entry_degree_code').value = $responce.data['FDEGREE'];
		 
		 document.getElementById('student_entry_degree_name').value = $responce.data['FDESCPN'];
		//document.getElementById('student_entry_exam').value = $responce.data['FEXAMNO'];
		document.getElementById('student_entry_slno').value = $responce.data['FSLNO'];
		document.getElementById('student_entry_name').value = $responce.data['FNAME'];
		document.getElementById('student_entry_fname').value = $responce.data['FFATNAME'];
		document.getElementById('student_entry_mname').value = $responce.data['FMOTNAME'];
		document.getElementById('student_entry_dob_year').value = $responce.data['FDOB_Year'];
	
		document.getElementById('student_entry_dob_month').value = returnMonthName($responce.data['FDOB_month']);
		document.getElementById('student_entry_dob_date').value = $responce.data['FDOB_date'];		
		
		document.getElementById('student_entry_gender').value = $responce.data['Fgender'];
		document.getElementById('student_entry_english').value = $responce.data['FENGLISH'];
		document.getElementById('student_entry_nationality').value = $responce.data['FNATIONAL'];
		
		document.getElementById('student_entry_comm_addr1').value = $responce.data['FCURRADD1'];
		document.getElementById('student_entry_comm_addr2').value = $responce.data['FCURRADD2'];
		document.getElementById('student_entry_comm_addr3').value = $responce.data['FCURRADD3'];
		document.getElementById('student_entry_comm_addr4').value = $responce.data['FCURRADD4'];
		document.getElementById('student_entry_per_add1').value = $responce.data['FPERMADD1'];
		document.getElementById('student_entry_per_add2').value = $responce.data['FPERMADD2'];
		document.getElementById('student_entry_per_add3').value = $responce.data['FPERMADD3'];
		document.getElementById('student_entry_per_add4').value = $responce.data['FPERMADD4'];		
		document.getElementById('student_entry_sub_degree_code').value= $responce.data['FSUBDEGREE'];
		document.getElementById('student_entry_sub_degree').value =$responce.data['FSUBDEGREE'];
		document.getElementById('student_entry_recognition_order_no').value =$responce.data['FREC_ORDER_NO'];
		document.getElementById('student_entry_recognition_date').value =$responce.data['FREC_ORDER_DATE'];
		document.getElementById('student_entry_affiliation_order_no').value =$responce.data['FAFF_ORDER_NO'];
		document.getElementById('student_entry_affiliation_date').value =$responce.data['FAFF_ORDER_DATE'];
		document.getElementById('student_entry_religion').value =$responce.data['FRELIGION'];		
		college_code = $responce.data['FCOLLCODE'];
		document.getElementById('college').value =$responce.data['FCOLLCODE'];
		
		document.getElementById('student_entry_father_occupation').value =$responce.data['FFAT_OCC'];	
	document.getElementById('student_entry_mather_occupation').value=$responce.data['FMOT_OCC'];	
	document.getElementById('student_entry_email').value=$responce.data['FEMAIL'];	
	document.getElementById('student_entry_contact_no').value =$responce.data['FCONTACT_NO'];	
	document.getElementById('student_entry_blood_group').value =$responce.data['FBLOOD_GROUP'];	
	document.getElementById('degree_category').value = $responce.data['FCASTE'];
	
	document.getElementById('appr_status').value = $responce.data['FAPPRSTATUS'];
	
	$("#student_entry_reg_fee").val($responce.data['REG_FEE']); 
		$("#student_entry_exam_fee").val($responce.data['EXAM_FEE']); 
		$("#student_entry_grade_card_fee").val($responce.data['GRADE_CARD_FEE']); 
		$("#student_entry_total_fee").val($responce.data['TOTAL_FEE']);
	
	
		 $("#student_entry_photo").attr("src", $responce.data['FPHOTOPATH']);
		if($responce.data.FLATERAL_ENTRY==1)
		{
		document.getElementById('is_lateral_entry').checked=true;
		$("#student_entry_exam").val("C") ;
		}
		else 
		{
		document.getElementById('is_lateral_entry').checked=false;
		$("#student_entry_exam").val("A") ;
		}
	 
		getsubjectappAppearingTotal();
		
		});
		
	}	
	else if($responce.error_code == -2)
	{
		DeletedRecords = 0;
		//$("#error_msg").html(" In Valid SL Number ");
		alert('In Valid SL Number');
		$("#student_entry_slno").val('');	
		document.getElementById('student_entry_slno').focus();	
	}
}


/* function GetCombinationSubjectList(collcode,combcode)
{
	if( jQuery.trim($("#student_entry_degree_code").val())!='')
	{
		$sl_no='';
		$sl_no=encodeURIComponent(trim($("#student_entry_admno").val()));
		$.ajax({
				type: "POST",
				//async:false,
				url: $host_url+"getAppStudsubApprTotal", 
				data:"degree_code="+$("#student_entry_degree_code").val()+"&exam="+$("#student_entry_exam").val() +
				"&sl_no="+$sl_no+"&collcode="+collcode+
				"&sub_degree="+encodeURIComponent(trim($("#student_entry_sub_degree_code").val()))+
				"&combination="+combcode,
				success: subjectAppearingTotalResponse
			});	
	}	
}
function subjectAppearingTotalResponse($responce)
{
	$responce = eval('(' + $responce + ')'); 
	$("#subject_appearing").show();
	$("#subject_appearing").html($responce.data.html);	
} */


function saveadmApproveStatus()
{

	
	checked_admapp_nos=new Array();
	var obj=$("input[id*='adm_check_box_']") ;
	jQuery.each(obj, function(k, v) {
		row_id=v['id'].split("_")[3]; 
		if($(this).is(':checked'))
		checked_admapp_nos.push(row_id);	
		});
		
		if(checked_admapp_nos.length>0)
		{
			var parameter = "&arun="+checked_admapp_nos;
		}else
		{
			college = document.getElementById('college').value;
			degree = document.getElementById('student_entry_degree_code').value;
			slno = document.getElementById('student_entry_slno').value;
			appr_status = document.getElementById('appr_status').value;			
			if(appr_status == '')
			{	
				alert('Select Status.');
				return false;
			}
			
			var parameter = "&college="+college+"&degree="+degree+"&slno="+slno+"&appr_status="+appr_status;
		}	
		
			$.ajax({
        type: "POST",
		data:parameter,
	   	url: $host_url+"updateadmAdmissionStatus",
		success: ReceivceadmSelectedApplicationsResponce
		});
			
}
function ReceivceadmSelectedApplicationsResponce(responce)
{
	responce = eval('(' + responce + ')');
	if(responce.error_code == 0)
	{
		alert(responce.data);
	}
}
function backAdmissionList()
{
	gsl_no = 0;
	$("#page_main_div").load('html_modules/approve.html',function()
	{	
		document.getElementById('display_module_name').innerHTML = ' Admission Approve ';
		document.getElementById('module_name_for_save').value = 'Admission Approve'; 
		getDefaultHeadFooterLinks('Admission Approve'); 
	
 	$.ajax({
        type: "POST",
	   	url: $host_url+"GetAllSelectDropdown",
		success: function($responce)
		{
			$responce = eval('('+$responce+')');
			 var optionsAsString = "<option value=''> Select College </option>";
			for(var i = 0; i < $responce.data.length; i++)
			{
				if($responce.data[i].internal_code == gsrchColl)
				{
					optionsAsString += "<option value='" + $responce.data[i].internal_code + "' selected>" + $responce.data[i].value + "</option>";
				}
				else
				optionsAsString += "<option value='" + $responce.data[i].internal_code + "'>" + $responce.data[i].value + "</option>";
			}
			$("#appcollege" ).append( optionsAsString ); 
		}
		
  });
	
	$.ajax({
        type: "POST",
		data:'&collcode='+gsrchColl,
	   	url: $host_url+"GetCollegeDegreeDropdown",
		success: function($responceDeg)
		{
			$responceDeg = eval('('+$responceDeg+')');
			 var optionsAsString = "<option value=''> Select College </option>";
			for(var i = 0; i < $responceDeg.data.length; i++)
			{
				if($responceDeg.data[i].internal_code == gsrchDeg)
				{
					optionsAsString += "<option value='" + $responceDeg.data[i].internal_code + "' selected>" + $responceDeg.data[i].value + "</option>";
				}
				else
				optionsAsString += "<option value='" + $responceDeg.data[i].internal_code + "'>" + $responceDeg.data[i].value + "</option>";
			}
			$("#appdegree" ).append( optionsAsString ); 
		}
		});
		
		$.ajax({
			type: "POST",
			//async:false,
			url: $host_url+"getCombinationNames", 
			data:"&degree="+gsrchDeg,
			success:function($responceComb)
			{
				$responceComb = eval('(' +  $responceComb + ')');
				var optionsAsString = "<option value=''> Select Combination </option>";
				for(var i = 0; i < $responceComb.data.length; i++)
				{
					if($responceComb.data[i].internal_code == gsrchComb)
					{
						optionsAsString += "<option value='" + $responceComb.data[i].internal_code + "' selected>" + $responceComb.data[i].value + "</option>";
					}
					else
					optionsAsString += "<option value='" + $responceComb.data[i].internal_code + "'>" + $responceComb.data[i].value + "</option>";
				}
				$("#degcomb" ).append( optionsAsString ); 
			}
			});
		
	
	$("#appr_status").val(gsrchStatus);
	   	
	$.ajax({
        type: "POST",
		data:'&collcode='+gsrchColl+"&degcode="+gsrchDeg
		+"&combcode="+gsrchComb+"&apprstatus="+gsrchStatus,
	   	url: $host_url+"GetAdmissionList",
		success: responceGetAdmissionList
		});
		
	});	
}

function Checkalladmapplication($id)		 
{
	var k;
	if(document.getElementById('arun').checked == true)
	{
		//alert(total);
		for(k=1;k<parseInt(total);k++)
		{
			
			var APPNO = document.getElementById("adm_check_box_"+k).value;
			document.getElementById("adm_check_box_"+APPNO).checked=true;
		}
	}
	else
	{
		for(k=1;k<total;k++)
		{
			var APPNO = document.getElementById("adm_check_box_"+k).value;
			document.getElementById("adm_check_box_"+APPNO).checked=false;
		}
	}
}

function getsubjectappAppearingTotal()
{
 
	if( jQuery.trim($("#student_entry_degree_code").val())!='')
	{
		$sl_no='';
		
		$sl_no=encodeURIComponent(trim($("#student_entry_slno").val()));
		$.ajax({
				type: "POST",
				//async:false,
				url: $host_url+"getAppStudsubApprTotal", 
				data:"degree_code="+encodeURIComponent(trim($("#student_entry_degree_code").val()))+"&exam="+$("#student_entry_exam").val() +"&sl_no="+$sl_no+"&sub_degree="+encodeURIComponent(trim($("#student_entry_sub_degree_code").val()))+"&collcode="+college_code,
				success: subjectAppearingTotalResponse
			});	
	}	
}
function subjectAppearingTotalResponse($responce)
{
	$responce = eval('(' + $responce + ')'); 
	$g_subject_appearing=$responce.data;
	$g_remaining_counter_inc=($responce.data.remaining_count);
	$("#subject_appearing").show();
	$("#subject_appearing").html($responce.data.html);	
}