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.144.255.198
function callupddegstudymat() {
$("#page_main_div").load("../html_modules/degstudymatdet.html", function () {
document.getElementById("display_module_name").innerHTML =
"Uploaded Study Material";
document.getElementById("module_name_for_save").value =
"Uploaded Study Material";
getDefaultHeadFooterLinks("Uploaded Study Material");
$("#ack_rv_rt_application_details").hide();
var datastring = "";
$.ajax({
type: "POST",
data: datastring,
async: false,
url: $host_url + "getStuddeg",
success: function (responce) {
var responce = eval("(" + responce + ")");
if (responce.error_code == 0) {
var degree = responce.data;
var options;
options += `<option value="">--Select--</option>`;
for (var i = 0; i < degree.length; i++) {
console.log(degree);
options += `<option value="${degree[i].fdegree}">${degree[i].fdescpn}</options>`;
}
$("#fdegree").html(options);
}
},
});
if (db == "demo") {
$("#fdegree").val("BBA1");
$("#sem").val("A");
}
});
}
function getSubject() {
var degree = $("#fdegree").val();
var sem = $("#sem").val();
$.ajax({
type: "POST",
async: false,
data: "type=loadsub" + "°ree=" + degree + "&sem=" + sem,
url: $host_url + "getSubject",
success: function (responce) {
var responce = eval("(" + responce + ")");
if (responce.error_code == 0) {
var subject = responce.data;
var options;
options += `<option value="All">All</option>`;
for (var i = 0; i < subject.length; i++) {
options += `<option value="${subject[i].fsubcode}">${subject[i].fsubname}</options>`;
}
$("#subject").html(options);
}
},
});
}
function DisplayAllUploads() {
var fdegree = $("#fdegree").val();
var sem = $("#sem").val();
var subject = $("#subject").val();
if (fdegree == "") {
alert("Please Select Degree");
document.getElementById("fdegree").focus();
return;
}
if (sem == "") {
alert("Please Select Semester");
document.getElementById("sem").focus();
return;
}
if (subject == "") {
alert("Please Select Subject");
document.getElementById("subject").focus();
return;
}
$.blockUI({
message:
"<h1 class='h1' style='font-size:12px'><img src='images/ajax-loader.gif' border='0'></h1>",
});
$.ajax({
type: "POST",
async: false,
data:
"&type=study&sem=" + sem + "&fdegree=" + fdegree + "&subject=" + subject,
url: $host_url + "DisplayAllUploads",
success: function (responce) {
$.unblockUI();
var responce = eval("(" + responce + ")");
if (responce.error_code == 0) {
$("#ack_rv_rt_application_details").show();
$("#reval_table_data").html(responce.data);
} else {
alert(responce.data);
$("#ack_rv_rt_application_details").hide();
$("#reval_table_data").html("");
return;
}
return;
},
});
}
function deleteStudyMat(id) {
// if(confirm("do you want to delete")
var r = confirm("Do you want to delete?");
if (r == true) {
$.ajax({
type: "POST",
async: false,
data: "id=" + id,
url: $host_url + "deleteStudyMat",
success: function (responce) {
var responce = eval("(" + responce + ")");
if (responce.error_code == 0) {
alert(responce.data);
callupddegstudymat();
return;
} else {
alert(responce.data);
return;
}
},
});
} else {
}
}
|