Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.118.138.74
Current Path : /var/www/html/pgadm/js/ |
| Current File : /var/www/html/pgadm/js/app-status.js |
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 += `<head>
<label for="Name" style="padding-top: 17px;"><b style="font-size:17px; padding-left: 10px;">Name</b></label>
<b style="padding-left: 130px; padding-right: 15px;">:</b>
<h style="font-size:17px;"> ${row["fname"]}</h><br>
<label for="Mobile"><b style="font-size:17px; padding-left: 10px;">Mobile No</b></label>
<b style="padding-left: 94px; padding-right: 15px;">:</b>
<h style="font-size:17px;"> ${row["fmobileno"]}</h><br>
</head>
`;
if (response.error_code == -1) {
alert("No Application found");
}
html += `</table>`;
$("#AppStat").html(html);
// <label for="Application"><b style="font-size:17px; padding-left: 10px;">Application Number</b></label>
// <b style="padding-left: 9px; padding-right: 15px;">:</b>
// <h style="font-size:17px;"> ${row["fappno"]}</h><br>
// <label for="Status"><b style="font-size:17px; padding-left: 10px;">Payment Status</b></label>
// <b style="padding-left: 47px; padding-right: 15px;">:</b>
// <h style="font-size:17px;"> ${row["fpaystatus"]}</h><br>
// <label for="Date"><b style="font-size:17px; padding-left: 10px;">Payment Date</b></label>
// <b style="padding-left: 61px; padding-right: 15px;">:</b>
// <h style="font-size:17px;"> ${row["fpaydate"]}</h><br>
// <label for="Date"><b style="font-size:17px; padding-left: 10px;">Transaction ID</b></label>
// <b style="padding-left: 58px; padding-right: 15px;">:</b>
// <h style="font-size:17px;"> ${row["fpayid"]}</h><br></br>
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 += `<tr>
<td style='text-align:center; font-size: 17px;'>${
i + 1
}</td>
<td style="font-size: 17px;">${row["fdegree"]}</td>
<td style="font-size: 17px;"></td>
<td style="font-size: 17px;"><button
class="btn btn-primary btn-sm waves-effect font-16"
onclick="rePrintApplication('${row["fdegree"]}')"
>
Print Application
</button></td>
</tr>
`;
} 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 += `<tr>
<td style='text-align:center; font-size: 17px;'>${
i + 1
}</td>
<td style="font-size: 17px;" >${ppno}</td>
<td style='text-align:center; font-size: 17px;'>${
row["fpaydate"]
}</td>
<td style='text-align:left; font-size: 17px;'>${
row["fdegree"]
}</td>
<td style='text-align:center; font-size: 17px;'>${
row["fpaystatus"]
}</td>
<td style='text-align:center; font-size: 17px;'>${
row["fpayid"]
}</td>
<td style='text-align:center; font-size: 17px;'><button
class="btn btn-primary btn-sm waves-effect font-16"
onclick="${fun}"
>
${char}
</button></td>
</tr>
`;
}
}
html += `</table>`;
$("#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<data.length;i++){
// var row = data[i];
// html += `<tr>
// <td>${i+1}</td>
// <td>${row['fdegree']}</td>
// <td>${row['fstatus']}</td>
// </tr>
// `;
// }
// html +=`</table>`;
// $('#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;
}
|