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


Current Path : /proc/thread-self/root/var/www/html/gcg/adm/js/
Upload File :
Current File : //proc/thread-self/root/var/www/html/gcg/adm/js/appStatus.js

var prevappno;


function getDetails()
{
	var lstatus = $('#status').val();
	var lfromdate = $("#fromdate").val();
	var ltodate = $("#todate").val();
	var lfromroll = $("#fromroll").val();
	var ltoroll = $("#toroll").val();
	var lservcode = $("#S4").val();
	var lpaystatus = $('#paystatus').val();
	if(lstatus == '')
	{
		alert("Select the Status");
		return;
	}

	if(lfromdate == '' || ltodate == '')
	{
		alert("Enter Date Range");
		return;
	}
	
	if(lfromroll == '' || ltoroll=='')
	{
		alert("Enter Reg. No. Range");
		return;
	}

	if(lservcode=='')
	{
		alert("Select Application for");
		return;
	}

	if(lpaystatus=='')
	{
		alert("Select Payment Status");
		return;
	}

	var datastring = "&status="+lstatus+"&fromdate="+encodeURIComponent(lfromdate)+
	"&todate="+encodeURIComponent(ltodate)+"&paystatus="+lpaystatus+
	"&fromroll="+lfromroll+"&toroll="+ltoroll+"&servcode="+lservcode;
	//alert(datastring);

	$.ajax({
		type: "POST",
		url: $host_url+"getApplicationDetails",
		data:datastring,
		success:showApplicationDetails
	});
}

function exportPdfReport()
{
	var lstatus = $('#status').val();
	var lfromdate = $("#fromdate").val();
	var ltodate = $("#todate").val();
	var lfromroll = $("#fromroll").val();
	var ltoroll = $("#toroll").val();
	var lservcode = $("#S4").val();
	var lpaystatus = $('#paystatus').val();
	if(lstatus == '')
	{
		alert("Select the Status");
		return;
	}

	if(lfromdate == '' || ltodate == '')
	{
		alert("Enter Date Range");
		return;
	}
	
	if(lfromroll == '' || ltoroll=='')
	{
		alert("Enter Reg. No. Range");
		return;
	}

	if(lservcode=='')
	{
		alert("Select Application for");
		return;
	}

	if(lpaystatus=='')
	{
		alert("Select Payment Status");
		return;
	}
	window.location.href=$host_url+"ExportApplicationStatus&&status="+lstatus+
	"&fromdate="+encodeURIComponent(lfromdate)+
	"&todate="+encodeURIComponent(ltodate)+"&paystatus="+lpaystatus+
	"&fromroll="+lfromroll+"&toroll="+ltoroll+"&servcode="+lservcode;
	//var datastring = "&status="+lstatus+"&fromdate="+encodeURIComponent(lfromdate)+
	//"&todate="+encodeURIComponent(ltodate)+"&paystatus="+lpaystatus+
	//"&fromroll="+lfromroll+"&toroll="+ltoroll+"&servcode="+lservcode;
}

function showApplicationDetails($responce)
{
	$responce = eval('('+$responce+')');
	if($responce.status == 'success')
	{
		$("#statusDetl").removeClass("hidden");
		$( "#trecords" ).empty();
		$('#trecords').append($responce.data['table']);
	}
	else
	{
		$( "#trecords" ).empty();
		alert("No Records Found");
	}
}

function loadStudDet(appno)
{
	var lappno = appno;
	$('#tr'+prevappno).removeClass('bg-light-green')
	prevappno = lappno;
	$('#tr'+lappno).addClass('bg-light-green');

	$.ajax({
			type: "POST",
			url:$host_url+'getStudentDetl',
			data:"&appno="+lappno,
			success:showStudentDetails
		});

}

function showStudentDetails($responce)
{
	$responce = eval('('+$responce+')');
	if($responce.error_code == 0)
	{
		$( "#idModal2" ).empty();
		$("#idModal2").append($responce.data['html']);
		$('#idModal1').modal();
	}
	else
	{
		alert($responce.status);
	}
}

function saveChanges()
{
	var lappno = $("#appno1").val();
	var lremarks = $('#remarks1').val();
	var lstatus = $('#status1').val();

	if (lremarks == "")
	{
		alert("Enter Remarks");
		$('#remarks1').focus();
		return;
	}

	var datastring = "&appno="+lappno+"&remarks="+lremarks+"&status="+lstatus;

	$.ajax({
		type: "POST",
		url: $host_url+"saveVerificationDetails",
		data:datastring,
		success:showChanges
	});
}

function showChanges($responce)
{
	var today = getDate();
	var lappno = $("#appno1").val();
	var lstatus = $('#status1').val();
	$responce = eval('('+$responce+')');
	if($responce.status == 'success')
	{
		alert("Updated Successfully");
		$('#'+lappno).html(lstatus);
		$('#date'+lappno).html(today);
		$('#idModal1').modal('toggle'); 
	}
	else
	{
		alert("Error while Updating..!");
	}
	

}

function getDate()
{
	var today = new Date();
	var dd = today.getDate();
	var mm = today.getMonth()+1; //January is 0!

	var yyyy = today.getFullYear();
	if(dd<10){
	    dd='0'+dd;
	} 
	if(mm<10){
	    mm='0'+mm;
	} 
	var today = dd+'/'+mm+'/'+yyyy;
	return today;
}

function printMailAdd(appno)
{
	alert(appno);
}