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
Apache
: 172.26.7.228 | : 18.217.10.152
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
oasis /
aiet /
adm /
js /
[ HOME SHELL ]
Name
Size
Permission
Action
MainPageCompressed.js
341.08
KB
-rwxr-xr-x
admin.js
15.25
KB
-rwxr-xr-x
advanced-form-elements.js
5.41
KB
-rwxr-xr-x
compressed.js
440.45
KB
-rwxr-xr-x
control.js
18.43
KB
-rwxr-xr-x
demo.js
3.33
KB
-rwxr-xr-x
forgot-password.js
3.24
KB
-rwxr-xr-x
form_submit.js
1.3
KB
-rwxr-xr-x
helpers.js
576
B
-rwxr-xr-x
kusPhdAdm.js
63.8
KB
-rwxr-xr-x
kusPhdAdm_19082019.js
45.44
KB
-rwxr-xr-x
kusPhdAdm_24092018.js
29.74
KB
-rwxr-xr-x
kusPhdAdm_29122018.js
45.47
KB
-rwxr-xr-x
login.js
478
B
-rwxr-xr-x
script.js
3
B
-rwxr-xr-x
sign-in.js
4.29
KB
-rwxr-xr-x
sign-up.js
6.24
KB
-rwxr-xr-x
upload.js
5.62
KB
-rwxr-xr-x
validate.js
9.29
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : kusPhdAdm.js
// var $host_url = // "https://" + // window.location.host + // "/" + // window.location.pathname.split("/")[1] + // "/" + // window.location.pathname.split("/")[2] + // "/app.php?a="; // var $host_url1 = // "https://" + // window.location.host + // "/" + // window.location.pathname.split("/")[1] + // "/"; if (location.protocol != "https:") { var protocol = "http://"; } else { var protocol = "https://"; } var urlarr = window.location.pathname.split("/"); var $url = protocol + window.location.host + "/"; var $host_url1 = ""; for (var j = 1; j < urlarr.length - 1; j++) { $host_url1 += window.location.pathname.split("/")[j] + "/"; } $host_url = $url + $host_url1 + "app.php?a="; $host_url1 = $url + window.location.pathname.split("/")[1]; var $photo_url = "https://university-student-photos.s3.ap-south-1.amazonaws.com/"; var $doc_url = "https://admission-certificates.s3.ap-south-1.amazonaws.com/"; var gRgPerinfo; var photo_path; var sign_path; let subdet = []; let rgMultiMarks = []; const months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ]; // For loading the personal data of student in instruction page function loadPerdata() { $.ajax({ type: "POST", async: false, url: $host_url + "getstudentdetails", success: function getStudPerdataResponce(responce) { responce = eval("(" + responce + ")"); response = responce.data; console.log(response); if (response.ffinsub == "T") { $("#admEnt").hide(); $("#msg").html("<center>" + response.msg + "</center>"); } if (response.mobile == "T" || response.lastdate == "T") { $("#admEnt").hide(); $("#msg").html("<center>" + response.msg + "</center>"); } var perdata = `<tr> <td colspan="3" ><b>Hi, ${response.fname}</b></td> </tr> <tr> <td width="15%">College</td><td width="2%"> : </td> <td width="68%"> <b>${response.college}</b></td> </tr> <tr> <td>Degree</td><td width="2%"> : </td> <td><b> ${response.fdegree}</b> </td> </tr> <tr> <td>Mobile Number</td><td width="2%"> : </td> <td><b>${response.fmobileno}</b></td> </tr> <tr> <td>Email Id</td><td width="2%"> : </td> <td><b>${response.femail}</b> </td> </tr> `; $("#studinfo").html(perdata); $("#femail").val(response.femail); }, }); } { /* <tr> <td>PU Board</td><td width="2%"> : </td> <td><input name="PU" type="radio" value="T" class = "demo-radio-button radio-con-red" checked = "true" style = "background-color:#eee !important" onchange = "getpudet()" id="kpu" autocomplete="off"/> <label for="kpu">Karnataka PU Board</label> <input name="PU" class = "radio-con-red" type="radio" value="F" onchange = "getpudet()" id="npu" style = "padding-left:10px;background-color:#eee !important" autocomplete="off"/> <label for="npu">Other PU Board</label></td> </tr> <tr id = "pureg"> <td>Reg. no. / Student No. </td><td width="2%"> : </td> <td><input type = "text" class="form-control" style = "width:300px;" id = 'puregno'> </td> </tr> */ } function getpudet() { if (document.getElementById("kpu").checked == false) { $("#pureg").hide(); } else { $("#pureg").show(); } } function getadmissonDet() { // if (document.getElementById("kpu").checked == false) { window.location.href = "MainPage.html"; // } else { // if ($("#puregno").val() == "") { // alert("Please Enter Register no."); // $("#puregno").focus(); // return; // } // window.location.href = "MainPage.html"; // } } var deggrp = ""; function loadMasters() { login(); $("#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 states = [ "Andhra Pradesh", "Arunachal Pradesh", "Assam", "Bihar", "Chhattisgarh", "Goa", "Gujarat", "Haryana", "Himachal Pradesh", "Jammu and Kashmir", "Jharkhand", "Karnataka", "Kerala", "Madhya Pradesh", "Maharashtra", "Manipur", "Meghalaya", "Mizoram", "Nagaland", "Odisha", "Punjab", "Rajasthan", "Sikkim", "Tamil Nadu", "Telangana", "Tripura", "Uttar Pradesh", "Uttarakhand", "West Bengal", "Andaman and Nicobar Islands", "Chandigarh", "Dadra and Nagar Haveli", "Daman and Diu", "Lakshadweep", "National Capital Territory of Delhi", "Puducherry (Pondicherry)", ]; var state_options = '<option value="">--Select--</option>'; states.forEach(function (state) { state_options += `<option value="${state}">${state}</option>`; }); $(".selstate").html(state_options); $("#cstate").html(state_options); $("#pstate").html(state_options); $("#cstate").val("Karnataka"); $("#pstate").val("Karnataka"); $("#stuMobileno").val(responce.data.fmobileno); $("#idDob").val(responce.data.fdob); $("#fstudidno").val(responce.data.studidno); var gender = responce.data.perdetl["gender"]; if (gender != "") { var $radios = $("input:radio[name=gender]"); $radios.filter("[value=" + gender + "]").prop("checked", true); } console.log(responce.data); if (responce.data.degree[0].fdeggrp == "PG") { $("#idpgdet").show(); $("#fenttit").text( "D. Details of Entrance test written by the students" ); } else { $("#fenttit").text( "C. Details of Entrance test written by the students" ); } // else $("#idpgdet").hide(); var fph = responce.data.perdetl["fph"]; if (fph == "Yes") document.getElementById("fph").checked = true; else document.getElementById("fph").checked = false; var month_options = '<option value="">--Select--</option>'; months.forEach(function (month) { month_options += `<option value="${month}">${month}</option>`; }); $(".month").html(month_options); var option = '<option value="">--Select--</option>'; var d = new Date(); var year = d.getFullYear(); for (var j = year; j > 1980; j--) { option += "<option value='" + j + "'>" + j + "</option>"; } $(".year").append(option); var serv_arr = responce.data["category"]; var serv_title = ""; FillDropdownValues(serv_arr, "idCategory", serv_title); //loadUpload(); var serv_arr = responce.data["college"]; var serv_title = ""; FillDropdownValues(serv_arr, "idCollege", serv_title); /*var serv_arr = responce.data['boards']; var serv_title = ''; FillDropdownValues(serv_arr,'idUnvName',serv_title);*/ deggrp = responce.data.degree[0].fdeggrp; var serv_arr = responce.data["degree"]; var serv_title = ""; FillDropdownValues(serv_arr, "idDegree", serv_title); if (responce.data.percnt > 0) { console.log("ENTER", responce.data); var datastring = "&college=" + responce.data.perdetl["idCollege"]; if ( responce.data.perdetl["idNationality"] != "NRI" && responce.data.perdetl["idNationality"] != "Indian" ) { var postport = `<div class="col-md-5"> <b>Domicile Country<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> Domicile Country </span> <div class="form-line"> <input type="text" name="Domicile Country" id="fdomCountry" class="form-control" placeholder="Domicile Country" maxlength="50" autocomplete="off"> </div> </div> </div> <div class="col-md-5 col-md-offset-1 p-r-30"> <b>Domicile State<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> Domicile State </span> <div> <input type="text" name="Domicile State" id="fdomstate" class="form-control" placeholder="Domicile State" maxlength="50" autocomplete="off"> </div> </div> </div> <div class="col-md-5"> <b>Passport Number<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> Passport Number </span> <div> <input type="text" name="Passport Number" id="fpassportno" class="form-control" placeholder="Passport Number" maxlength="8" autocomplete="off"> </div> </div> </div> <div class="col-md-5 col-md-offset-1 p-r-30"> <b>PP Expiry Date<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> PP Expiry Date </span> <div class="form-line daterange"> <input type="text" id="fppexpirydate" class="form-control date" name="PP Expiry Date" placeholder="dd/mm/yyyy" autocomplete="off"> </div> </div> </div>`; let vise = `<div class="col-md-5"> <b>Visa Number<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> Visa Number </span> <div class="form-line"> <input type="text" name="Visa Number" id="fvisaNo" class="form-control" placeholder="Visa Number" maxlength="50" autocomplete="off"> </div> </div> </div> <div class="col-md-5 col-md-offset-1 p-r-30"> <b>Visa Expiry<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> Visa Expiry </span> <div class="form-line daterange"> <input type="text" id="fvisaExp" class="form-control date" name="Visa Expiry" placeholder="dd/mm/yyyy" autocomplete="off"> </div> </div> </div> <div class="col-md-5"> <b>EFRRO Number<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> EFRRO Number </span> <div> <input type="text" name="EFRRO Number" id="fefrroNo" class="form-control" placeholder="EFRRO Number" onkeypress="return acceptNumbersOnlyForModule(event);" autocomplete="off"> </div> </div> </div> <div class="col-md-5 col-md-offset-1 p-r-30"> <b>EFRRO Expiry<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> EFRRO Expiry </span> <div class="form-line daterange"> <input type="text" id="fefrroexpdate" class="form-control date" name="EFRRO Expiry" placeholder="dd/mm/yyyy" autocomplete="off"> </div> </div> </div>`; $("#passportId").html(postport); $("#visaId").html(vise); } var datastring = "&college=" + responce.data.perdetl["idCollege"] + "°ree=" + responce.data.perdetl["idDegree"]; if (responce.data.perdetl["studphoto"] != "") { photo_path = responce.data.perdetl["studphoto"]; $("#frmFileUpload").hide(); $("#studphoto_img").attr( "src", $photo_url + responce.data["funivcode"] + "/" + responce.data.perdetl["studphoto"] ); $("#studphoto").show(); } if (responce.data.perdetl["studsign"] != "") { sign_path = responce.data.perdetl["studsign"]; $("#signatureUpload").hide(); $("#studsign_img").attr( "src", $photo_url + responce.data["funivcode"] + "/" + responce.data.perdetl["studsign"] ); $("#studsign").show(); } $("#idPerDet input[type=text],#idPerDet select").each(function () { if ( $(this).attr("id") != "stuMobileno" && $(this).attr("id") != "idDob" ) $(this).val(responce.data.perdetl[$(this).attr("id")]); }); $( "#idPrevDet input[type=text],#idPrevDet select,#idPrevDet textarea" ).each(function () { $(this).val(responce.data.perdetl[$(this).attr("id")]); }); $("#fappno").val(responce.data.perdetl["fappno"]); $("#fstudidno").val(responce.data.studidno); loadedituploads( responce.data.perdetl["idDegree"], responce.data.perdetl["idCollege"], responce.data.perdetl["fappno"] ); $("#idDegree").val(responce.data.fdegree); loadpgmarks( responce.data.perdetl["idDegree"], responce.data.perdetl["idCollege"], responce.data.perdetl["fappno"] ); } else { $("#pgmarks").hide(); if (deggrp != "UG") { $("#pgmarks").show(); } let degree = responce.data.degree[0].int_code; loaduploads(degree); $("#idCollege").val(responce.data.fcollcode); $("#idDegree").val(responce.data.fdegree); $("#fstudidno").val(responce.data.studidno); $("#idStudname").val(responce.data.fname); //$("#idDegComb").val(responce.data.fcombcode); $("#idCategory").val(responce.data.fcaste); // loadSubjectCombdet(); $("#idDegComb").val(responce.data.fcombcode); // getFeestr(); loadSubjectdet(); } }, }); } function changePhoto() { $("#frmFileUpload").show(); $("#studphoto").hide(); } function changeSign() { $("#signatureUpload").show(); $("#studsign").hide(); } function getBoardDet(obj) { if (obj.value == "") { alert("Select a Board"); return; } var datastring = "boardCode=" + obj.value; $.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" }); $.ajax({ type: "POST", async: false, data: datastring, url: $host_url + "getboarddetails", success: function GetdegreedetailsResponce(responce) { $.unblockUI(); responce = eval("(" + responce + ")"); var boardDet = responce.data["boardDet"]; if (obj.id == "idSchBoard") { $("#idSchState").val(boardDet["fboardsate"]); $("#idSchBoardAdd").val(boardDet["faddress"]); $("#idSchoolBoardPhone").val(boardDet["fphoneno"]); } else { $("#idUnvState").val(boardDet["fboardsate"]); $("#idUnvAdd").val(boardDet["faddress"]); $("#idUnvPhone").val(boardDet["fphoneno"]); } }, }); } function getdegreedetails() { var datastring = "&college=" + $("#idCollege").val(); $.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" }); $.ajax({ type: "POST", async: false, data: datastring, url: $host_url + "getdegreedetails", success: function GetdegreedetailsResponce(responce) { $.unblockUI(); responce = eval("(" + responce + ")"); console.log(responce); var serv_arr = responce.data["degree"]; var serv_title = ""; FillDropdownValues(serv_arr, "idDegree", serv_title); }, }); } function loadSubjectCombdet() { var datastring = "&college=" + $("#idCollege").val() + "°ree=" + $("#idDegree").val() + "&fcombcode=" + $("#idDegComb").val(); $.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" }); $.ajax({ type: "POST", async: false, data: datastring, url: $host_url + "getcombinationdetailsdetails", success: function GetdegreedetailsResponce(responce) { $.unblockUI(); responce = eval("(" + responce + ")"); var serv_arr = responce.data["mascomb"]; var serv_title = ""; FillDropdownValues(serv_arr, "idDegComb", serv_title); }, }); } function calcPercent() { if ($("#maxmarks").val() == "") { alert("Enter Maximum Marks"); return; } if ($("#secmarks").val() == "") { alert("Enter Secured Marks"); return; } $("#percentage").val( ( (parseFloat($("#secmarks").val()) * 100) / parseFloat($("#maxmarks").val()) ).toFixed(2) ); } var totsub; function loadpgmarks(degree, collcode, appno) { var datastring = "°ree=" + degree + "&collcode=" + collcode + "&appno=" + appno; $.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" }); $.ajax({ type: "POST", async: true, data: datastring, url: $host_url + "loadpgmarks", success: function loadpgmarksResponce(responce) { $.unblockUI(); responce = eval("(" + responce + ")"); if (responce.error_code == 0) { var prmarksarr = responce.data.pgmarks; if (prmarksarr.length == 0) return; var trRow = ""; for (let i in prmarksarr) { var rowIncrId = parseInt(i) + 1; var obj = prmarksarr[i]; trRow += `<tr id = "${rowIncrId}" class='ui-widget-content jqgrow'> <td class='tbl_row_new tdfirst'>${rowIncrId}.</td> <td class='tbl_row_new'> <input type="text" name="subsem1_${rowIncrId}" value = "${obj.fsubname}" id = "subsem1_${rowIncrId}" style="max-width: 200px !important;"> <input type="hidden" name="subcode_${rowIncrId}" id = "subcode_${rowIncrId}" value="S0${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subsem1mo_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" value = "${obj.fsecmarksa}" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem1mo_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subsem1mm_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" value = "${obj.fmaxmarksa}" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem1mm_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem2mo_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" value = "${obj.fsecmarksb}" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem2mo_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subsem2mm_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" value = "${obj.fmaxmarksb}" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem2mm_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem3mo_${rowIncrId}" value = "${obj.fsecmarksc}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem3mo_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem3mm_${rowIncrId}" value = "${obj.fmaxmarksc}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem3mm_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem4mo_${rowIncrId}" value = "${obj.fsecmarksd}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem4mo_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem4mm_${rowIncrId}" value = "${obj.fmaxmarksd}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem4mm_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem5mo_${rowIncrId}" value = "${obj.fsecmarkse}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem5mo_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subsem5mm_${rowIncrId}" value = "${obj.fmaxmarkse}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem5mm_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem6mo_${rowIncrId}" value = "${obj.fsecmarksf}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem6mo_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem6mm_${rowIncrId}" value = "${obj.fmaxmarksf}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem6mm_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subtotalmo_${rowIncrId}" value = "${obj.ftotsecmarks}" maxlength="4" readonly onkeypress="return acceptNumbersOnlyForModule(event);" id = "subtotalmo_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subtotalmm_${rowIncrId}" value = "${obj.ftotmaxmarks}" maxlength="4" readonly onkeypress="return acceptNumbersOnlyForModule(event);" id = "subtotalmm_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subpercentagemm_${rowIncrId}" maxlength="5" readonly value = "${obj.fsubpercent}" onkeypress="return acceptNumbersOnlyForModule(event);" style="max-width: 70px !important;" id = "subpercentagemm_${rowIncrId}"> </td> <td class='tbl_row_new'> <span onclick="adddyrow()"> <img src='img/add.png' style="width:19px; height:17px;"> </span> <span onclick="removedyrow('${rowIncrId}')"> <img src='img/remove.png' style="float: right;width:19px;height:19px;"> </span> </td> </tr>`; } $("#qalsemdet tbody").html(trRow); } }, }); } function loadSubjectdet() { var datastring = "°ree=" + $("#idDegree").val() + "&combcode=" + $("#idDegComb").val(); $.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" }); $.ajax({ type: "POST", async: true, data: datastring, url: $host_url + "loadSubjectdet", success: function loadSubjectdetResponce(responce) { $.unblockUI(); responce = eval("(" + responce + ")"); var subtable = `<style type = "text/css"> .table-sub tbody tr td { padding : 2px; vertical-align:middle; border: 1px solid #949494; text-align: center; } .table-sub thead tr td { text-align: center; } </style> <table class='table table-bordered table-striped table-sub'> <thead> <tr class = "bg-cyan"> <td style = "width :10%">Sl. No.</td> <td style = "width : 15%;" >Sub. Code</td> <td style = "width : 75%;">Subject Name</td> </tr> </thead> <tbody>`; totsub = responce.data["totsub"]; var mresults = responce.data["mresults"]; var rresults = responce.data["rresults"]; var rresults_arr = responce.data["rresults"]; var mtotalsub = responce.data["mtotalsub"]; //var rresults = rresults['subname']; var remainsub = totsub - mtotalsub; subject_options = '<option value="">--Select Subject--</option>'; rresults.forEach(function (rresults) { subject_options += `<option value="${rresults["fsubcode"]}">${rresults["fsubname"]}</option>`; }); var x = 1; if (mtotalsub != 0) { var j = 0; for (var i = 1; i <= mtotalsub; i++) { subtable += `<tr> <td>${i}</td> <td class="subcode">${mresults[j]["fsubcode"]}</td> <td style = "text-align:left;"> ${mresults[j]["fsubname"]}</td></tr>`; x++; j++; } } if (remainsub > 0) { var j = 0; for (var z = x; z <= totsub; z++) { subtable += `<tr> <td>${z}</td> <td class="subcode" id = "subcode_${z}"></td> <td ><select style="padding-left: 0px;" id = "sub_${z}" class = "form-control" onchange = "getsubname('${z}', this)" >${subject_options}</select></td></tr>`; j++; } } $("#subdet").html(subtable); }, }); } function loadeditSubjectdet(degree, combination, appno) { var datastring = "°ree=" + degree + "&combcode=" + combination + "&appno=" + appno; $.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" }); $.ajax({ type: "POST", async: true, data: datastring, url: $host_url + "loadeditSubjectdet", success: function loadeditSubjectdetResponce(responce) { $.unblockUI(); responce = eval("(" + responce + ")"); var subtable = `<style type = "text/css"> .table-sub tbody tr td { padding : 2px; vertical-align:middle; border: 1px solid #949494; text-align: center; } .table-sub thead tr td { text-align: center; } </style> <table class='table table-bordered table-striped table-sub'> <thead> <tr class = "bg-cyan"> <td style = "width :10%">Sl. No.</td> <td style = "width : 15%;" >Sub. Code</td> <td style = "width : 75%;">Subject Name</td> </tr> </thead> <tbody>`; totsub = responce.data["totsub"]; var mresults = responce.data["mresults"]; var rresults = responce.data["rresults"]; var rresults_arr = responce.data["rresults"]; var mtotalsub = responce.data["mtotalsub"]; var option_sub = responce.data["option_sub"]; var i = 0; var options = []; for (var sub of option_sub) { options.push(sub["fsubcode"]); } console.log(responce.data, responce.data["rresults"]); //var rresults = rresults['subname']; var remainsub = totsub - mtotalsub; var x = 1; if (mtotalsub != 0) { var j = 0; for (var i = 1; i <= mtotalsub; i++) { subtable += `<tr> <td>${i}</td> <td class="subcode">${mresults[j]["fsubcode"]}</td> <td style = "text-align:left;"> ${mresults[j]["fsubname"]}</td></tr>`; var value = mresults[j]["fsubcode"]; options = options.filter(function (item) { return item !== value; }); x++; j++; } } var i = 0; var subject_options = []; // var subject_option = '<option value="">--Select Subject--</option>'; // rresults.forEach(function (rresults) { // subject_option += `<option value="${rresults["fsubcode"]}"> // ${rresults["fsubname"]} // </option>`; // }); if (option_sub.length == 0 || options.length == 0) { var subject_option = '<option value="">--Select Subject--</option>'; rresults.forEach(function (rresults) { subject_option += `<option value="${rresults["fsubcode"]}"> ${rresults["fsubname"]} </option>`; }); } else { for (var sub of options) { subject_options[i] = '<option value="">--Select Subject--</option>'; rresults.forEach(function (rresults) { if (rresults["fsubcode"] == sub) { subject_options[i] += `<option selected="selected" value="${rresults["fsubcode"]}">${rresults["fsubname"]} </option>`; } else { subject_options[i] += `<option value="${rresults["fsubcode"]}"> ${rresults["fsubname"]} </option>`; } }); i++; } } if (remainsub > 0) { var j = 0; for (var z = x; z <= totsub; z++) { if ( option_sub.length == 0 || options.length == 0 || options[j] == undefined ) { subtable += `<tr> <td>${z}</td> <td class="subcode" id = "subcode_${z}"></td> <td ><select value="" style="padding:0px 3px !important;" id = "sub_${z}" class = "form-control" onchange = "getsubname('${z}', this)" > ${subject_option}</select></td> </tr>`; } else { subtable += `<tr> <td>${z}</td> <td class="subcode" id = "subcode_${z}">${options[j]}</td> <td ><select value="${options[j]}" style="padding:0px 3px !important;" id = "sub_${z}" class = "form-control" onchange = "getsubname('${z}', this)" > ${subject_options[j]}</select></td> </tr>`; } j++; } } $("#subdet").html(subtable); var i = 0; for (var sub of options) { z++; $("#subcode_" + z).html(sub); $("#sub_" + z).val(sub); } }, }); } var selSubArr = []; function getsubname(id, obj) { if (obj.value == "") alert("Subject Should be selected"); if (!in_array(obj.value, selSubArr)) { selSubArr.push(obj.value); $("#subcode_" + id).html(obj.value); } else { alert("Subject already selected"); } } function homeLink() { var r = confirm("Do You Want To Logout!"); if (r == true) { window.location.href = "index.html"; } else { } } function in_array(needle, haystack, argStrict) { var key = "", strict = !!argStrict; if (strict) { for (key in haystack) { if (haystack[key] === needle) { return true; } } } else { for (key in haystack) { if (haystack[key] == needle) { return true; } } } return false; } function getFeeDetail() { var category = $("#idCategory").val(); if ($("#idCategory").val() == "") { return; } var datastring = "&category=" + category; $.ajax({ type: "POST", data: datastring, url: $host_url + "getfeedetl", success: function getFeeDetailResponce(responce) { responce = eval("(" + responce + ")"); sum = responce.data["sum"]; $("#sum").val(sum); }, }); } var gSubarray; function getSubjectDetail() { var degree = $("#idDegree").val(); if ($("#idDegree").val() == "") { return; } var datastring = "°ree=" + 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"]); $("#idPaperTitle").css("display", "block"); }, }); } function validateApplication() { var errcount = 0; jsonObj = []; gRgPerinfo = ""; subdet = []; rgMultiMarks = []; missing_fields = []; if (photo_filename === undefined && photo_path == undefined) { $("#photo_err").addClass("hasError"); missing_fields.push("Student Photo"); errcount++; } else { $("#photo_err").removeClass("hasError"); item = {}; item["id"] = "photo_path"; item["value"] = photo_filename; jsonObj.push(item); } // if (sign_filename === undefined && sign_path == undefined) { // $("#sign_err").addClass("hasError"); // missing_fields.push("Student Signature"); // errcount++; // } else { // $("#sign_err").removeClass("hasError"); // item = {}; // item["id"] = "sign_path"; // item["value"] = sign_filename; // jsonObj.push(item); // } $("#idPerDet input[type=text], #idPerDet select").each(function () { var $this = $(this); var id = $this.attr("id"); var value = $this.val(); // Check if the element is passportId or visaId if (id === "passportId" || id === "visaId") { // Get the value of idNationality var nationality = $("#idPerDet #idNationality").val(); // Check if nationality is not Indian or NRI if (nationality !== "Indian" && nationality !== "NRI") { // Skip validation for passportId and visaId return; } } if (value === "" && !in_array(id, nonMandFields)) { $this.closest(".form-group").find(".fieldError").addClass("hasError"); errcount++; missing_fields.push($this.attr("name")); } else { $this.closest(".form-group").find(".fieldError").removeClass("hasError"); var item = { id: id, value: value, }; jsonObj.push(item); } }); //validate and read values of text and select boxes // $("#idPerDet input[type=text],#idPerDet select").each(function () { // if ($(this).val() == "" && !in_array($(this).attr("id"), nonMandFields)) { // $(this).closest(".form-group").find(".fieldError").addClass("hasError"); // errcount++; // missing_fields.push($(this).attr("name")); // } else { // $(this) // .closest(".form-group") // .find(".fieldError") // .removeClass("hasError"); // item = {}; // item["id"] = $(this).attr("id"); // item["value"] = $(this).val(); // jsonObj.push(item); // } // }); //validate and read values of Radio buttons if (!$('input[name="gender"]').is(":checked")) { $('input[name="gender"]') .closest(".form-group") .find(".fieldError") .addClass("hasError"); missing_fields.push("gender"); errcount++; } else { $('input[name="gender"]') .closest(".form-group") .find(".fieldError") .removeClass("hasError"); value = $('input[name="gender"]:checked').val(); item = {}; item["id"] = "gender"; item["value"] = value.toUpperCase(); jsonObj.push(item); } $("#idPrevDet input[type=text],#idPrevDet select,#idPrevDet textarea") .not("#qalsemdet input[type=text]") .each(function () { if ( $(this).val() == "" && !in_array($(this).attr("id"), nonMandPrivFields) ) { missing_fields.push($(this).attr("name")); } else { $(this) .closest(".form-group") .find(".fieldError") .removeClass("hasError"); item = {}; item["id"] = $(this).attr("id"); item["value"] = $(this).val(); jsonObj.push(item); } }); if (document.getElementById("fph").checked == true) { var item = {}; item["id"] = "fph"; item["value"] = "Yes"; jsonObj.push(item); } else { var item = {}; item["id"] = "fph"; item["value"] = "No"; jsonObj.push(item); } if (deggrp != "UG") { var marksEntry = false; $("#qalsemdet tr.ui-widget-content td input").each((i, el) => { if (el.value == "") { errcount++; marksEntry = true; } }); if (marksEntry == true) { $("#qalsemdet_err").addClass("hasError"); } else { $("#qalsemdet_err").removeClass("hasError"); } $("#qalsemdet tr.ui-widget-content").each((i, el) => { var rgQal = $(el).find("td input"); var rgTr = []; $.each(rgQal, (j, val) => { var item = {}; item["name"] = val.name; item["value"] = val.value; rgTr.push(item); }); rgMultiMarks.push(rgTr); }); } $("#subdet table tr td.subcode").each((i, el) => { subdet.push($(el).html()); if ($(el).html() == "") missing_fields.push("Subject " + i); }); $("#uploaddet input[type=hidden]").each(function () { var item = {}; item["id"] = $(this).attr("id"); item["value"] = $(this).val(); jsonObj.push(item); }); var html_string = ""; for (let field of missing_fields) { html_string += "<li style='padding: 0px; margin: 0px;'>" + field + "</li>"; } if (missing_fields.length > 0) { swal({ title: "The following fields are missing", text: `<div class="col-md-12"> <ol style="color: red;text-align:left;">${html_string}</ol></div>`, html: true, showCancelButton: false, confirmButtonColor: "#5495ff", confirmButtonText: "OK", closeOnConfirm: false, }); } subdet = JSON.stringify(subdet); gRgPerinfo = JSON.stringify(jsonObj); gRgPerinfo = encodeURI(JSON.stringify(jsonObj)); rgMultiMarks = JSON.stringify(rgMultiMarks); return errcount; } var gAppNo; function saveApplication() { //let error = validateApplication(); if (validateApplication() > 0) { alert("Fill All the details"); return; } var fappno = $("#fappno").val(); var datastring = "personal_info=" + gRgPerinfo + "&pRgSubjects=" + subdet + "&rgMultiMarks=" + rgMultiMarks + "&fappno=" + fappno + "&final=T"; $.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" }); $.ajax({ type: "POST", data: datastring, url: $host_url + "savephdApplication", success: function (responce) { $.unblockUI(); responce = eval("(" + responce + ")"); if (responce.error_code === -1) { $("#challanBtn").hide(); $("#paytmBtn").hide(); } else { var app_no = responce.data["app_no"]; $("#sbmchallan").hide(); $("#makepayment").show(); $("#dapp_no").append(app_no); gAppNo = app_no; } $("#app_msg").append(responce.data["message"]); $("#personal_det").hide(); $("#footer").hide(); $("#opt_course_det").hide(); $("#upload_doc_det").hide(); $("#sslc_doc_det").hide(); $("#degree_doc_det").hide(); $("#success_card").show(); }, }); } const nonMandFields = [ "idFatOccup", "fFatAnInc", "idMotOccup", "fMotAnInc", "fincomecert", "fcastecert", "fparexser", "fpergovt", "fstdncc", "padd3", "cadd3", ]; const nonMandPrivFields = [ "fdipregno", "fthredipmin", "fthredipmax", "fdipper", "fdipbrd", "fdipcollname", "fdiploccoll", "fenttstnm", "fentmin", "fentmax", "fentper", "frankobt", ]; const mandPrivFields = ["h_Diploma"]; function savetmpApplication() { //let error = validateApplication(); var errcount = 0; jsonObj = []; gRgPerinfo = ""; subdet = []; rgMultiMarks = []; //validate and read values of text and select boxes var missing_fields = []; item = {}; item["id"] = "photo_path"; item["value"] = photo_filename; jsonObj.push(item); if (photo_filename == undefined && photo_path == undefined) missing_fields.push("Student Photo"); if (sign_filename == undefined && sign_path == undefined) // missing_fields.push("Student Signature"); $("#sign_err").removeClass("hasError"); item = {}; item["id"] = "sign_path"; item["value"] = sign_filename; jsonObj.push(item); $("#idPerDet input[type=text],#idPerDet select").each(function () { item = {}; item["id"] = $(this).attr("id"); item["value"] = $(this).val(); jsonObj.push(item); if (item["id"] == "fincomecert" && item["value"] == "") { mandPrivFields.push("h_INCOME"); } if (item["id"] == "fcastecert" && item["value"] == "") { mandPrivFields.push("h_CASTE"); } if (item["id"] == "sttype" && item["value"] == "Uttar Pradesh") { mandPrivFields.push("h_Migration"); } if (item["id"] == "adquota" && item["value"] == "Management") { mandPrivFields.push("h_UAL"); } if ($(this).val() == "" && !in_array($(this).attr("id"), nonMandFields)) { missing_fields.push($(this).attr("name")); } }); //validate and read values of Radio buttons var radio_names = ["gender"]; for (var i = 0; i < radio_names.length; i++) { if (!$('input[name="' + radio_names[i] + '"]').is(":checked")) { $('input[name="' + radio_names[i] + '"]') .closest(".form-group") .find(".fieldError") .addClass("hasError"); errcount++; missing_fields.push(radio_names[i]); } else { $('input[name="' + radio_names[i] + '"]') .closest(".form-group") .find(".fieldError") .removeClass("hasError"); value = $('input[name="' + radio_names[i] + '"]:checked').val(); item = {}; item["id"] = radio_names[i]; item["value"] = value.toUpperCase(); jsonObj.push(item); } } $("#idPrevDet input[type=text],#idPrevDet select,#idPrevDet textarea") .not("#qalsemdet input[type=text]") .each(function () { item = {}; item["id"] = $(this).attr("id"); item["value"] = $(this).val(); jsonObj.push(item); if ( $(this).val() == "" && !in_array($(this).attr("id"), nonMandPrivFields) ) { missing_fields.push($(this).attr("name")); } }); if (deggrp != "UG") { var marksEntry = false; $("#qalsemdet tr.ui-widget-content td input").each((i, el) => { if (el.value == "") { errcount++; marksEntry = true; } }); if (marksEntry == true) { $("#qalsemdet_err").addClass("hasError"); } else { $("#qalsemdet_err").removeClass("hasError"); } } if (document.getElementById("fph").checked == true) { var item = {}; item["id"] = "fph"; item["value"] = "Yes"; jsonObj.push(item); } else { var item = {}; item["id"] = "fph"; item["value"] = "No"; jsonObj.push(item); } if (deggrp != "UG") { $("#qalsemdet tr.ui-widget-content").each((i, el) => { var rgQal = $(el).find("td input"); var rgTr = []; $.each(rgQal, (j, val) => { var item = {}; item["name"] = val.name; item["value"] = val.value; rgTr.push(item); }); rgMultiMarks.push(rgTr); }); } $("#subdet table tr td.subcode").each((i, el) => { subdet.push($(el).html()); if ($(el).html() == "") missing_fields.push("Subject " + i); }); $("#uploaddet input[type=hidden]").each(function () { var item = {}; item["id"] = $(this).attr("id"); item["value"] = $(this).val(); jsonObj.push(item); if ( $(this).val().trim() === "" && !in_array($(this).attr("id"), mandPrivFields) ) { missing_fields.push($(this).attr("name")); } }); var html_string = ""; for (let field of missing_fields) { html_string += "<li style='padding: 0px; margin: 0px;'>" + field + "</li>"; } var html = ""; var msg = ""; if (missing_fields.length > 0) { html = `<div class="col-md-12"> <ol style="color: red;text-align:left;">${html_string}</ol></div>`; msg = "The Following fields are missing"; } subdet = JSON.stringify(subdet); gRgPerinfo = JSON.stringify(jsonObj); rgMultiMarks = JSON.stringify(rgMultiMarks); var fappno = $("#fappno").val(); var datastring = "personal_info=" + gRgPerinfo + "&pRgSubjects=" + subdet + "&rgMultiMarks=" + rgMultiMarks + "&fappno=" + fappno + "&final=F"; $.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" }); $.ajax({ type: "POST", data: datastring, url: $host_url + "savephdApplication", success: function (responce) { $.unblockUI(); console.log(responce); responce = eval("(" + responce + ")"); if (responce.error_code === 0) { swal({ title: `Updated successfully. Unless the final submission is made application will not be submitted to the university. ${msg}`, text: html, html: true, showCancelButton: false, confirmButtonColor: "#5495ff", confirmButtonText: "OK", closeOnConfirm: false, }); $("#fappno").val(responce.data.app_no); return; } else { alert(responce.data.message); return; } }, }); } function FillDropdownValues(arr, ele_name, def_title) { document.getElementById(ele_name).options.length = 0; var option = "<option value=''>--Select--</option>"; for (let value of arr) { option += "<option value='" + value.int_code + "'>" + value.val + "</option>"; } $("#" + ele_name).html(option); } 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 charKeydown(evt) { var charCode; if (window.event) charCode = window.event.keyCode; //for IE else charCode = evt.which; //for firefox if (charCode == 32) //for <space> 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 addCurrencyDelimeter(obj) { var nStr = $(obj).val(); var num = parseInt(nStr); num = num.toLocaleString("en-IN"); $(obj).val(num); } function autoFilladd() { if ($("#basic_checkbox_1").is(":checked")) { $("#padd1").val($("#cadd1").val()); $("#padd2").val($("#cadd2").val()); $("#padd3").val($("#cadd3").val()); $("#pdistrict").val($("#cdistrict").val()); $("#ppincode").val($("#cpincode").val()); $("#pstate").val($("#cstate").val()); } else { $("#padd1").val(""); $("#padd2").val(""); $("#padd3").val(""); $("#pdistrict").val(""); $("#ppincode").val(""); $("#pstate").val(""); } } function rePrintApplication() { // $.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" }); $.ajax({ type: "POST", async: false, url: $host_url + "rePrintApplication", success: function (responce) { // $.unblockUI(); responce = eval("(" + responce + ")"); if (responce.error_code == 0) { gAppNo = responce.appno; makePayment(); } else { alert("Application can be printed only after final submission is made"); } }, }); } function makePayment() { window.location.href = $host_url + "printApplication&app_no=" + gAppNo; } function getpercentage() { var maxmarks = parseInt($("#idUnvMaxMarks").val()); var secmarks = parseInt($("#idUnvSecMarks").val()); if ($("#idUnvMaxMarks").val() == "") { return; } if ($("#idUnvSecMarks").val() == "") { return; } if (maxmarks < secmarks) { alert("Maximum Marks less than Secured Marks"); return; } $("#idUnvPerc").val( ( (parseFloat($("#idUnvSecMarks").val()) * 100) / parseFloat($("#idUnvMaxMarks").val()) ).toFixed(2) ); } function submitquery() { if ($("#fmessage").val() == "") { swal({ title: `Please enter message`, showCancelButton: false, confirmButtonColor: "#5495ff", confirmButtonText: "OK", closeOnConfirm: false, }); return; } if ($("#fsubject").val() == "") { swal({ title: `Please enter subject`, showCancelButton: false, confirmButtonColor: "#5495ff", confirmButtonText: "OK", closeOnConfirm: false, }); return; } if ($("#femail").val() == "") { swal({ title: `Please enter Email`, showCancelButton: false, confirmButtonColor: "#5495ff", confirmButtonText: "OK", closeOnConfirm: false, }); return; } // var datastring = "fmessage=" + $("#fmessage").val() + "&fsubject=" + $("#fsubject").val() + "&femail=" + $("#femail").val(); $.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" }); $.ajax({ type: "POST", data: datastring, url: $host_url + "submitquery", success: function (responce) { $.unblockUI(); responce = eval("(" + responce + ")"); if (responce.error_code === 0) { swal({ title: `Query has been submitted successfully. <br> Your query number is <b>${responce.data}</b>. <br> keep this number for future reference.<br>You will get email comunication on this issue.`, html: true, showCancelButton: false, confirmButtonColor: "#5495ff", confirmButtonText: "OK", closeOnConfirm: false, }); $("#fmessage").val(""); $("#fsubject").val(""); closeForm(); return; } else if (responce.error_code === -2) { swal({ title: `${responce.data}`, showCancelButton: false, confirmButtonColor: "#5495ff", confirmButtonText: "OK", closeOnConfirm: false, }); $("#fmessage").val(""); $("#fsubject").val(""); logout(); return; } else { swal({ title: `${responce.data}`, showCancelButton: false, confirmButtonColor: "#5495ff", confirmButtonText: "OK", closeOnConfirm: false, }); $("#fmessage").val(""); $("#fsubject").val(""); closeForm(); return; } }, }); } function logout() { window.location.href = "index.html"; } function adddyrow() { if ($("#qalsemdet tr").length > 0) var last_row_id = $("#qalsemdet tr.ui-widget-content td input"); var ids = $("#qalsemdet tr").length; var rowIncrId = parseInt(ids) - 1; var i = parseInt(ids) - 2; var semsub = $("#subsem1_" + i).val(); var semmo1 = $("#subsem1mo_" + i).val(); var semmm1 = $("#subsem1mm_" + i).val(); var semmo2 = $("#subsem2mo_" + i).val(); var semmm2 = $("#subsem2mm_" + i).val(); var semmo3 = $("#subsem3mo_" + i).val(); var semmm3 = $("#subsem3mm_" + i).val(); var semmo4 = $("#subsem4mo_" + i).val(); var semmm4 = $("#subsem4mm_" + i).val(); var semmo5 = $("#subsem5mo_" + i).val(); var semmm5 = $("#subsem5mm_" + i).val(); var semmo6 = $("#subsem6mo_" + i).val(); var semmm6 = $("#subsem6mm_" + i).val(); if ( semmo1 == "" || semmo2 == "" || semmo3 == "" || semmo4 == "" || semmo5 == "" || semmo6 == "" || semmm1 == "" || semmm2 == "" || semmm3 == "" || semmm4 == "" || semmm5 == "" || semmm6 == "" || semsub == "" ) { alert("Please enter all the details"); return; } var trRow = `<tr id = "${rowIncrId}" class='ui-widget-content jqgrow'> <td class='tbl_row_new tdfirst'>${rowIncrId}.</td> <td class='tbl_row_new'> <input type="text" name="subsem1_${rowIncrId}" id = "subsem1_${rowIncrId}" style="max-width: 200px !important;"> <input type="hidden" name="subcode_${rowIncrId}" id = "subcode_${rowIncrId}" value="S0${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subsem1mo_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem1mo_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subsem1mm_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem1mm_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem2mo_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem2mo_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subsem2mm_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem2mm_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem3mo_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem3mo_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem3mm_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem3mm_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem4mo_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem4mo_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem4mm_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem4mm_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem5mo_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem5mo_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subsem5mm_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem5mm_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem6mo_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem6mo_${rowIncrId}"> </td> <td class='tbl_row_new' > <input type="text" name="subsem6mm_${rowIncrId}" onchange = "gettoal('${rowIncrId}')" maxlength="4" onkeypress="return acceptNumbersOnlyForModule(event);" id = "subsem6mm_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subtotalmo_${rowIncrId}" maxlength="4" readonly onkeypress="return acceptNumbersOnlyForModule(event);" id = "subtotalmo_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subtotalmm_${rowIncrId}" maxlength="4" readonly onkeypress="return acceptNumbersOnlyForModule(event);" id = "subtotalmm_${rowIncrId}"> </td> <td class='tbl_row_new'> <input type="text" name="subpercentagemm_${rowIncrId}" maxlength="5" readonly onkeypress="return acceptNumbersOnlyForModule(event);" style="max-width: 70px !important;" id = "subpercentagemm_${rowIncrId}"> </td> <td class='tbl_row_new'> <span onclick="adddyrow()"> <img src='img/add.png' style="width:19px; height:17px;"> </span> <span onclick="removedyrow('${rowIncrId}')"> <img src='img/remove.png' style="float: right;width:19px;height:19px;"> </span> </td> </tr>`; $("#qalsemdet").append(trRow); } function removedyrow(id) { var r = confirm("Are you sure you want to delete the Record"); if (r) { if ($("#qalsemdet tr.ui-widget-content").length == 1) { alert("You cannot remove the last row"); } else { $("#" + id).remove(); } } else { } $("#qalsemdet tr.ui-widget-content").each((i, el) => { $(el) .find("td.tdfirst") .html(++i + "."); }); } function calcPercent10() { if ($("#maxmarks10").val() == "") { alert("Enter SSLC Maximum Marks"); return; } if ($("#secmarks10").val() == "") { alert("Enter Secured Marks"); return; } $("#percentage10").val( ( (parseFloat($("#secmarks10").val()) * 100) / parseFloat($("#maxmarks10").val()) ).toFixed(2) ); } function gettoal(i) { var semmo1 = parseInt($("#subsem1mo_" + i).val()); var semmm1 = parseInt($("#subsem1mm_" + i).val()); if (semmo1 > semmm1 && !isNaN(semmm1)) { alert("sem 1 obtained marks is greater than the max. marks"); $("#subsem1mm_" + i).val(""); $("#subsem1mo_" + i).val(""); $("#subsem1mo_" + i).focus(); return; } var semmo2 = parseInt($("#subsem2mo_" + i).val()); var semmm2 = parseInt($("#subsem2mm_" + i).val()); if (semmo2 > semmm2 && !isNaN(semmm2)) { alert("sem 2 obtained marks is greater than the max. marks"); $("#subsem2mm_" + i).val(""); $("#subsem2mo_" + i).val(""); $("#subsem2mo_" + i).focus(); return; } var semmo3 = parseInt($("#subsem3mo_" + i).val()); var semmm3 = parseInt($("#subsem3mm_" + i).val()); if (semmo3 > semmm3 && !isNaN(semmm3)) { alert("sem 3 obtained marks is greater than the max. marks"); $("#subsem3mm_" + i).val(""); $("#subsem3mo_" + i).val(""); $("#subsem3mo_" + i).focus(); return; } var semmo4 = parseInt($("#subsem4mo_" + i).val()); var semmm4 = parseInt($("#subsem4mm_" + i).val()); if (semmo4 > semmm4 && !isNaN(semmm4)) { alert("sem 4 obtained marks is greater than the max. marks"); $("#subsem4mm_" + i).val(""); $("#subsem4mo_" + i).val(""); $("#subsem4mo_" + i).focus(); return; } var semmo5 = parseInt($("#subsem5mo_" + i).val()); var semmm5 = parseInt($("#subsem5mm_" + i).val()); if (semmo5 > semmm5 && !isNaN(semmm5)) { alert("sem 5 obtained marks is greater than the max. marks"); $("#subsem5mm_" + i).val(""); $("#subsem5mo_" + i).val(""); $("#subsem5mo_" + i).focus(); return; } var semmo6 = parseInt($("#subsem6mo_" + i).val()); var semmm6 = parseInt($("#subsem6mm_" + i).val()); if (semmo6 > semmm6 && !isNaN(semmm6)) { alert("sem 6 obtained marks is greater than the max. marks"); $("#subsem6mm_" + i).val(""); $("#subsem6mo_" + i).val(""); $("#subsem6mo_" + i).focus(); return; } var totobt = 0; var totmarks = 0; if ( !isNaN(semmo1) && !isNaN(semmo2) && !isNaN(semmo3) && !isNaN(semmo4) && !isNaN(semmo5) && !isNaN(semmo6) ) { totobt = parseInt(semmo1) + parseInt(semmo2) + parseInt(semmo3) + parseInt(semmo4) + parseInt(semmo5) + parseInt(semmo6); $("#subtotalmo_" + i).val(totobt); } if ( !isNaN(semmm1) && !isNaN(semmm2) && !isNaN(semmm3) && !isNaN(semmm4) && !isNaN(semmm5) && !isNaN(semmm6) ) { totmarks = parseInt(semmm1) + parseInt(semmm2) + parseInt(semmm3) + parseInt(semmm4) + parseInt(semmm5) + parseInt(semmm6); $("#subtotalmm_" + i).val(totmarks); var totpercetage = (parseInt(totobt) / parseInt(totmarks)) * 100; $("#subpercentagemm_" + i).val(Math.round(totpercetage * 100) / 100); } } function getNationalDet() { let idNationality = $("#idNationality").val(); if (idNationality != "Indian" && idNationality != "NRI") { var postport = `<div class="col-md-5"> <b>Domicile Country<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> Domicile Country </span> <div class="form-line"> <input type="text" name="Domicile Country" id="fdomCountry" class="form-control" placeholder="Domicile Country" maxlength="50" autocomplete="off"> </div> </div> </div> <div class="col-md-5 col-md-offset-1 p-r-30"> <b>Domicile State<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> Domicile State </span> <div> <input type="text" name="Domicile State" id="fdomstate" class="form-control" placeholder="Domicile State" maxlength="50" autocomplete="off"> </div> </div> </div> <div class="col-md-5"> <b>Passport Number<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> Passport Number </span> <div> <input type="text" name="Passport Number" id="fpassportno" class="form-control" placeholder="Passport Number" maxlength="8" autocomplete="off"> </div> </div> </div> <div class="col-md-5 col-md-offset-1 p-r-30"> <b>PP Expiry Date<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> PP Expiry Date </span> <div class="form-line daterange"> <input type="text" id="fppexpirydate" class="form-control date" name="PP Expiry Date" placeholder="dd/mm/yyyy" autocomplete="off"> </div> </div> </div>`; let vise = `<div class="col-md-5"> <b>Visa Number<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> Visa Number </span> <div class="form-line"> <input type="text" name="Visa Number" id="fvisaNo" class="form-control" placeholder="Visa Number" maxlength="50" autocomplete="off"> </div> </div> </div> <div class="col-md-5 col-md-offset-1 p-r-30"> <b>Visa Expiry<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> Visa Expiry </span> <div class="form-line daterange"> <input type="text" id="fvisaExp" class="form-control date" name="Visa Expiry" placeholder="dd/mm/yyyy" autocomplete="off"> </div> </div> </div> <div class="col-md-5"> <b>EFRRO Number<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> EFRRO Number </span> <div> <input type="text" name="EFRRO Number" id="fefrroNo" class="form-control" placeholder="EFRRO Number" onkeypress="return acceptNumbersOnlyForModule(event);" autocomplete="off"> </div> </div> </div> <div class="col-md-5 col-md-offset-1 p-r-30"> <b>EFRRO Expiry<span style="color: red;">*</span></b> <div class="form-group p-b-20"> <span class='fieldError'> EFRRO Expiry </span> <div class="form-line daterange"> <input type="text" id="fefrroexpdate" class="form-control date" name="EFRRO Expiry" placeholder="dd/mm/yyyy" autocomplete="off"> </div> </div> </div>`; $("#passportId").html(postport); $("#visaId").html(vise); } else { $("#passportId").html(""); $("#visaId").html(""); } } function getPercentage(fsecmarks, ftotmark, fpersent) { if (ftotmark != 0) { let tenper = (fsecmarks / ftotmark) * 100; let ffinper = parseFloat(tenper.toFixed(2)); $(fpersent).val(ffinper); } } function getAggrePercentage() { let fphymax = parseFloat(document.getElementById("fphymax").value) || 0; let fchemax = parseFloat(document.getElementById("fchemax").value) || 0; let fmatmax = parseFloat(document.getElementById("fmatmax").value) || 0; let fbiomax = parseFloat(document.getElementById("fbiomax").value) || 0; let fphysec = parseFloat(document.getElementById("fphysec").value) || 0; let fchesec = parseFloat(document.getElementById("fchesec").value) || 0; let fmatsec = parseFloat(document.getElementById("fmatsec").value) || 0; let fbiosec = parseFloat(document.getElementById("fbiosec").value) || 0; if ( fphymax != null && fchemax != null && fmatmax != null && fbiomax != null && fphysec != null && fchesec != null && fmatsec != null && fbiosec != null ) { let fpcmtot = fphymax + fchemax + fmatmax; let fpcbtot = fphymax + fchemax + fbiomax; $("#fpcmtotmax").val(fpcmtot); $("#fpcbtotmax").val(fpcbtot); let fpcmscr = fphysec + fchesec + fmatsec; let fpcbscr = fphysec + fchesec + fbiosec; let fpcm = (fpcmscr / fpcmtot) * 100; let fpcmper = parseFloat(fpcm.toFixed(2)); let fpcb = (fpcbscr / fpcbtot) * 100; let fpcbper = parseFloat(fpcb.toFixed(2)); $("#fpcmscraggr").val(fpcmper); $("#fpcbscraggr").val(fpcbper); } }
Close