0xV3NOMx
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.224.38.165


Current Path : /var/www/html/pget/js/
Upload File :
Current File : //var/www/html/pget/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 == 0) {
        $("#loadTab").load("app-status.html", 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];
          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>
                    <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;" id = "htappno"> ${
                      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>
                    
                  </head>
                  `;
          if (response.error_code == -1) {
            alert("No Application found");
          }
          html += `</table>`;
          $("#AppStat").html(html);

          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 == "vskub") 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='text-align:center; font-size: 17px;'>${
                      row["fstatus"]
                    }</td>
                    <td style='text-align:center; font-size: 17px;'><button
                    class="btn btn-primary btn-sm waves-effect font-16"
                    onclick="rePrintApplication('${degree}')"
                  > 
                    Print Application
                  </button></td>
                    </tr>
                  `;
            } else {
              html += `<tr>
                    <td style='text-align:center; font-size: 17px;'>${i +
                      1}</td>
                    <td style="font-size: 17px;">${row["fdegree"]}</td>
                    <td style='text-align:center; font-size: 17px;'>${
                      row["fstatus"]
                    }</td>
                    <td style='text-align:center; font-size: 17px;'><button
                    class="btn btn-primary btn-sm waves-effect font-16"
                    onclick="rePrintApplication('${degree}')"
                  >
                    Print Application
                  </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;
// }