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.117.119.34


Current Path : /proc/thread-self/root/var/www/html/mum/js/
Upload File :
Current File : //proc/thread-self/root/var/www/html/mum/js/admstuddate.js

function Callstudadmdate()
{
	$("#page_main_div").load('html_modules/admstuddate.html',function()
	{	
		document.getElementById('display_module_name').innerHTML = 'UpdateStudent Admission Date';
		document.getElementById('module_name_for_save').value = 'UpdateStudent Admission Date';
		getDefaultHeadFooterLinks('UpdateStudent Admission Date'); 
		loaddegreeadm();
	});
}


function loaddegreeadm()
{
	$.ajax({
		type: "POST",
		//async:false,
		url: $host_url+"loaddegreeadm", 
		success:function($responce)
		{
			$responce = eval('(' +  $responce + ')');
			if($responce.error_code==0)
			{	
				document.getElementById('appdegree').options.length = 0;
				var $lobj_Option = document.createElement("OPTION");
				$lobj_Option.value = "";
				$lobj_Option.text = "Select Degree";         
				document.getElementById('appdegree').options[0]=($lobj_Option);   
				for($i=0;$i < $responce.data.studdeg.length;$i++)                                  
				{            
					$op = new Option($responce.data.studdeg[$i]['internal_code'] + " - " + $responce.data.studdeg[$i]['value'], $responce.data.studdeg[$i]['internal_code']);
					$op.id=$responce.data.studdeg[$i]['internal_code'];//specifying the id  for options
					document.getElementById('appdegree').options.add($op);
				}
			}
		}
	});
}

function GetCombinationAdm(degree)
{
	$.ajax({
		type: "POST",
		//async:false,
		url: $host_url+"GetCombinationAdm", 
		data:"&degree="+degree,
		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 = "";
				$lobj_Option.text = "Select Degree";         
				document.getElementById('degcomb').options[0]=($lobj_Option);   
				for($i=0;$i < $responce.data.degcomb.length;$i++)                                  
				{            
					$op = new Option($responce.data.degcomb[$i]['internal_code'] + " - " + $responce.data.degcomb[$i]['value'], $responce.data.degcomb[$i]['internal_code']);
					$op.id=$responce.data.degcomb[$i]['internal_code'];//specifying the id  for options
					document.getElementById('degcomb').options.add($op);
				}
			}
		}
	});
}


function admupdatedate()
{

	if($('#appdegree').val() == '')
	{
		alert('Select Degree');
		return;
	}

	if($('#degcomb').val() == '')
	{
		alert('Select Combination');
		return;
	}

	$.ajax({
		type: "POST",
		//async:false,
		url: $host_url+"admupdatedate", 
		data:"&degree="+$('#appdegree').val()+"&degcomb="+$('#degcomb').val(),
		success:function($responce)
		{
			$responce = eval('(' +  $responce + ')');
			if($responce.error_code==0)
			{	
				$("#adm_application_details").html('');
				$("#adm_application_details").show();
				$("#adm_application_details").html($responce.data['admtable']);
			}
		}
	});
}

function saveadmdate()
{

	if($('#appdegree').val() == '')
	{
		alert('Select Degree');
		return;
	}

	if($('#degcomb').val() == '')
	{
		alert('Select Combination');
		return;
	}

	jsonObj = []; 
	$("#admdateupdate input[type=text] ").each(function()
	{
			item = {};
			if($('#h_'+$(this).attr('id')).val() == 'T')
			{	
		        item ["id"] = $(this).attr('id');
		        item ["value"] = $(this).val();
		 		jsonObj.push(item);
		 	}	
	});

	if(jsonObj.length <= 0)
	{
		alert('Admission Date not Modified');
		return;
	}	

	perinfo = encodeURI(JSON.stringify(jsonObj));

	$.ajax({
		type: "POST",
		//async:false,
		url: $host_url+"saveadmdate", 
		data:"&degree="+$('#appdegree').val()+"&degcomb="+$('#degcomb').val()+"&perinfo="+perinfo,
		success:function($responce)
		{
			$responce = eval('(' +  $responce + ')');
			if($responce.error_code==0)
			{	
				alert($responce.data);
				$("#adm_application_details").html('');
				$("#adm_application_details").hide();
			}
			else
			{
				alert($responce.data);
				return;
			}	

		}
	});

}

function admdatechange(id)
{
	$('#h_'+id).val('T');

}