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.116.87.225


Current Path : /var/www/html/pget/js/admin/
Upload File :
Current File : //var/www/html/pget/js/admin/reports.js

// var $host_url =
//   "http://" +
//   window.location.host +
//   "/" +
//   window.location.pathname.split("/")[1] +
//   "/app.php?a=";

var $photo_url =
  "http://" +
  window.location.host +
  "/" +
  window.location.pathname.split("/")[1];

$(function() {
  var focusedElement;
  $(document).on("focus", "input", function() {
    if (focusedElement == this) return;
    focusedElement = this;
    setTimeout(function() {
      focusedElement.select();
    }, 100);
  });
});

function loadReports() {
  $.ajax({
    type: "POST",
    url: $host_url + "loadRange",
    async: false,
    success: function(response) {
      //  console.log(response);
      var { error_code, data, status } = JSON.parse(response);
      // console.log(data);
      if (error_code == "0") {
        $("#loadTab").load("reports.html", function() {
          var degers = data;
        });
        // var date = getDate();
        // console.log(date);
        // document.getElementById('dtfrom').value = date;
        // document.getElementById('dtto').value = date;
        // $('#dtfrom').val(date);
        // $('#dtto').val(date);
      } else {
        alert("Please try after some time");
        return;
      }
    }
  });
}


function getDate() {
  var today = new Date();
  var dd = today.getDate();
  var mm = today.getMonth() + 1; //January is 0!

  var yyyy = today.getFullYear();
  if (dd < 10) {
    dd = "0" + dd;
  }
  if (mm < 10) {
    mm = "0" + mm;
  }
  var today = dd + "/" + mm + "/" + yyyy;
  return today;
}

function loadreportdet() {
  var reporttype = $("#freports").val();
  var dtfrom = $('#dtfrom').val();
  var dtto = $('#dtto').val();
  if (reporttype == "applicationlist") {    
    console.log(dtfrom,dtto);
    window.open($host_url + "ApplicationReport"+ "&dtfrom=" + dtfrom + "&dtto=" + dtto, "_blank");
  } else if (reporttype == "applicationfeereport") {
    window.open($host_url + "Applicationfeereport" + "&dtfrom=" + dtfrom + "&dtto=" + dtto, "_blank");
  }else if (reporttype == "applicationfeesummary") {
    window.open($host_url + "ApplicationFeeSum" + "&dtfrom=" + dtfrom + "&dtto=" + dtto, "_blank");
  } else if (reporttype == "seatAllotdegreewise") {
    window.open($host_url + "Degreewise_SeatAllotedList", "_blank");
  } else if (reporttype == "seatAllotCollegwise") {
    window.open($host_url + "Collegewise_SeatAllotedList", "_blank");
  }
}


function reporttypechange(){
  // console.log('change');
  if($('#freports').val() == "seatAllotCollegwise" || $('#freports').val() == "seatAllotdegreewise" ){
    // console.log('if');
    $('#alootround').show();
    $('#daterangerpt').hide();
  }else {
    $('#alootround').hide();
    $('#daterangerpt').show();
  }
}


function loadMeritList() {
  $("#loadTab").load("merit_list.html", function() {});
}

function genarateMeritList() {
  var fdegfrom = $("#afrom").val();
  var fdegto = $("#ato").val();
  window.open(
    $host_url + "MeritList&fdegfrom=" + fdegfrom + "&fdegto=" + fdegto,
    "_blank"
  );
}