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


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

//10561 10655
function EnableiRoomwise_Nos_List() {
  $("#page_main_div").load("../html_modules/roomwise_regno.html", function () {
    document.getElementById("display_module_name").innerHTML =
      "Room Notice Board";
    document.getElementById("module_name_for_save").value = "Roomwise Nos List";
    getDefaultHeadFooterLinks("Roomwise Nos List");
    //getRoomdetails();
    getRoomdetailsReportsChart();
    $("#reporttype").hide();
    //getBatchdet();
  });
}

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

      document.getElementById("session").options.length = 0;
      $op = new Option("-select-", "0");
      $op.id = "0"; //specifying the id  for options
      document.getElementById("session").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("session").options.add($op);
      }
    },
  });
}

function getBatchdet() {
  $.ajax({
    type: "POST",
    url: $host_url + "getBatchdet",
    data: "id=",
    success: getBatchdetSuccess,
  });
}

function getBatchdetSuccess($responce) {
  $responce = eval("(" + $responce + ")");
  var batch = $responce.data["batchdet"];
  console.log(batch);
  var batchoptins = `<option value = ''>-Select-</option>`;
  for ($i = 0; $i < batch.length; $i++) {
    batchoptins += `<option value = '${batch[$i]["fbatch"]}'>${batch[$i]["fdescpn"]}</option>`;
  }
  console.log(batchoptins);
  $("#fbatch").html(batchoptins);
}

function GenerateRoomwise_Nos_List() {
  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();
  var fbatch = "";

  var pageeject = "F";
  var qpeject = "F";
  var roomchart = "T";
  if ($("#pageejt").is(":checked")) {
    var pageejt = "T";
  } else {
    var pageejt = "F";
  }
  console.log($("#pageejt").is(":checked"));
  // if(document.getElementById('roomchart').checked == true)
  // roomchart = 'T';

  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;
  }

  var wtqp = "T";

  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 +
      "&pageejt=" +
      pageejt +
      "&wtqp=" +
      wtqp +
      "&fbatch=" +
      fbatch
  );
}

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 = $("#session").val();
  var fbatch = "";
  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 +
      "&fbatch=" +
      fbatch
  );
}

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";
  // wtqp

  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();
  var fbatch = "";

  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 +
      "&fbatch=" +
      fbatch
  );
}