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


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

function calldeleteadmdata()
{
    $("#page_main_div").load('html_modules/adm_delete_data.html?v=22092018',function(){
		document.getElementById('display_module_name').innerHTML = 'Delete Admission Data';
		document.getElementById('module_name_for_save').value = 'Delete Admission Data';
		getDefaultHeadFooterLinks('Delete Admission Data'); 
		loadAdmDegree();
		//admdeletedata();
	}); 		
}

function loadAdmDegree()
{
	$.ajax({
	type: "POST",
	async: false,
	url: $host_url+"loaddegree", 
	success: function loaddegreeResponce($responceCat)
	{
		try
		{
			$responceCat = eval('(' +  $responceCat + ')');
			if($responceCat.error_code==0)
			{	
				var optionsAsString = "<option value=''>--Select Degree--</option>";
				for(var i = 0; i < $responceCat.data.length; i++)
				{
					optionsAsString += "<option value='" + $responceCat.data[i].internal_code + "'>" + $responceCat.data[i].internal_code +"-"+ $responceCat.data[i].value + "</option>";
				}

				$("#adm_degree" ).append( optionsAsString );
			
			}
			
		}	
		catch(err)
		{
			txt= err.message;
			$.unblockUI();
		
		}	
	}
	});	
}

var gdeldegree = '';
var gdelstatus = '';

function admdeletedata()
{

	var adm_degree = $("#adm_degree").val();

	var status = $("#status").val(); 

	if(empty(adm_degree))
	{
		alert("Please Select Degree");
		$("#adm_degree").focus();
		return false;
	}
	gdeldegree = adm_degree;
	gdelstatus = status;
	var parameters = `&degree=${$("#adm_degree").val()}
						&status=${$("#status").val()}`;
	$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>" });					
	$.ajax({
        type: "POST",
		data: parameters,
	   	url: $host_url+"DisplayDeleteStudent",
		success:admdeletedataResponse
  	});
	
}

function admdeletedataResponse($responce)
{
	$responce = eval('('+$responce+')');
	$.unblockUI();
	$("#adm_applications").html("");
	$("#adm_applications").html($responce.data['html']);
}


function DeleteStudent(appno,mob)
{
	var r = confirm("Are you sure you want to delete?");

	if(r)
	{	
		$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>" });
		$.ajax({
			type: "POST",
			//async:false,
			url: $host_url+"DeleteStudent", 
			data:"appno="+appno+"&mob="+mob,
			success: DeleteStudentResponse
		});
	}

}

function DeleteStudentResponse(responce)
{

	responce = eval('(' + responce + ')');
	$.unblockUI();
	if(responce.error_code === -1)
	{	
		alert(responce.data);
		return;
	}	
	else
	{
		alert(responce.data.msg);
		admdeletedataclr();
		return;
	}

}

function admdeletedataclr()
{

	var parameters = `&degree=${gdeldegree}
						&status=${gdelstatus}`;
	$.ajax({
        type: "POST",
		data: parameters,
	   	url: $host_url+"DisplayDeleteStudent",
		success:admdeletedataResponse
  	});
	
}


function onlyAlphabets(e, t) 
{
    try 
    {
        var charCode = e.which || e.keyCode;
        if ((charCode > 47 && charCode < 58) || (charCode > 64 && charCode < 91) || (charCode > 96 && charCode < 123) || charCode == 32 || charCode == 190 || charCode == 8  || charCode == 188  || charCode == 9  || charCode == 46  || charCode == 35  || charCode == 36|| charCode == 44)
		{
            return true;
		}
        else
        {
            return false;
        }
    }
    catch (err) 
    {
        alert(err.Description);
    }
        
}