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 : 18.227.46.87


Current Path : /var/www/html/sikkim/js/
Upload File :
Current File : /var/www/html/sikkim/js/subjectfreez.js

function LoadfreezeSubject()
{ 
	$("#page_main_div").load('html_modules/subjectfreez.html',function()
	{	
 
	document.getElementById('display_module_name').innerHTML = 'Freeze Subject';
	document.getElementById('module_name_for_save').value = 'Freeze Subject';	 	
	getDefaultHeadFooterLinks("Freeze Subject");
	}
	);
}

function displayDatesDetails()
{
	if(trim(document.getElementById('fcollcode').value) == '' )
	{
		alert('Please enter the College Code');
		$("#fcollcode").focus();
		return;
	}
	if(trim(document.getElementById('fdegree').value) == '' )
	{
		alert('Please enter the degree Code');
		$("#fdegree").focus();
		return;
	}
	if(trim(document.getElementById('fexamno').value) == '' )
	{
		alert('Please enter the examno Code');
		$("#fexamno").focus();
		return;
	}
	
	$.ajax({
	type: "POST",
	data:"&degree="+$("#fdegree").val()+"&exam_no="+$("#fexamno").val()+"&college="+$("#fcollcode").val(),
	url: $host_url+"getfreezsubject.demo",
	success: getFmacasSubjectDetailsResponce
	});
	

}

function getFmacasSubjectDetailsResponce($responce)
{
		$responce = eval('(' + $responce + ')');		 
		if($responce.error_code==0)
		{
			$("#fmacas_module_subject_data").show();
			$("#fmacas_module_subject_data").html("");
			$("#fmacas_module_subject_data").html($responce.data.html_data);
			$g_fmacas_total_row_count = $responce.data.total_count;
			$g_fmacas_org_rem_sub = $responce.data.rem_sub;
			$g_fmacas_rem_sub = $responce.data.rem_sub; 
			
		}
		else
		{
			alert('No Details Found For Given Data');
			document.getElementById('fcollcode').value = '';
			document.getElementById('fdegree').value = '';
			document.getElementById('fexamno').value = '';
			document.getElementById('fcollcode').focus();
		}
}

function savefreezeSubject()
{
	if(trim(document.getElementById('fcollcode').value) == '' )
	{
		alert('Please enter the College Code');
		$("#fcollcode").focus();
		return;
	}
	if(trim(document.getElementById('fdegree').value) == '' )
	{
		alert('Please enter the Degree Code');
		document.getElementById('fdegree').focus();
		return;
	}
	if(trim(document.getElementById('fexamno').value) == '' )
	{
		alert('Please enter the Examno Code');
		document.getElementById('fexamno').focus();
		return;
	}	
		$checked_subjects = '';
		$unchecked_subjects = '';
	    $arr  = new Object();	
		for($k=0;$k<$g_fmacas_total_row_count;$k++)   
		{			 			
			if(document.getElementById("fmacas_FCSTATUS_check_"+$k).checked != document.getElementById("fmacas_FCSTATUS_checkH_"+$k).checked)
			{
				if(document.getElementById("fmacas_FCSTATUS_check_"+$k).checked)
					$checked_subjects += trim($("#fmacas_FSUBCODE_"+$k).html())+'*';
				if(!document.getElementById("fmacas_FCSTATUS_check_"+$k).checked)
					$unchecked_subjects += trim($("#fmacas_FSUBCODE_"+$k).html())+'*'; 
				
			}			
		}

		 $g_fmacas_rem_sub =$checked_subjects;
		 $.ajax({
			        type: "POST",
					data:"degree="+$("#fdegree").val()+"&exam_no="+document.getElementById('fexamno').value+"&rem_sub="+$g_fmacas_rem_sub+"&rem_unsub="+$unchecked_subjects+"&collcode="+document.getElementById('fcollcode').value,
				   	url: $host_url+"savefreezeSubject.demo",
					success: savefreezeSubjectResponce
				});	 
			
}

function savefreezeSubjectResponce($responce)
{
	$responce = eval('(' + $responce + ')');
	alert($responce.data);
	document.getElementById('fmacas_module_subject_data').innerHTML = '';
	
}

function checkAllFamuFcSubjects($id)		 
{
 
	if(document.getElementById($id).checked)
	{
		for($k=0;$k<$g_fmacas_total_row_count;$k++)
		{
		document.getElementById("fmacas_FCSTATUS_check_"+$k).checked=true;
		}
	}
	else
	{
		for($k=0;$k<$g_fmacas_total_row_count;$k++)
		{
		document.getElementById("fmacas_FCSTATUS_check_"+$k).checked=false;
		}
	}
}

function to_upperx(id)
	{	
		var x = document.getElementById(id).value;
		document.getElementById(id).value = x.toUpperCase();
	}