var db = window.location.pathname.split("/")[2];
// var db = window.location.pathname.split("/")[2];
// var $host_url =
// "http://" +
// window.location.host +
// "/" +
// window.location.pathname.split("/")[1] +
// "/app.php?db=" +
// db +
// "&a=";
var gdata = [];
function loadAppStatus() {
console.log($host_url);
$.ajax({
type: "POST",
async: false,
url: $host_url + "getAppStatus",
success: (response) => {
response = JSON.parse(response);
// console.log("totla",response);
// console.log("resp1",response.data.obj1);
var data = response.data.obj1;
var data2 = response.data.obj2;
if (response.error_code == -1) {
swal({
title: `${response.data.msg}`,
html: true,
showCancelButton: false,
warning: true,
confirmButtonColor: "#5495ff",
confirmButtonText: "OK",
closeOnConfirm: false,
});
return;
} else if (response.error_code == 0) {
$("#loadTab").load("app-status.html?v=778798797", function () {
var html = "";
// for (var i = 0; i < data.length; i++) {
// fappNo = data[i].fappno;
// console.log("fapp=>", fappNo);
// localStorage.setItem("fappno", fappNo);
// //MOBILE = row['fmobileno'];
// }
var row = data[0];
$('#htappno').val(row["fappno"]);
if (row["fpaystatus"] == "success") {
// $("#make_payment").hide();
}
html += `
:
${row["fname"]}
:
${row["fmobileno"]}
`;
if (response.error_code == -1) {
alert("No Application found");
}
html += ``;
$("#AppStat").html(html);
//
// :
// ${row["fappno"]}
//
// :
// ${row["fpaystatus"]}
//
// :
// ${row["fpaydate"]}
//
// :
// ${row["fpayid"]}
var html = "";
for (var i = 0; i < data2.length; i++) {
var row = data2[i];
var db = window.location.pathname.split("/")[2];
var degree = "";
if (db == "vskubx") degree = "all";
else degree = row["degcode"];
if (db == "vskub") {
html += `
| ${
i + 1
} |
${row["fdegree"]} |
|
|
`;
} else {
var fun = "";
var char = "";
var ppno = "";
if (row["fpaystatus"] == "success") {
fun = "rePrintApplication('" + row["degcode"] + "')";
char = "Print Application";
} else {
fun = "makepayment()";
char = "Make Payment";
}
if (row["fprefix"] != "") {
ppno = row["fprefix"] + row["fappno"];
} else {
ppno = row["fappno"];
}
html += `
| ${
i + 1
} |
${ppno} |
${
row["fpaydate"]
} |
${
row["fdegree"]
} |
${
row["fpaystatus"]
} |
${
row["fpayid"]
} |
|
`;
}
}
html += ``;
$("#Display").html(html);
});
}
},
});
}
// async function loadTable (){
// $.ajax({
// type: "POST",
// async: false,
// url: $host_url1 + "DisplayAppStatus",
// data:{
// fappNo:localStorage.getItem("fappNo")
// },
// success: response => {
// var response = JSON.parse(response);
// console.log("resp2",response);
// // var { error_code, fappno, status } = response;
// var error_code = response.error_code;
// var data = response.data;
// var status = response.status;
// if (error_code == 0) {
// $("#loadTab").load("app-status.html",function(){
// //var data = response.data;
// var html="";
// for(var i=0; i
// ${i+1} |
// ${row['fdegree']} |
// ${row['fstatus']} |
//
// `;
// }
// html +=``;
// $('#Display').html(html);
// });
// }
// }
// });
// return 1;
// }
function downloadht() {
var gAppNo = $("#htappno").val();
window.location.href =
$host_url +
"reportadm_admission_ticket&fdept=All&afrom=" +
gAppNo +
"&ato=" +
gAppNo;
}