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.135.193.166
var gdegree;
var gservcode;
var gservtype;
var gcollege;
var gfeecode;
var gfee
function Getstudentdetails(event,regno)
{
if(regno.length > 0)
{
//App.blockUI({boxed:true,message:"Please wait,loading data.."});
$.ajax({
type: "POST",
url:$host_url+'getstudentdetails',
data: "regno="+regno,
success: function(responce)
{
responce = eval('(' + responce + ')');
//$.unblockUI();
if(responce.error_code==0)
{
document.getElementById('formcandname').value = responce.data['FNAME'];
document.getElementById('formcollege').value = responce.data['FCOLLNAME'];
document.getElementById('formdegree').value = responce.data['FDESCPN'];
gcollege = responce.data['FCOLLCODE'];
gdegree = responce.data['FDEGREE'];
//document.getElementById("S2").disabled = false;
//document.getElementById("S2").focus();
}
else
{
document.getElementById('T2').value = '';
document.getElementById('T3').value = '';
document.getElementById('T4').value = '';
document.getElementById('HT3').value = responce.data['FCOLLCODE'];
document.getElementById('HT4').value = responce.data['FDEGREE'];
document.getElementById('S2').value = '#';
document.getElementById('S1').value = '#';
alert(responce.data);
}
}
});
}
}
function loadserviceslist(servcode)
{
$("#dyserviceslist tbody tr").html("");
document.getElementById("amount").value = 0;
gservcode = servcode;
var transcript = 'F';
var tranno = 0;
document.getElementById("tranno").value = 0;
$('#transcript').hide();
$('#agencies').hide();
if(servcode == 'KS06')
{
$('#agencies').show();
}
if(servcode == 'KS07')
{
$('#transcript').show();
}
document.getElementById('S8').value = '';
//var tranno = document.getElementById('tranno').value;
$.ajax({
type: "POST",
url:$host_url+'loadserviceslist'+"&servcode="+servcode+"&ldegree="+gdegree,
success: function(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code == 0)
{
if(responce.data['servtype'] == 'single')
{
var servdet = responce.data['services'];
if(servcode != 'KS06')
getservicefee(servdet[0].int_code,responce.data['servtype']);
else
getserviceagenciesfee(servdet[0].int_code);
document.getElementById("cont_serviceslist").innerHTML = responce.data['servtablist'];
document.getElementById("T27").innerHTML = responce.data['servpro'];
gservtype = responce.data['servtype'];
}
else
{
serviceslist = responce.data['services'];
document.getElementById("cont_serviceslist").innerHTML = responce.data['servtablist'];
document.getElementById("T27").innerHTML = responce.data['servpro'];
gservtype = responce.data['servtype'];
var serv_title = '';
$("#dyserviceslist").append(responce.data['servmandatory']);
addservicedet();
}
}
else
{
alert(responce.data);
//document.getElementById("cont_serviceslist").innerHTML = '';
//document.getElementById("amount").innerHTML = 0;
document.getElementById("T27").innerHTML = '';
}
}
});
}
function getservicefee(servcode,rowid)
{
var degree = gdegree;
var datastring = "&feecode="+servcode+"°ree="+degree;
$.ajax({
type: "POST",
url:$host_url+'getservicefee',
data: datastring,
success: function(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code == 0)
{
if(rowid == 'single')
{
document.getElementById("amount").value = (parseInt(responce.data.FFEE)+parseInt(30));
gfeecode = responce.data.FFEECODE
gfee = responce.data.FFEE
}
else
{
document.getElementById(rowid+"GD3").value = responce.data.FFEE;
updatetotalservfee();
}
}
else
{
if(rowid == 'single')
{
document.getElementById("amount").value = 0;
}
else
{
document.getElementById(rowid+"GD3").value = 0;
updatetotalservfee();
}
}
}
});
}
function getserviceagenciesfee(servcode)
{
document.getElementById("amount").value = 0;
var degree = gdegree;
var agencies = document.getElementById('S8').value;
var datastring = "&feecode="+servcode+"°ree="+degree+"&agencies="+agencies;
$.ajax({
type: "POST",
url:$host_url+'getserviceagenciesfee',
data: datastring,
success: function(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code == 0)
{
document.getElementById("amount").value = (parseInt(responce.data.FFEE));
gfeecode = responce.data.FFEECODE
gfee = responce.data.FFEE
}
}
});
}
function addservicedet()
{
if(document.getElementById("S2").value == '#')
{
alert("Select service type");
document.getElementById("S2").focus();
return false;
}
var inputFileds = document.getElementsByTagName('input');
var chkCnt = 0;
var slno = 0;
for (var counter=0; counter < inputFileds.length; counter++)
{
if ( inputFileds[counter].type.toUpperCase()=='HIDDEN' && inputFileds[counter].name == "servicename" )
{
++chkCnt;
if(document.getElementById(chkCnt+'GD4').value == 'F')
++slno;
}
}
/* if(chkCnt != 1)
{
if(document.getElementById(chkCnt+'GD1').value == '#')
{
document.getElementById(chkCnt+'GD1').focus();
return false;
}
} */
var dellink ='';
if(chkCnt!=1)
{
dellink = "<img src='images/Remove-icon.png' />";
}
var curindex = chkCnt+1;
var curslno = slno+1;
var dyrow = '<tbody id="servdet'+curindex+'"><tr>';
dyrow +='<td align="center">'+curslno+'</td>';
dyrow +='<td><input type="hidden" name="servicename" /><select id = "'+curindex+'GD1" class="form-control1" onchange = "getservicefee(this.value,'+curindex+')"></select></td>';
//dyrow += '<td><input type="text" id = "'+curindex+'GD2" value=""/></td>';
dyrow += '<td><input type=text style="width:80px;" id = "'+curindex+'GD3" disabled /></td>';
dyrow += '<td><input type="hidden" id = "'+curindex+'GD4" value="F"/><span onclick ="removeservice('+curindex+')">'+dellink+'</span></td>';
dyrow += '</tr></tbody>';
$("#dyserviceslist").append(dyrow);
var serv_title = '';
FillDropdownValues(serviceslist,curindex+'GD1',serv_title);
}
function removeservice(rowid)
{
if(confirm("Are you sure do you want to remove this details"))
{
$("#servdet"+rowid).hide();
document.getElementById(rowid+"GD4").value = 'T';
updatetotalservfee();
}
}
function updatetotalservfee()
{
document.getElementById("amount").value = 0;
var tranno = document.getElementById("tranno").value;
var servcode = gservcode;
var inputFileds = document.getElementsByTagName('input');
var chkCnt = 0;
var totalamt = 0;
for (var counter=0; counter < inputFileds.length; counter++)
{
if(inputFileds[counter].type.toUpperCase()=='HIDDEN' && inputFileds[counter].name == "servicename" )
{
++chkCnt;
if(document.getElementById(chkCnt+'GD4').value == 'F')
{
totalamt = parseInt(totalamt)+parseInt(document.getElementById(chkCnt+'GD3').value);
}
}
}
if(servcode == 'KS07')
document.getElementById("amount").value = (totalamt+parseInt(30)+(parseInt(tranno)*140));
else
document.getElementById("amount").value = (totalamt+parseInt(30));
}
function SaveApplicationDetails()
{
var myobject;
var ftranscript = 'F';
var ftranscriptno = 0;
var fagencies = '';
fldorder = 'regno,formcandname,formcategory,S2,amount,formmdob,postal1,postal2,postal3,postal4,mobile,email,city,state,country,pincode';
mandfields = 'regno,formcandname,formcategory,S2,amount,formmdob,postal1,postal2,postal3,postal4,mobile,email,city,state,country,pincode';
myobject = onsavevalidate.call(myobject, 999);
if (myobject != 999)
{
document.getElementById(myobject).focus();
return false;
}
var list_data;
var reg_no = encodeURIComponent($("#regno").val());list_data+="®_no="+reg_no;
list_data+="°ree="+gdegree;
list_data+="&college="+gcollege;
var candidate_name = encodeURIComponent($("#formcandname").val());list_data+="&candidate_name="+candidate_name;
var postal1 = encodeURIComponent($("#postal1").val());list_data+="&paddr1="+postal1;
var postal2 = encodeURIComponent($("#postal2").val());list_data+="&paddr2="+postal2;
var postal3 = encodeURIComponent($("#postal3").val());list_data+="&paddr3="+postal3;
var postal4 = encodeURIComponent($("#postal4").val());list_data+="&paddr4="+postal4;
var city = encodeURIComponent($("#city").val());list_data+="&city="+city;
var state = encodeURIComponent($("#state").val());list_data+="&state="+state;
var country = encodeURIComponent($("#country").val());list_data+="&country="+country;
var pincode = encodeURIComponent($("#pincode").val());list_data+="&pincode="+pincode;
var mobile_no = encodeURIComponent($("#mobile").val());list_data+="&mobile_no="+mobile_no;
var emailid = $("#email").val();list_data+="&emailid="+emailid;
var amount = $("#amount").val();list_data+="&amount="+amount;
var dob = $("#formmdob").val();list_data+="&dob="+dob;
var category = $("#formcategory").val();list_data+="&category="+category;
list_data+="&servicetype="+gservcode;
var paytype = $("#S3").val();list_data+="&paytype="+paytype;
var servcode = gservcode;
if(servcode == 'KS06')
{
var fagencies = $("#S8").val();
if(fagencies == '')
{
alert('Select Agencies');
document.getElementById('S8').focus();
return;
}
list_data+="&fagencies="+fagencies;
}
/*
if(document.getElementById('tran').checked == true)
{
var ftranscript = 'T';
var ftranscriptno = $("#tranno").val();
if(ftranscriptno == '')
{
alert(" No. of copy to transcript");
document.getElementById('tranno').focus();
return;
}
list_data+="&ftranscriptno="+ftranscriptno;
list_data+="&ftranscript="+ftranscript;
}
*/
if(servcode == 'KS07')
{
var ftranscriptno = $("#tranno").val();
if(ftranscriptno == '')
{
alert(" No. of copy to transcript");
document.getElementById('tranno').focus();
return;
}
list_data+="&ftranscriptno="+ftranscriptno;
}
var event = document.createEvent('Event');
if(!validateemail(event,emailid))
{
alert('The Email ID format is invalid,the valid Email Id format is name@org.com or name@org.co.in');
document.getElementById('email').focus();
return false;
}
if(category == "#")
{
alert("Select category");
$("#S1").focus();
return false;
}
if(gservtype == "#")
{
alert("Select Application for");
$("#S2").focus();
return false;
}
if(parseInt(amount) == 0)
{
alert("Amount cannot be zero");
$("#S2").focus();
return false;
}
if(paytype == "#")
{
alert("Select Payment mode");
$("#S3").focus();
return false;
}
if(gservtype == 'multiple')
{
var inputFileds = document.getElementsByTagName('input');
var chkCnt = 0;
var rowCnt = 0;
var serv_arr = {};
for (var counter=0; counter < inputFileds.length; counter++)
{
if ( inputFileds[counter].type.toUpperCase() == 'HIDDEN' && inputFileds[counter].name == "servicename" )
{
++rowCnt;
if(document.getElementById(rowCnt+'GD4').value != 'T' && document.getElementById(rowCnt+'GD1').value != '#')
{
serv_arr[chkCnt] = new Object();
serv_arr[chkCnt]['feecode'] = document.getElementById(rowCnt+'GD1').value;
//serv_arr[chkCnt]['examyear'] = document.getElementById(rowCnt+'GD2').value;
serv_arr[chkCnt]['fee'] = document.getElementById(rowCnt+'GD3').value;
++chkCnt;
}
}
}
}
else
{
var serv_arr = {};
serv_arr[0] = new Object();
serv_arr[0]['feecode'] = gfeecode;
serv_arr[0]['examyear'] = '';
serv_arr[0]['fee'] = gfee;
}
if(Object.size(serv_arr) > 0)
{
list_data +="&serv_arr="+encodeURIComponent(JSON.stringify(serv_arr));
$.ajax({
type: "POST",
url:$host_url+'SaveApplicationDetails',
//error:AjaxErrorMessage,
data:list_data,
success:SaveApplicationDetailsResponse
});
/* //document.getElementById("serviceform_module").setAttribute("action",list_data);
//return AIM.submit(document.getElementById("serviceform_module"), 'same_tab',{'onComplete' : CMS.SaveApplicationDetailsResponse});
$.ajax({
type: "POST",
url:$host_url+'ValidatePaymentApplicationData',
//error:AjaxErrorMessage,
data:list_data,
success:SaveApplicationDetailsResponse
}); */
}
}
function SaveApplicationDetailsResponse(responce)
{
responce = eval('(' + trim(responce) + ')');
if (responce.error_code == 0)
{
$('#appForm').addClass("hidden");
$("#appConfirm").removeClass("hidden");
//document.getElementById("form_reg_success").style.display = "block";
//document.getElementById("form_reg_page").style.display = "none";
document.getElementById("APT1").innerHTML = responce.data['appno'];
var paytype = responce.data['paylink'];
var paylink = '';
if(paytype == 'POSTOFFICE')
{
paylink +='<center><span class="btn btn_3 btn-lg btn-info" onclick=PrintPOSTCertifcate("'+responce.data['appno']+'")>Print Acknowledgement</span></center></div></div>';
}
if(paytype == 'DEBIT/CREDIT/NET BANKING')
{
paylink +='<center><span class="btn btn_3 btn-lg btn-info" onclick=MakeOnlinePayment("'+responce.data['appno']+'")>Make Payment</span></center></div></div>';
}
document.getElementById("payment_link").innerHTML = paylink;
}
else
{
alert(responce.data);
return false;
}
}
function PrintPOSTCertifcate(app_no)
{
window.location.href=$host_url+"printapplicationfrom&app_no="+app_no;
}
function MakeOnlinePayment(app_no)
{
window.location.href="payment_gateway.php?productinfo="+app_no+"&cdb="+getCookie("curuniv");
}
function PrintNETBANKCertifcate(app_no)
{
//window.location.href=$host_url+"PrintNetbankCertificate&app_no="+app_no;
window.location.href=$host_url+"printapplicationfrom&app_no="+app_no;
}
function PrintBankchallan(app_no)
{
//window.location.href=$host_url+"PrintNetbankCertificate&app_no="+app_no;
window.location.href=$host_url+"PrintApplicationFormSBM&app_no="+app_no;
}
|