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


Current Path : /var/www/html/tadabills/js/
Upload File :
Current File : /var/www/html/tadabills/js/kusPhdAdm.js

var $host_url="http://"+window.location.host+"/"+window.location.pathname.split('/')[1]+"/"+window.location.pathname.split('/')[2]+"/app.php?a=";

var gRgPerinfo;

function loadMasters()
{
	$('#personal_det').show();
	$('#success_card').hide();
	verify = 1;
	/*$.ajax({
		type: "POST",
		async: false,
		url:$host_url+'getcmsdropdownmenuvalues',
		success: function GetCMSDropDownMenuValuesResponce(responce)
		{
			responce = eval('(' + responce + ')');				
			var serv_arr = responce.data['category'];
			var serv_title = '';
			FillDropdownValues(serv_arr,'category',serv_title);

			var serv_arr = responce.data['degree'];
			var serv_title = '';
			FillDropdownValues(serv_arr,'degree',serv_title);	
		}
	});*/
}

function homeLink()
{
	var r = confirm("Do you want to go to homepage!!!. The entered values will be cleared.");
	if (r == true) {
	    window.location.href = "index.html";
	} else {
		
	}
}


var gSubarray;
function getSubjectDetail()
{
	var degree = $('#degree').val();
	console.log($('#degree').val());
	if($('#degree').val()=='')
	{
		return;
	}
	var datastring = "&degree="+degree;
	
	$.ajax({
		type: "POST",
		data: datastring,
		url: $host_url+'getsubjectdet',
		success: function getsubjectdetResponce(responce)
		{
			responce = eval('(' + responce + ')');	
			$('#subdet').html(responce.data['html']);
			//var arr = $.map(responce.data['subject'], function(el) { return el });
			gSubarray = JSON.stringify(responce.data['subject']);
			console.log(gSubarray);
			$('#idPaperTitle').css('display', 'block');
		}
	});
}

function validateApplication()
{
	console.log("inside submit");
	var errcount = 0;
	jsonObj = [];
	//validate and read values of text and select boxes
	$("#body input[type=text],#body select,#body textarea").each(function(){
		if($(this).val()=="" &&($(this).attr('id') != 'idExp' && $(this).attr('id') != 'idSkills' && $(this).attr('id') != 'idLocality'))
		{
			$(this).closest('.form-group').find('.fieldError').addClass('hasError');
			errcount++;
		}
		else
		{
			$(this).closest('.form-group').find('.fieldError').removeClass('hasError');
			item = {};
	        item ["id"] = $(this).attr('id');
	        item ["value"] = $(this).val().toUpperCase();
	 		jsonObj.push(item);
		}


	});

	/*if (validateemail($('#idEmail').val()) && $('#idEmail').val() != '') 
	{
		$('#email_err').html("Invalid Email Format");
		$(this).closest('.form-group').find('.fieldError').addClass('hasError');
		errcount++;
	}*/
	
	gRgPerinfo = JSON.stringify(jsonObj);
	return errcount;
}

var gAppNo;
function saveApplication(){
	//let error = validateApplication();
	if(validateApplication() > 0)
	{
		swal({
            title: "Fill the Required fields",
            type: "warning",
            showCancelButton: false,
            confirmButtonColor: "#5495ff",
            confirmButtonText: "OK",
            closeOnConfirm: false
        });
		return;
	}
	var datastring =  'personal_info='+gRgPerinfo;
	$.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" });
	$.ajax({
		type: "POST",
		data:datastring,
		url:$host_url+'savephdApplication',
		success: function(responce)
		{
			$.unblockUI();
			var { error_code, data } = JSON.parse(responce);
			var { message } = data;
			if(error_code === -1)
			{	
			}	
			else
			{
				var { app_no } = data;
				$('#dapp_no').append(app_no);
			}
			$('#app_msg').append(message);
			$('#personal_det').hide();
			$('#success_card').show();
		}	
	});
}

function FillDropdownValues(arr,ele_name,def_title)
{
	document.getElementById(ele_name).options.length=0;
	if(ele_name == 'S4')
	{
		var op1 = new Option('  All  '+def_title, 'all');
		op1.id='00';
		op1.selected = 'selected';
		document.getElementById(ele_name).options.add(op1);
	}
	var option = "<option value=''>--Select--</option>";
	for (let value of arr) {
		option += "<option value='"+value.int_code+"'>"+value.val+"</option>";
	} 
	$("#"+ele_name).append(option);
}

function validateemail(emailid)
{
	var atpos = emailid.indexOf("@");
	var dotpos = emailid.lastIndexOf(".");
	
	if (atpos<1 || dotpos<atpos+2 || dotpos+2>=emailid.length)
		return false;
	else
		return true;	
}

function acceptNumbersOnlyForModule(evt)
{
	var charCode;
    if (window.event)
        charCode = window.event.keyCode;   //if IE
    else
        charCode = evt.which; //if firefox
    if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;
    return true;	
}

function acceptDecimalsOnlyForModule(evt, obj)
{
	var charCode = (evt.which) ? evt.which : event.keyCode
    var value = obj.value;
    var dotcontains = value.indexOf(".") != -1;
    if (dotcontains)
        if (charCode == 46) return false;
    if (charCode == 46) return true;
    if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;
    return true;	
}

function charKeydown(evt){
	var charCode;
    if (window.event)
        charCode = window.event.keyCode;  //for IE
    else
        charCode = evt.which;  //for firefox
    if (charCode == 32) //for &lt;space&gt; symbol
        return true;
    if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
        return false;
    if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
        return false;
    if (charCode > 122) //for characters beyond 'z' in ASCII Table
        return false;
    return true;
}

function autoFilladd()
{
	if($('#basic_checkbox_1').is(':checked'))
	{
		$('#cadd1').val($('#padd1').val());
		$('#cadd2').val($('#padd2').val());
		$('#cadd3').val($('#padd3').val());
		$('#cdistrict').val($('#pdistrict').val());
		$('#cpincode').val($('#ppincode').val());
		$('#cstate').val($('#pstate').val());
	}
	else
	{
		$('#cadd1').val('');
		$('#cadd2').val('');
		$('#cadd3').val('');
		$('#cdistrict').val('');
		$('#cpincode').val('');
		$('#cstate').val('');
	}
}


function makePayment()
{
	window.location.href="Paytm/pgRedirect.php?productinfo="+gAppNo;
}

function PrintApplicationFormpaytmNETBANKING(pAppNo)
{
	$host_url = "http://oasis.logisys.org/kus/phdadm/app.php?&a=";
	window.location.href=$host_url+"PrintApplicationFormSBM&app_no="+pAppNo;
}