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.128.168.176
Current Path : /var/www/oasis/js/ |
| Current File : /var/www/oasis/js/room_allotment_datewise_stph_new.js |
//10561 10655
function CallEnableRoomAllotmentDatewiseStphNew() {
$("#page_main_div").load(
"../html_modules/room_allotment_datewise_stph_new.html",
function () {
document.getElementById("display_module_name").innerHTML =
"Room Allotment Datewise";
document.getElementById("module_name_for_save").value =
"Room Allotment Datewise";
getDefaultHeadFooterLinks("Room Allotment Datewise MultiQP New");
getRoomdetailsNew();
}
);
}
function getRoomdetailsNew() {
$.ajax({
type: "POST",
async: false,
url: $host_url + "getRoomdetails",
success: function (responce) {
$responce = eval("(" + responce + ")");
document.getElementById("deggrp").options.length = 0;
$op = new Option("-select-", "0");
$op.id = "0"; //specifying the id for options
document.getElementById("deggrp").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("deggrp").options.add($op);
}
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);
}
document.getElementById("selectbox").options.length = 0;
$op = new Option("All", "All");
$op.id = "All";
document.getElementById("selectbox").options.add($op);
for ($i = 0; $i < $responce.data.room.length; $i++) {
$op = new Option(
$responce.data.room[$i]["value"],
$responce.data.room[$i]["id"]
);
$op.id = $responce.data.room[$i]["id"];
document.getElementById("selectbox").options.add($op);
$("#selectbox").val("All");
}
},
});
}
function getExamMonthDeggp() {
let doe = $("#frm_date").val();
$.ajax({
type: "POST",
async: false,
url: $host_url + "getExamMonthDeggp",
data: "doe=" + doe,
success: function (responce) {
$responce = eval("(" + responce + ")");
document.getElementById("deggrp").options.length = 0;
$op = new Option("-select-", "0");
$op.id = "0"; //specifying the id for options
document.getElementById("deggrp").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("deggrp").options.add($op);
}
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);
}
document.getElementById("exmmonth").options.length = 0;
for ($i = 0; $i < $responce.data.exmmonth.length; $i++) {
$op = new Option(
$responce.data.exmmonth[$i]["value"],
$responce.data.exmmonth[$i]["id"]
);
$op.id = $responce.data.exmmonth[$i]["id"];
document.getElementById("exmmonth").options.add($op);
}
},
});
}
function DisplayRoomAllotmentDetatilsDatewiseStphNew() {
//$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>" });
if (
date_format($("#frm_date").val()) == "" ||
date_format($("#frm_date").val()) == "0000-00-00"
) {
alert("Enter Date");
$("#frm_date").focus();
return false;
}
if (
date_format($("#session").val()) == "" ||
date_format($("#session").val()) == 0
) {
alert("Select Session.");
$("#session").focus();
return false;
}
if ($("#deggrp").val() == "" || $("#deggrp").val() == 0) {
alert("Select Faculty.");
$("#deggrp").focus();
return false;
}
if ($("#selectbox").val() == "" || $("#selectbox").val() == 0) {
alert("Select Room Range.");
$("#selectbox").focus();
return;
}
$.blockUI({
message:
"<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>",
});
$.ajax({
type: "POST",
async: true,
data:
"frm_date=" +
trim($("#frm_date").val()) +
"&session=" +
trim($("#session").val()) +
"&ra_from=" +
trim($("#ra_from").val()) +
"&ra_to=" +
trim($("#ra_to").val()) +
"°grp=" +
trim($("#deggrp").val()) +
"&romm=" +
$("#selectbox").val() +
"&exmmonth=" +
$("#exmmonth").val(),
url: $host_url + "DisplayRoomAllotmentDetatilsDatewiseStphNew",
success: DisplayRoomAllotmentDetatilsDatewiseStphNewResponse,
});
}
function DisplayRoomAllotmentDetatilsDatewiseStphNewResponse(responce) {
$.unblockUI();
responce = eval("(" + responce + ")");
if (responce.error_code == 0) {
alert("Room Allotment Done successfully.");
var datastring =
"&frm_date=" +
trim($("#frm_date").val()) +
"&session=" +
trim($("#session").val()) +
"°grp=" +
trim($("#deggrp").val());
window.open($host_url + "Generateroomallotmantsummary" + datastring);
/*$("#room_allotment").html("");
$("#room_allotment").html(responce.data['html']);*/
} else {
alert(responce.data);
}
}
|