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


Current Path : /proc/thread-self/root/var/www/html/college/js/
Upload File :
Current File : //proc/thread-self/root/var/www/html/college/js/shortLists.js

function callshortLists() {
  $("#page_main_div").load("../html_modules/shortLists.html", {
    function() {
      document.getElementById("display_module_name").innerHTML = "Short List";
      document.getElementById("module_name_for_save").value = "Short Lists";
      getDefaultHeadFooterLinks("Short List");
      getAttIADegree();
    },
  });
}
function getAttIADegree() {
  $.blockUI({
    message:
      "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>",
  });
  console.log($host_url);
  $.ajax({
    type: "GET",
    url: $host_url + "degreeReport",
    success: function (response) {
      var res = JSON.parse(response);
      console.log(res.data.data, "degreeeewant");

      if (res.error_code == -1) {
        alert(res.data.data);
        $.unblockUI();
        return;
      } else {
        var option = `<option value=''>---Select---</option>`;
        for (i = 0; i < res.data.data.length; i++) {
          option += `<option value='${res.data.data[i].FDEGREE}'>${res.data.data[i].FDEGREE} - ${res.data.data[i].FDESCPN}</option>`;
        }

        document.getElementById("degree").innerHTML = option;
        $.unblockUI();
      }
    },
  });
}
function handlerSem() {
  var degree = document.getElementById("degree").value;
  $.blockUI({
    message:
      "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>",
  });
  $.ajax({
    type: "GET",
    data: "degree=" + degree,
    url: $host_url + "degreeSemReport",
    success: function (res) {
      var response = JSON.parse(res);
      console.log(response.data.data, "semesgter");
      if (res.error_code == -1) {
        alert(res.data.data);
        $.unblockUI();
        return;
      } else {
        var option = `<option value=''>---Select---</option>`;
        for (i = 0; i < response.data.data.length; i++) {
          option += `<option value='${response.data.data[i].fexamno}'>${response.data.data[i].fexamname}</option>`;
        }
        document.getElementById("semesterr").innerHTML = option;
        $.unblockUI();
      }
    },
  });
}
function handleSub() {
  var degree = document.getElementById("degree").value;
  var semester = document.getElementById("semesterr").value;
  $.blockUI({
    message:
      "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>",
  });
  $.ajax({
    type: "GET",
    data: "degree=" + degree + "&semesterr=" + semester,
    url: $host_url + "degreeSubReport",
    success: function (res) {
      var response = JSON.parse(res);
      console.log(response, "subject");
      getIAATTShortList();
      if (response.error_code == -1) {
        alert(response.data.data);
        $.unblockUI();
        return;
      } else {
        var option = `<option value=''>---Select---</option>`;
        for (i = 0; i < response.data.data.length; i++) {
          option += `<option value='${response.data.data[i].FSUBCODE}'>${response.data.data[i].FSUBCODE} - ${response.data.data[i].FSUBNAME}</option>`;
        }
        document.getElementById("subjectt").innerHTML = option;
        $.unblockUI();
      }
    },
  });
}

function generateShortList() {
  var degree = document.getElementById("degree").value;
  var semester = document.getElementById("semesterr").value;
  var subject = document.getElementById("subjectt").value;
  var iath = document.getElementById("iath").value;
  var iapr = document.getElementById("iapr").value;
  var iacomb = document.getElementById("iacomb").value;
  var attth = document.getElementById("attth").value;
  var attpr = document.getElementById("attpr").value;
  var attcomb = document.getElementById("attcomb").value;

  window.open(
    $host_url +
      "excelShortlistReport&degree=" +
      degree +
      "&semesterr=" +
      semester +
      "&subjectt=" +
      subject +
      "&iath=" +
      iath +
      "&iapr=" +
      iapr +
      "&iacomb=" +
      iacomb +
      "&attth=" +
      attth +
      "&attpr=" +
      attpr +
      "&attcomb=" +
      attcomb
  );
}

function addShortList() {
  $("#page_main_div").load("../html_modules/addShortLists.html", {
    function() {
      document.getElementById("display_module_name").innerHTML = "Short List";
      document.getElementById("module_name_for_save").value = "Short Lists";
      getDefaultHeadFooterLinks("Short List");
      getAttIADegree();
    },
  });
}

function saveshortlistdetails() {
  var degree = document.getElementById("degree").value;
  var semester = document.getElementById("semesterr").value;
  let iath = $("#iath").val();
  let iapr = $("#iapr").val();
  let iacomb = $("#iacomb").val();
  let attth = $("#attth").val();
  let attpr = $("#attpr").val();
  let attcomb = $("#attcomb").val();
  $.blockUI({
    message:
      "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>",
  });

  $.ajax({
    type: "GET",
    data:
      "degree=" +
      degree +
      "&semesterr=" +
      semester +
      "&iath=" +
      iath +
      "&iapr=" +
      iapr +
      "&iacomb=" +
      iacomb +
      "&attth=" +
      attth +
      "&attpr=" +
      attpr +
      "&attcomb=" +
      attcomb,
    url: $host_url + "saveAddShortList",
    success: function (res) {
      var response = JSON.parse(res);
      if (response.error_code === 0) {
        alert(response.data.msg);
        $.unblockUI();
      } else {
        alert(response.data.msg);
        $.unblockUI();
        return;
      }
    },
  });
}

function getIAATTShortList() {
  var degree = document.getElementById("degree").value;
  var semester = document.getElementById("semesterr").value;
  $.ajax({
    type: "GET",
    url: $host_url + "getIAATTShortList",
    data: "degree=" + degree + "&sem=" + semester,
    success: function (res) {
      var response = JSON.parse(res);
      console.log(response);
      if (response.error_code == 0) {
        $("#iath").val(response.data.FCRIATH);
        $("#iapr").val(response.data.FCRIAPR);
        $("#iacomb").val(response.data.FCRIACOMB);
        $("#attth").val(response.data.FCRATTTH);
        $("#attpr").val(response.data.FCRATTPR);
        $("#attcomb").val(response.data.FCRATTCOMB);
        $.unblockUI();
      } else {
        $("#iath").val("");
        $("#iapr").val("");
        $("#iacomb").val("");
        $("#attth").val("");
        $("#attpr").val("");
        $("#attcomb").val("");
        $.unblockUI();
      }
    },
  });
}