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 : 3.133.122.95


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

function enableInvigReport() {
  $("#page_main_div").load("../html_modules/invig_report.html", function () {
    document.getElementById("display_module_name").innerHTML = "Report";
    document.getElementById("module_name_for_save").value = "Report";
    getDefaultHeadFooterLinks("Report");
    loadAttr();
  });
}

function loadAttr() {
  $("#to_qpcode").hide();
  $("#from_qpcode").hide();
  $("#rtype").hide();
  $("#room_range_from").hide();
  $("#room_range_to").hide();
  $("#faculty_row").hide();
}

function generate_invig_report() {
  //   console.log("hi");
  var reporttype = document.getElementById("sreport").value;
  var room_range_from = $("#room_range_from").val();
  var room_range_to = $("#room_range_to").val();
  var rtype = $("#rtype").val();
  var fromdate = $("#frm_date").val();
  var fqpcode = $("#from_qpcode").val();
  var tqpcode = $("#to_qpcode").val();
  var session = $("#session").val();

  if (reporttype == "id") {
    if (reporttype == "") {
      alert("Select Report");
      return;
    }

    if (fromdate == "") {
      alert("Enter Exam date");
      return;
    }

    if (fqpcode == "") {
      alert("Enter Qp code.");
      return;
    }

    if (tqpcode == "") {
      alert("Enter Qp code.");
      return;
    }

    if (session == "") {
      alert("Select Session");
      return;
    }
  } else if (reporttype == "summary") {
    if (reporttype == "") {
      alert("Select Report");
      return;
    }

    if (fromdate == "") {
      alert("Enter Exam date");
      return;
    }
  }

  if (reporttype == "id") {
    window.open(
      $host_url +
        "reportgenerate&room_range_from=" +
        room_range_from +
        "&room_range_to=" +
        room_range_to +
        "&rtype=" +
        rtype +
        "&fromdate=" +
        fromdate +
        "&fqpcode=" +
        fqpcode +
        "&tqpcode=" +
        tqpcode +
        "&session=" +
        session
    );
  } else if (reporttype == "summary") {
    window.open(
      $host_url +
        "reportgeneratesummary&room_range_from=" +
        room_range_from +
        "&room_range_to=" +
        room_range_to +
        "&rtype=" +
        rtype +
        "&fromdate=" +
        fromdate +
        "&fqpcode=" +
        fqpcode +
        "&tqpcode=" +
        tqpcode +
        "&session=" +
        session
    );
  }
}

function showdiv() {
  var reporttype = document.getElementById("sreport").value;

  if (reporttype == "id") {
    $("#reporttype").show();
    $("#pgejroom").hide();
    $("#qpeject").hide();
    $("#session_row").show();
  } else if (reporttype == "summary") {
    $("#session_row").hide();
    $("#faculty_row").hide();
  } else {
    $("#reporttype").hide();
    $("#pgejroom").show();
    $("#qpeject").hide();
  }
}