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 : 18.217.204.60
Current Path : /var/www/oasis/js/Report/ |
| Current File : /var/www/oasis/js/Report/report_Admission_Ticket.js |
function LoadAdmissionTicket() {
$geditinternalcode = 0;
window.enable_proper_module = "AdmissionTicket";
$("#page_main_div").load(
"../html_modules/admission_ticket.html?v=24091642",
function () {
getDefaultHeadFooterLinks("Admission Ticket");
document.getElementById("display_module_name").innerHTML =
"Admission Ticket";
document.getElementById("module_name_for_save").value =
"saveAdmissionTicket";
ClearAdmissionTicket();
if (db == "demo") {
$("#report_admission_ticket_degree_code").val("BCA1");
$("#report_admission_ticket_degree_name").val(
"Bachelor of Computer Application (2018 Batch Only)"
);
$("#report_admission_ticket_start").val("R1814402");
$("#report_admission_ticket_End").val("R1814402");
}
if (db !== "dypatil") {
$("#dypatil").hide();
} else {
$("#dypatil").show();
}
}
);
getAdmissionDegree();
}
function getAdmissionDegree() {
$.ajax({
type: "GET",
url: $host_url + "hallDegree",
success: function (response) {
let res = JSON.parse(response);
// console.log(res.data.length);
// return;
if (res.error_code == 0) {
var degree = `<option>---Select---</option>`;
for (var i = 0; i < res.data.length; i++) {
degree += `<option value='${res.data[i].fdegree}'>${res.data[i].fdegree} - ${res.data[i].fdescpn}</option>`;
}
$("#report_admission_ticket_degree_code").html(degree);
} else {
alert(res.data.msg);
return;
}
},
});
}
function getAdmissionExamno() {
let degree = $("#report_admission_ticket_degree_code").val();
// console.log(degree);
// return;
$.ajax({
type: "GET",
data: "°ree=" + degree,
url: $host_url + "hallExam",
data: "°ree=" + degree,
success: function (response) {
let res = JSON.parse(response);
// console.log(res);
// return;
if (res.error_code == 0) {
var sem = `<option value = 'All'>All</option>`;
for (var i = 0; i < res.data.length; i++) {
sem += `<option value='${res.data[i].fexamno}'>${res.data[i].fexamno} - ${res.data[i].fexamname}</option>`;
}
$("#exam").html(sem);
} else {
alert(res.data.msg);
return;
}
},
});
getAdmissionRegno();
}
// function getAdmissionRegno() {
// let degree = $("#report_admission_ticket_degree_code").val();
// let exam = $("#exam").val();
// $.ajax({
// type: "GET",
// data: "°ree=" + degree + "&exam=" + exam,
// url: $host_url + "getCandidateRegNoForHallTicket",
// success: function (response) {
// let res = JSON.parse(response);
// console.log(res.data.data[0]["fregno"], "anita");
// if (res.error_code == 0) {
// document.getElementById("selectbox").options.length = 0;
// op = new Option("All", "All");
// // $op.id = "All";
// document.getElementById("selectbox").options.add(op);
// for (i = 0; i < res.data.data.length; i++) {
// op = new Option(res.data.data[i]["fregno"]);
// // $op.id = $res.data.room[$i]["id"];
// document.getElementById("selectbox").options.add(op);
// $("#selectbox").val("All");
// }
// }
// },
// });
// }
function getAdmissionRegno() {
let degree = $("#report_admission_ticket_degree_code").val();
let exam = $("#exam").val();
$.ajax({
type: "GET",
data: "°ree=" + degree + "&exam=" + exam,
url: $host_url + "getCandidateRegNoForHallTicket",
success: function (response) {
let $res = JSON.parse(response);
if ($res.error_code == 0) {
document.getElementById("selectbox1").options.length = 0;
$op = new Option("All", "All");
// $op.id = "All";
document.getElementById("selectbox1").options.add($op);
for ($i = 0; $i < $res.data.data.length; $i++) {
$op = new Option(
$res.data.data[$i]["fregno"]
// $responce.data.room[$i]["id"]
);
// $op.id = $res.data.data[$i]["id"];
document.getElementById("selectbox1").options.add($op);
$("#selectbox1").val("All");
}
}
},
error: function (xhr, status, error) {
console.error("AJAX Error:", error);
},
});
}
function GenerateAdmissionTicket() {
if (trim($("#report_admission_ticket_degree_code").val()) == "") {
alert("Please Enter Degree Code!!");
$("#report_admission_ticket_degree_code").focus();
return;
}
if (trim($("#report_admission_ticket_start").val()) == "")
$adm_reg_starts = "00000000";
else $adm_reg_starts = $("#report_admission_ticket_start").val();
if (trim($("#report_admission_ticket_End").val()) == "")
$adm_reg_ends = "ZZZZZZZZ";
else $adm_reg_ends = $("#report_admission_ticket_End").val();
//if(trim($("#report_adt_one_per_page").checked == true))
if (document.getElementById("report_adt_one_per_page").checked == true) {
$print_hall_ticket_val = "1";
} else {
$print_hall_ticket_val = "2";
}
$.ajax({
type: "POST",
//async:false,
url: $host_url + "checkdateforhalticket.demo",
data: "degree=" + trim($("#report_admission_ticket_degree_code").val()),
success: checkdateforhalticketResponse,
});
}
function ClearAdmissionTicket() {
$("#report_admission_ticket_degree_code").val("");
$("#report_admission_ticket_degree_name").val("");
$("#report_admission_ticket_start").val("");
$("#report_admission_ticket_End").val("");
}
/* function checkdateforhalticket()
{
$.ajax({
type: "POST",
//async:false,
url: $host_url+"checkdateforhalticket.demo",
data:"degree="+trim(($("#report_admission_ticket_degree_code").val())),
success: checkdateforhalticketResponse
});
} */
function checkdateforhalticketResponse($responce) {
$responce = eval("(" + $responce + ")");
if ($responce.error_code == "-1") {
$("#report_admission_ticket_degree_code").val("");
$("#report_admission_ticket_degree_name").val("");
document.getElementById("report_admission_ticket_degree_code").focus();
alert($responce.data);
return false;
} else {
if (trim($("#report_admission_ticket_degree_code").val()) == "") {
alert("Please Enter Degree Code!!");
$("#report_admission_ticket_degree_code").focus();
return;
}
if (trim($("#report_admission_ticket_start").val()) == "")
$adm_reg_starts = "00000000";
else $adm_reg_starts = $("#report_admission_ticket_start").val();
if (trim($("#report_admission_ticket_End").val()) == "")
$adm_reg_ends = "ZZZZZZZZ";
else $adm_reg_ends = $("#report_admission_ticket_End").val();
$rptype = $("#rptype").val();
$exam = $("#exam").val();
//alert($rptype);
//if(trim($("#report_adt_one_per_page").checked == true))
if (document.getElementById("report_adt_one_per_page").checked == true) {
$print_hall_ticket_val = "1";
} else {
$print_hall_ticket_val = "2";
}
let stdreg = $("#selectbox1").val();
console.log(stdreg);
let stdregno = encodeURIComponent(stdreg.join(","));
console.log(stdregno);
window.open(
$host_url +
"generateAdmissionTicket.demo°ree_code=" +
trim($("#report_admission_ticket_degree_code").val()) +
"®_starts=" +
$adm_reg_starts +
"®_ends=" +
$adm_reg_ends +
"&print_hall_ticket=" +
$print_hall_ticket_val +
"&rptype=" +
$rptype +
"&exam=" +
$exam +
"&stdregno=" +
stdregno,
"_blank"
);
}
}
function htstaus() {
var rtype = $("#reporttype").val();
var regnofrom = $("#report_admission_ticket_start").val();
var regnoto = $("#report_admission_ticket_End").val();
var degcode = $("#report_admission_ticket_degree_code").val();
if (degcode == "") {
alert("Please Enter Degree Code.");
degcode = $("#report_admission_ticket_degree_code").focus();
return;
}
if (regnofrom == "") {
alert("Please Enter From Register Number.");
degcode = $("#report_admission_ticket_start").focus();
return;
}
if (regnoto == "") {
alert("Please Enter To Register Number.");
degcode = $("#report_admission_ticket_End").focus();
return;
}
$.ajax({
type: "POST",
url: $host_url + "checkgeneratehtstaus.demo",
data:
"degcode=" +
trim(degcode) +
"®nofrom=" +
regnofrom +
"®noto=" +
regnoto,
success: function ($responce) {
$responce = eval("(" + $responce + ")");
if ($responce.error_code == "-1") {
alert($responce.data);
return false;
} else {
window.open(
$host_url +
"generatehtstaus.demo°code=" +
degcode +
"®nofrom=" +
regnofrom +
"®noto=" +
regnoto +
"&rtype=" +
rtype
);
}
},
});
}
var iaattarray = [];
function viewShortageList() {
let degree = $("#report_admission_ticket_degree_code").val();
let sem = $("#exam").val();
console.log(degree, sem, "hi");
if (degree == "---Select---") {
alert("Select Degree");
return;
} else {
$.blockUI({
message:
"<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>",
});
$.ajax({
url: $host_url + "hallticketattendenceshortagedata",
data:
"deg=" + degree + "&sem=" + sem + "®nos=" + $("#selectbox1").val(),
success: function (res) {
var response = JSON.parse(res);
$.unblockUI();
if (response.error_code == -1) {
let table = "";
table += `<h5>No Data Found</h5>`;
document.getElementById("attdatatable").innerHTML = table;
} else {
let table = "";
table += `<table style='width: 100%;' cellspacing='0'>`;
table += `<thead style='position:sticky; top:0'><tr>
<th colspan='7' style='padding:5px;' align='left' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper'>Attendence Shortage</th></tr>
<tr align="center" class='ui-state-default ui-jqgrid-hdiv'>
<th class='column'>Sl. No.</th>
<th class='column'>Reg.No</th>
<th class='column'>Name</th>
<th class='column'>Subject Name</th>
<th class='column'>Remarks</th>
<th class='column'>Attendence Shortage</th>
<th class='column'>IA Shortage</th>
</tr>
</thead>`;
for (let i = 0; i < response.data.data.length; i++) {
iaattarray.push(response.data.data[i]);
table += `<tr align='center'>
<td class='column'>${i + 1}</td>
<td class='column'>${response.data.data[i].regno}</td>
<td class='column' style='padding:5px;' align='left'>${
response.data.data[i].fname
}</td>
<td class='column' style='padding:5px;' align='left'>${
response.data.data[i].subjectcode
}</td>
<td class='column' >${response.data.data[i].FREMARKS}</td>`;
if (response.data.data[i].FREMARKS == "IA Shortage") {
table += `<td class='column'>-</td>
<td class='column'>${response.data.data[i].iaper}</td>`;
} else {
table += `<td class='column'>${response.data.data[i].attper}</td>
<td class='column'>-</td>`;
}
table += `</tr>`;
}
table += `</table>`;
document.getElementById("attdatatable").innerHTML = table;
}
},
});
}
}
function viewStudentList() {
let degree = $("#report_admission_ticket_degree_code").val();
let sem = $("#exam").val();
if (degree == "---Select---") {
alert("Select Degree");
return;
} else {
$.blockUI({
message:
"<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>",
});
$.ajax({
url: $host_url + "studentfeesandattiashortagedata",
data:
"deg=" + degree + "&sem=" + sem + "®nos=" + $("#selectbox1").val(),
success: function (res) {
var response = JSON.parse(res);
$.unblockUI();
console.log(response, "tabledata");
if (response.error_code == -1) {
let table = "";
table += `<h5>No Data Found</h5>`;
document.getElementById("attdatatable").innerHTML = table;
} else {
let table = "";
table += `<table style='width: 100%;' cellspacing='0'>`;
table += `<thead style='position:sticky; top:0'><tr>
<th colspan='8' style='padding:5px;' align='left' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper'>Candidate List</th></tr>
<tr align="center" class='ui-state-default ui-jqgrid-hdiv'>
<th class='column'>Sl. No.</th>
<th class='column'>Reg.No</th>
<th class='column'>Name</th>
<th class='column'>Year/Mode</th>
<th class='column'>Fresh Exam</th>
<th class='column'>Fees Status</th>
<th class='column'>Subject Status</th>
</tr>
</thead>`;
for (let i = 0; i < response.data.data.length; i++) {
iaattarray.push(response.data.data[i]);
table += `<tr align='center'>
<td class='column'>${i + 1}</td>
<td class='column'>${response.data.data[i].fregno}</td>
<td class='column' style='padding:5px;' align='left'>${
response.data.data[i].fname
}</td>
<td class='column' style='padding:5px;' align='center'>${
response.data.data[i].fyear
}/${response.data.data[i].fexamtype}</td>
<td class='column' style='padding:5px;' align='center'>${
response.data.data[i].ffreshexam
}</td>
<td class='column' style='padding:5px;' align='center'>${
response.data.data[i].fstatus
}</td>
<td class='column' style='padding:5px;' align='center'>${
response.data.data[i].substatus
}</td>`;
table += `</tr>`;
}
table += `</table>`;
document.getElementById("attdatatable").innerHTML = table;
}
},
});
}
}
// function LoadAdmissionTicket() {
// $geditinternalcode = 0;
// window.enable_proper_module = "AdmissionTicket";
// $("#page_main_div").load(
// "../html_modules/admission_ticket.html?v=24091642",
// function () {
// getDefaultHeadFooterLinks("Admission Ticket");
// document.getElementById("display_module_name").innerHTML =
// "Admission Ticket";
// document.getElementById("module_name_for_save").value =
// "saveAdmissionTicket";
// ClearAdmissionTicket();
// if (db == "demo") {
// $("#report_admission_ticket_degree_code").val("BCA1");
// $("#report_admission_ticket_degree_name").val(
// "Bachelor of Computer Application (2018 Batch Only)"
// );
// $("#report_admission_ticket_start").val("R1814402");
// $("#report_admission_ticket_End").val("R1814402");
// }
// if (db == "dypatil") {
// $("#lregno").html("USN Range: ");
// $("#ldegcode").html("Programme : ");
// }
// }
// );
// }
// function GenerateAdmissionTicket() {
// if (trim($("#report_admission_ticket_degree_code").val()) == "") {
// alert("Please Enter Degree Code!!");
// $("#report_admission_ticket_degree_code").focus();
// return;
// }
// if (trim($("#report_admission_ticket_start").val()) == "")
// $adm_reg_starts = "00000000";
// else $adm_reg_starts = $("#report_admission_ticket_start").val();
// if (trim($("#report_admission_ticket_End").val()) == "")
// $adm_reg_ends = "ZZZZZZZZ";
// else $adm_reg_ends = $("#report_admission_ticket_End").val();
// //if(trim($("#report_adt_one_per_page").checked == true))
// if (document.getElementById("report_adt_one_per_page").checked == true) {
// $print_hall_ticket_val = "1";
// } else {
// $print_hall_ticket_val = "2";
// }
// $.ajax({
// type: "POST",
// //async:false,
// url: $host_url + "checkdateforhalticket.demo",
// data: "degree=" + trim($("#report_admission_ticket_degree_code").val()),
// success: checkdateforhalticketResponse,
// });
// }
// function ClearAdmissionTicket() {
// $("#report_admission_ticket_degree_code").val("");
// $("#report_admission_ticket_degree_name").val("");
// $("#report_admission_ticket_start").val("");
// $("#report_admission_ticket_End").val("");
// }
// /* function checkdateforhalticket()
// {
// $.ajax({
// type: "POST",
// //async:false,
// url: $host_url+"checkdateforhalticket.demo",
// data:"degree="+trim(($("#report_admission_ticket_degree_code").val())),
// success: checkdateforhalticketResponse
// });
// } */
// function checkdateforhalticketResponse($responce) {
// $responce = eval("(" + $responce + ")");
// if ($responce.error_code == "-1") {
// $("#report_admission_ticket_degree_code").val("");
// $("#report_admission_ticket_degree_name").val("");
// document.getElementById("report_admission_ticket_degree_code").focus();
// alert($responce.data);
// return false;
// } else {
// if (trim($("#report_admission_ticket_degree_code").val()) == "") {
// alert("Please Enter Degree Code!!");
// $("#report_admission_ticket_degree_code").focus();
// return;
// }
// if (trim($("#report_admission_ticket_start").val()) == "")
// $adm_reg_starts = "00000000";
// else $adm_reg_starts = $("#report_admission_ticket_start").val();
// if (trim($("#report_admission_ticket_End").val()) == "")
// $adm_reg_ends = "ZZZZZZZZ";
// else $adm_reg_ends = $("#report_admission_ticket_End").val();
// $rptype = $("#rptype").val();
// $exam = $("#exam").val();
// //alert($rptype);
// //if(trim($("#report_adt_one_per_page").checked == true))
// if (document.getElementById("report_adt_one_per_page").checked == true) {
// $print_hall_ticket_val = "1";
// } else {
// $print_hall_ticket_val = "2";
// }
// window.location.href =
// $host_url +
// "generateAdmissionTicket.demo°ree_code=" +
// trim($("#report_admission_ticket_degree_code").val()) +
// "®_starts=" +
// $adm_reg_starts +
// "®_ends=" +
// $adm_reg_ends +
// "&print_hall_ticket=" +
// $print_hall_ticket_val +
// "&rptype=" +
// $rptype +
// "&exam=" +
// $exam;
// }
// }
// function htstaus() {
// var rtype = $("#reporttype").val();
// var regnofrom = $("#report_admission_ticket_start").val();
// var regnoto = $("#report_admission_ticket_End").val();
// var degcode = $("#report_admission_ticket_degree_code").val();
// if (degcode == "") {
// alert("Please Enter Degree Code.");
// degcode = $("#report_admission_ticket_degree_code").focus();
// return;
// }
// if (regnofrom == "") {
// alert("Please Enter From Register Number.");
// degcode = $("#report_admission_ticket_start").focus();
// return;
// }
// if (regnoto == "") {
// alert("Please Enter To Register Number.");
// degcode = $("#report_admission_ticket_End").focus();
// return;
// }
// $.ajax({
// type: "POST",
// url: $host_url + "checkgeneratehtstaus.demo",
// data:
// "degcode=" +
// trim(degcode) +
// "®nofrom=" +
// regnofrom +
// "®noto=" +
// regnoto,
// success: function ($responce) {
// $responce = eval("(" + $responce + ")");
// if ($responce.error_code == "-1") {
// alert($responce.data);
// return false;
// } else {
// window.location.href =
// $host_url +
// "generatehtstaus.demo°code=" +
// degcode +
// "®nofrom=" +
// regnofrom +
// "®noto=" +
// regnoto +
// "&rtype=" +
// rtype;
// }
// },
// });
// }
|