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.153.232
//10561 10655
function CallIAEnableRoomAllotmentDatewise() {
$("#page_main_div").load(
"html_modules/ia_room_allotment_datewise.html",
function() {
document.getElementById("display_module_name").innerHTML =
"IA Room Allotment Datewise";
document.getElementById("module_name_for_save").value =
"IA Room Allotment Datewise";
getDefaultHeadFooterLinks("IA Room Allotment Datewise");
getIAAllotmentDegreeName();
}
);
}
function getIAAllotmentDegreeName()
{
$.ajax({
type: "POST",
url: $host_url + "getIaDegName",
success: getIAAllotmentDegreeNameSuccess,
});
}
function getIAAllotmentDegreeNameSuccess($responce)
{
$responce = eval("(" + $responce + ")");
document.getElementById("degree").options.length = 0;
var deg = $responce.data["degree"];
$op = new Option("--Select--", "");
document.getElementById("degree").options.add($op);
for ($i = 0; $i < deg.length; $i++) {
$op = new Option(deg[$i]["VALUE"], deg[$i]["internal_code"]);
$op.id = deg[$i]["internal_code"];
document.getElementById("degree").options.add($op);
}
}
function getIAAllotmentDegreeExamName() {
var degree = $("#degree").val();
$.ajax({
type: "POST",
url: $host_url + "getIADegreeExamName",
data: "°ree=" + degree,
success: getIAAllotmentDegreeExamNameSuccess,
});
}
function getIAAllotmentDegreeExamNameSuccess($responce) {
$responce = eval("(" + $responce + ")");
document.getElementById("degexam").options.length = 0;
var deg = $responce.data["degexam"];
$op = new Option("--Select--", "");
document.getElementById("degexam").options.add($op);
for ($i = 0; $i < deg.length; $i++) {
$op = new Option(deg[$i]["VALUE"], deg[$i]["internal_code"]);
$op.id = deg[$i]["internal_code"];
document.getElementById("degexam").options.add($op);
}
}
function getIARoomdetails() {
var degree = $("#degree").val();
var degexam = $("#degexam").val();
$.ajax({
type: "POST",
async: false,
url: $host_url + "getIARoomdetails",
data: "degree="+degree+"°exam="+degexam,
success: function(responce) {
$responce = eval("(" + responce + ")");
document.getElementById("ra_from").options.length = 0;
let rooms = $responce.data['rooms'];
for ($i = 0; $i < rooms.length; $i++) {
$op = new Option(rooms[$i]["value"], rooms[$i]["id"]);
$op.id = rooms[$i]["id"]; //specifying the id for options
document.getElementById("ra_from").options.add($op);
}
document.getElementById("ra_to").options.length = 0;
for ($i = 0; $i < rooms.length; $i++) {
$op = new Option(rooms[$i]["value"], rooms[$i]["id"]);
$op.id = rooms[$i]["id"]; //specifying the id for options
document.getElementById("ra_to").options.add($op);
}
}
});
}
function DisplayIARoomAllotmentDetatilsDatewise() {
//$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>" });
var degree = $("#degree").val();
var degexam = $("#degexam").val();
if (date_format($("#frm_date").val()) == "") {
alert("Enter Date");
$("#frm_date").focus();
return false;
}
if (date_format($("#session").val()) == "") {
alert("Select Session.");
$("#session").focus();
return false;
}
$.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())+"°ree=" + degree+"°exam="+degexam,
url: $host_url + "DisplayIARoomAllotmentDetatilsDatewise",
success: DisplayIARoomAllotmentDetatilsDatewiseResponse
});
}
function DisplayIARoomAllotmentDetatilsDatewiseResponse(responce) {
$.unblockUI();
responce = eval("(" + responce + ")");
if (responce.error_code == 0) {
var degree = $("#degree").val();
var degexam = $("#degexam").val();
alert("Room Allotment Done successfully.");
var datastring =
"&frm_date=" +
trim($("#frm_date").val()) +
"&session=" +
trim($("#session").val()) +
"°ree=" + degree+"°exam="+degexam;
window.location.href =
$host_url + "Generateiaroomallotmantsummary" + datastring;
} else {
alert(responce.data);
}
}
function getIAExamDates()
{
var degree = $("#degree").val();
var degexam = $("#degexam").val();
$.ajax({
type: "POST",
url: $host_url + "getIAExamDates",
data: "°ree=" + degree+"°exam="+degexam,
success: getIAExamDatesSuccess,
});
}
function getIAExamDatesSuccess($responce)
{
$responce = eval("(" + $responce + ")");
document.getElementById("frm_date").options.length = 0;
var deg = $responce.data["iadoe"];
$op = new Option("--Select--", "");
document.getElementById("frm_date").options.add($op);
for ($i = 0; $i < deg.length; $i++) {
$op = new Option(deg[$i]["VALUE"], deg[$i]["internal_code"]);
$op.id = deg[$i]["internal_code"];
document.getElementById("frm_date").options.add($op);
}
}
function getIASession()
{
var degree = $("#degree").val();
var degexam = $("#degexam").val();
var frm_date = $("#frm_date").val();
$.ajax({
type: "POST",
url: $host_url + "getIASession",
data: "°ree=" + degree+"°exam="+degexam+"&frm_date="+frm_date,
success: getIASessionSuccess,
});
}
function getIASessionSuccess($responce)
{
$responce = eval("(" + $responce + ")");
document.getElementById("session").options.length = 0;
var deg = $responce.data["iasession"];
$op = new Option("--Select--", "");
document.getElementById("session").options.add($op);
for ($i = 0; $i < deg.length; $i++) {
$op = new Option(deg[$i]["VALUE"], deg[$i]["internal_code"]);
$op.id = deg[$i]["internal_code"];
document.getElementById("session").options.add($op);
}
}
|