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.119.19.219
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 /
html /
pgadm /
js /
[ HOME SHELL ]
Name
Size
Permission
Action
admin
[ DIR ]
drwxrwxrwx
pg
[ DIR ]
drwxrwxrwx
.js.php
3.61
KB
-rw-r--r--
MainPageCompressed.js
341.08
KB
-rwxrwxrwx
add-course.js
11.07
KB
-rwxrwxrwx
admin.js
15.25
KB
-rwxrwxrwx
advanced-form-elements.js
5.41
KB
-rwxrwxrwx
app-status.js
7.38
KB
-rwxrwxrwx
compressed.js
440.45
KB
-rwxrwxrwx
control.js
18.43
KB
-rwxrwxrwx
demo.js
3.33
KB
-rwxrwxrwx
forgot-password.js
3.24
KB
-rwxrwxrwx
form_submit.js
1.3
KB
-rwxrwxrwx
helpers.js
576
B
-rwxrwxrwx
kusPhdAdm.js
50.93
KB
-rwxrwxrwx
kusPhdAdm_03082019.js
45.47
KB
-rwxrwxrwx
kusPhdAdm_04122018.js
30.02
KB
-rwxrwxrwx
kusPhdAdm_12122018.js
45.47
KB
-rwxrwxrwx
kusPhdAdm_17092018.js
29.67
KB
-rwxrwxrwx
kusPhdAdm_23092018.js
29.74
KB
-rwxrwxrwx
login.js
478
B
-rwxrwxrwx
script.js
3
B
-rwxrwxrwx
sign-in.js
4.29
KB
-rwxrwxrwx
sign-up.js
4.52
KB
-rwxrwxrwx
upload.js
5.64
KB
-rwxrwxrwx
upload_18092018.js
5.52
KB
-rwxrwxrwx
validate.js
9.29
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : kusPhdAdm.js
if (location.protocol != "https:") { var protocol = "http://"; } else { var protocol = "https://"; } var $host_url = protocol + window.location.host + "/" + window.location.pathname.split("/")[1] + "/" + window.location.pathname.split("/")[2] + "/app.php?a="; var $host_url1 = protocol + window.location.host + "/" + 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; 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() { console.log(document.getElementById("kpu").checked); 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"; // } } 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); $("#stuMobileno").val(responce.data.fmobileno); $("#idDob").val(responce.data.fdob); var gender = responce.data.perdetl["gender"]; if (gender != "") { var $radios = $("input:radio[name=gender]"); $radios.filter("[value=" + gender + "]").prop("checked", true); } 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);*/ var serv_arr = responce.data["degree"]; var serv_title = ""; FillDropdownValues(serv_arr, "idDegree", serv_title); if (responce.data.percnt > 0) { var datastring = "&college=" + responce.data.perdetl["idCollege"]; 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(); } var combination = responce.data.perdetl["idDegComb"]; $.ajax({ type: "POST", async: true, data: datastring, url: $host_url + "getcombinationdetailsdetails", success: function GetdegreedetailsResponce(responce) { responce = eval("(" + responce + ")"); var serv_arr = responce.data["mascomb"]; var serv_title = ""; FillDropdownValues(serv_arr, "idDegComb", serv_title); $("#idDegComb").val(combination); } }); loadeditSubjectdet( responce.data.perdetl["idDegree"], responce.data.perdetl["idDegComb"], responce.data.perdetl["fappno"] ); $("#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"]); 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 { $("#idCollege").val(responce.data.fcollcode); $("#idDegree").val(responce.data.fdegree); loadSubjectCombdet(); loaduploads(); } } }); } 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 + ")"); 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(); $.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" }); $.ajax({ type: "POST", async: true, 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; console.log(prmarksarr); if (prmarksarr.length == 0) return; var trRow = ""; for (let i in prmarksarr) { console.log(i); console.log(prmarksarr[i]); 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; // console.log(rresults); 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++; } } //console.log(subtable); $("#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"]); } //var rresults = rresults['subname']; var remainsub = totsub - mtotalsub; //console.log(rresults_arr[0]['fsubname']); 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++; } } //console.log(subtable); $("#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) { //console.log(obj.value); 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; //console.log(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); } //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").each( function() { if ( $(this).val() == "" && ($(this).attr("id") != "adhar" && $(this).attr("id") != "landline" && $(this).attr("id") != "fincomecert" && $(this).attr("id") != "fcastecert") ) { $(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); } } ); 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); } 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(); $("#opt_course_det").hide(); $("#upload_doc_det").hide(); $("#sslc_doc_det").hide(); $("#degree_doc_det").hide(); $("#success_card").show(); } }); } const nonMandFields = [ "adhar", "pmobileno", "income", "fincomecert", "fcastecert" ]; 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 ($(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() == "") { missing_fields.push($(this).attr("name")); } }); 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); } $("#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>"; } 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"; console.log(datastring); $.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 === 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")) { $("#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 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); } }
Close