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.191.192.250
function callOldQuestionPapers() {
$("#page_main_div").load(
"../html_modules/oldqnpaper.html?v=1122",
function () {
document.getElementById("display_module_name").innerHTML =
"Old Question Papers";
document.getElementById("module_name_for_save").value =
"Old Question Papers";
getDefaultHeadFooterLinks("Old Question Papers");
getOldQpDegree();
}
);
}
function getOldQpDegree() {
$.ajax({
type: "GET",
url: $host_url + "getOldQpDegree",
success: function (res) {
let response = JSON.parse(res);
let options = `<option value=''>---select---</option>`;
if (response.error_code == 0) {
for (let index = 0; index < response.data.length; index++) {
options += `<option value='${response.data[index].fdegree}'>${response.data[index].fdescpn}</option>`;
}
}
$("#degree").html(options);
},
});
}
function getOldQpSem() {
let degree = $("#degree").val();
if (degree == "") {
alert("select degree");
return;
}
$.ajax({
type: "GET",
url: $host_url + "getOldQpSem",
data: "degree=" + degree,
success: function (res) {
let response = JSON.parse(res);
let options = `<option value=''>---select---</option>`;
if (response.error_code == 0) {
for (let index = 0; index < response.data.length; index++) {
options += `<option value='${response.data[index].fexamno}'>${response.data[index].fexamname}</option>`;
}
}
$("#sem").html(options);
},
});
}
function getOldQpYear() {
let degree = $("#degree").val();
let sem = $("#sem").val();
if (degree == "") {
alert("select degree");
return;
}
if (sem == "") {
alert("select sem");
return;
}
$.ajax({
type: "GET",
url: $host_url + "getOldQpYear",
data: "degree=" + degree + "&sem=" + sem,
success: function (res) {
let response = JSON.parse(res);
let options = `<option value=''>---select---</option>`;
if (response.error_code == 0) {
for (let index = 0; index < response.data.length; index++) {
options += `<option value='${response.data[index].fexamdate}'>${response.data[index].fexamdate}</option>`;
}
}
$("#year").html(options);
},
});
}
function viewOldQuestionPapers() {
let degree = $("#degree").val();
let sem = $("#sem").val();
let year = $("#year").val();
if (degree == "") {
alert("select degree");
return;
}
if (sem == "") {
alert("select sem");
return;
}
if (year == "") {
alert("select year");
return;
}
$.ajax({
type: "GET",
url: $host_url + "getOldQuestionPapers",
data: "degree=" + degree + "&sem=" + sem + "&year=" + year,
success: function (res) {
let response = JSON.parse(res);
let table = `<table class='table'>
<thead>
<tr class='ui-state-default ui-jqgrid-hdiv'>
<th class='column'>Sl. No.</th>
<th class='column'>Degree</th>
<th class='column'>Semester</th>
<th class='column'>Subject Name</th>
<th class='column'>Exam Date</th>
<th class='column'>Action</th>
</tr>
</thead>
<tbody>`;
if (response.error_code === 0) {
for (let index = 0; index < response.data.length; index++) {
table += `<tr class='row'>`;
table += `<td class='column'>${index + 1}</td>`;
table += `<td class='column'>${response.data[index].fdegree}</td>`;
table += `<td class='column'>${response.data[index].fexamname}</td>`;
table += `<td class='column' style='text-align: initial;'>${response.data[index].fsubname}</td>`;
table += `<td class='column'>${response.data[index].fexamdate}</td>`;
table += `<td class='column'><a href='${response.data[index].ffilename}' target='_blank' style='color: #008cba;'>Download</a></td>`;
table += `</tr>`;
}
} else {
table += `<tr class='row'>`;
table += `<td class='column' colspan='6'>No Data Found</td>`;
table += `</tr>`;
}
table += `</tbody></table>`;
$("#tabledata").html(table);
},
});
}
|