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


Current Path : /var/www/html/college/js/
Upload File :
Current File : /var/www/html/college/js/invigilators_dairy.js

//10561 10655
var db = window.location.pathname.split("/")[urlarr.length - 2];
function Enableinvigilators_dairy() {
  $("#page_main_div").load(
    "../html_modules/invigilators_dairy.html",
    function () {
      document.getElementById("display_module_name").innerHTML =
        "Invigilators Dairy and Roomwise Nos List";
      document.getElementById("module_name_for_save").value =
        "Invigilators Dairy and Roomwise Nos List";
      getDefaultHeadFooterLinks("Invigilators Dairy and Roomwise Nos List");
      //getRoomdetails();
      getRoomdetailsreort();
      $("#reporttype").hide();
      if (db == "demo") {
        $("#faculty").val("UG");
        $("#frm_date").val("10/03/2021");
        $("#rsession").val("M1");
      } else {
        var today = new Date();
        var dd = today.getDate();
        var mm = today.getMonth() + 1;
        var yyyy = today.getFullYear();
        if (dd < 10) dd = "0" + dd;
        if (mm < 10) mm = "0" + mm;
        var date = dd + "/" + mm + "/" + yyyy;
        $("#frm_date").val(date);
      }
    }
  );
}

function getRoomdetailsreort() {
  $.ajax({
    type: "POST",
    async: false,
    url: $host_url + "getRoomdetails",
    success: function (responce) {
      $responce = eval("(" + responce + ")");

      document.getElementById("faculty").options.length = 0;
      $op = new Option("-select-", "0");
      $op.id = "0"; //specifying the id  for options
      document.getElementById("faculty").options.add($op);

      for ($i = 0; $i < $responce.data.deggrp.length; $i++) {
        $op = new Option(
          $responce.data.deggrp[$i]["value"],
          $responce.data.deggrp[$i]["id"]
        );
        $op.id = $responce.data.deggrp[$i]["id"]; //specifying the id  for options
        document.getElementById("faculty").options.add($op);
      }
      if (db === "sdu") {
      } else {
        document.getElementById("rsession").options.length = 0;
        $op = new Option("-select-", "0");
        $op.id = "0"; //specifying the id  for options
        document.getElementById("rsession").options.add($op);

        for ($i = 0; $i < $responce.data.session.length; $i++) {
          $op = new Option(
            $responce.data.session[$i]["value"],
            $responce.data.session[$i]["id"]
          );
          $op.id = $responce.data.session[$i]["id"]; //specifying the id  for options
          document.getElementById("rsession").options.add($op);
        }
      }
    },
  });
}

function GenerateInvigilatorDairy() {
  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 faculty = $("#faculty").val();
  var fromdate = $("#frm_date").val();
  var fqpcode = $("#from_qpcode").val();
  var tqpcode = $("#to_qpcode").val();
  var session = $("#rsession").val();
  var pageeject = "F";
  if (document.getElementById("pgej").checked == true) pageeject = "T";

  var qpeject = "F";
  if (document.getElementById("qpej").checked == true) qpeject = "T";

  var roomchart = "F";
  // if(document.getElementById('roomchart').checked == true)
  // roomchart = 'T';
  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;
  }

  if (reporttype == "id") {
    window.open(
      $host_url +
        "GenerateInvigilatorDairy&room_range_from=" +
        room_range_from +
        "&room_range_to=" +
        room_range_to +
        "&rtype=" +
        rtype +
        "&fromdate=" +
        fromdate +
        "&fqpcode=" +
        fqpcode +
        "&tqpcode=" +
        tqpcode +
        "&session=" +
        session +
        "&faculty=" +
        $("#faculty").val()
    );
  } else if (reporttype == "er") {
    window.open(
      $host_url +
        "GenerateExcelRoomAllotReport&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 === "rrnb") {
    window.open(
      $host_url +
        "registernoallotlistonnoticeboard" +
        "&room_range_from=" +
        room_range_from +
        "&room_range_to=" +
        room_range_to +
        "&pageeject=" +
        pageeject +
        "&roomchart=" +
        roomchart +
        "&fromdate=" +
        fromdate +
        "&fqpcode=" +
        fqpcode +
        "&tqpcode=" +
        tqpcode +
        "&qpeject=" +
        qpeject +
        "&session=" +
        session +
        "&faculty=" +
        $("#faculty").val()
    );
  } else {
    console.log("bsxcnbxcb");
    window.open(
      $host_url +
        "GenerateRoomwiseRegisterNoList&room_range_from=" +
        room_range_from +
        "&room_range_to=" +
        room_range_to +
        "&pageeject=" +
        pageeject +
        "&roomchart=" +
        roomchart +
        "&fromdate=" +
        fromdate +
        "&fqpcode=" +
        fqpcode +
        "&tqpcode=" +
        tqpcode +
        "&qpeject=" +
        qpeject +
        "&session=" +
        session +
        "&faculty=" +
        $("#faculty").val()
    );
  }
}

function GenerateExcelReport() {
  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 = $("#rsession").val();
  var pageeject = "F";
  if (document.getElementById("pgej").checked == true) pageeject = "T";

  var qpeject = "F";
  if (document.getElementById("qpej").checked == true) qpeject = "T";

  var roomchart = "F";
  // if(document.getElementById('roomchart').checked == true)
  // roomchart = 'T';
  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;
  }
  window.open(
    $host_url +
      "GenerateExcelRoomAllotReport&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();
  } else {
    $("#reporttype").hide();
    $("#pgejroom").show();
    $("#qpeject").hide();
  }
}

function GenerateRoomwiseRegisterNoList() {
  var pageeject = "F";
  if (document.getElementById("pgej").checked == true) pageeject = "T";

  var qpeject = "F";
  if (document.getElementById("qpej").checked == true) qpeject = "T";

  var roomchart = "F";
  if (document.getElementById("roomchart").checked == true) roomchart = "T";

  var room_range_from = $("#room_range_from").val();
  var room_range_to = $("#room_range_to").val();
  var fromdate = $("#frm_date").val();
  var fqpcode = $("#from_qpcode").val();
  var tqpcode = $("#to_qpcode").val();

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

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

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

  window.open(
    $host_url +
      "GenerateRoomwiseRegisterNoList&room_range_from=" +
      room_range_from +
      "&room_range_to=" +
      room_range_to +
      "&pageeject=" +
      pageeject +
      "&roomchart=" +
      roomchart +
      "&fromdate=" +
      fromdate +
      "&fqpcode=" +
      fqpcode +
      "&tqpcode=" +
      tqpcode +
      "&qpeject=" +
      qpeject
  );
}