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.216.92.5
/*
*
* PROGRAMED BY Natesha
* FOR THE freezeModuleAtUniversityOrCollege list ENTRY FORM
* DATE: 31/03/09
* TIME: 1:15 PM
*
*/
$g_fmacs_total_row_count = 0;
$g_fmacas_org_rem_sub = "";
$g_fmacas_rem_sub = "";
function LoadfreezeModuleAtAdminCollegesectionSubject() {
$g_fmacs_total_row_count = 0;
$g_fmacas_rem_sub = "";
$g_fmacas_org_rem_sub = "";
$("#page_main_div").load(
"../html_modules/subjectwise_freezing_sectionwise.html",
function () {
document.getElementById("display_module_name").innerHTML =
"Admin/Subject Freeze";
document.getElementById("module_name_for_save").value =
"freezeModuleAtAdminCollegeSubject";
document.getElementById("is_add_edit").value = "Add";
document.getElementById(
"freeze_module_at_university_college"
).style.height = "420px";
getDefaultHeadFooterLinks("Subjectwise Freezing Sectionwise");
$("#error_msg").html("");
$("#fmauc_module_colldeg_data").hide();
$("#fmauc_module_colldeg_data").html("");
$("#fmauc_degree_code").val("");
$("#fmauc_degree_code_degree_name").val("");
//$("#fmauc_college_range").val("");
ClearFreezeModuleAtAdminCollegeSubject();
loadiadeg();
$("#print_row").hide();
}
);
$("#module_details_div").hide();
}
function loadiadeg() {
$.ajax({
type: "POST",
url: $host_url + "loadiadeg",
success: loadiadegResponce,
});
}
function loadiadegResponce($responce) {
$responce = eval("(" + $responce + ")");
let degcode = $responce.data["degcode"];
document.getElementById("fmacas_degree_code").options.length = 0;
$op = new Option("-select-", "0");
$op.id = "";
document.getElementById("fmacas_degree_code").options.add($op);
for ($i = 0; $i < $responce.data.degcode.length; $i++) {
$op = new Option(
$responce.data.degcode[$i]["value"],
$responce.data.degcode[$i]["id"]
);
$op.id = $responce.data.degcode[$i]["id"];
document.getElementById("fmacas_degree_code").options.add($op);
}
}
function getIaExamno() {
$.ajax({
type: "POST",
data: "degcode=" + $("#fmacas_degree_code").val(),
url: $host_url + "getIaExamno",
success: getIaExamnoResponce,
});
}
function getIaExamnoResponce($responce) {
$responce = eval("(" + $responce + ")");
let degexam = $responce.data["degexam"];
let section = $responce.data["section"];
let usrtype = $responce.data["usrtype"];
document.getElementById("fmacas_sub_Examno").options.length = 0;
$op = new Option("-select-", "");
$op.id = "";
document.getElementById("fmacas_sub_Examno").options.add($op);
for ($i = 0; $i < $responce.data.degexam.length; $i++) {
$op = new Option(
$responce.data.degexam[$i]["value"],
$responce.data.degexam[$i]["id"]
);
$op.id = $responce.data.degexam[$i]["id"];
document.getElementById("fmacas_sub_Examno").options.add($op);
}
document.getElementById("fsection").options.length = 0;
$op = new Option("-select-", "");
$op.id = "";
document.getElementById("fsection").options.add($op);
if (usrtype == "40" || usrtype == "14") {
$op = new Option("All", "All");
$op.id = "All";
document.getElementById("fsection").options.add($op);
}
for ($i = 0; $i < $responce.data.section.length; $i++) {
$op = new Option(
$responce.data.section[$i]["value"],
$responce.data.section[$i]["id"]
);
$op.id = $responce.data.section[$i]["id"];
document.getElementById("fsection").options.add($op);
}
}
/* function freezeModuleAtUniversityOrCollegeAdminDownData($responce)
{
$responce = eval('(' + $responce + ')');
document.getElementById('fmacas_category_name').options.length=0;
for($i=0;$i <$responce.data.length;$i++)
{
$op = new Option($responce.data[$i]['Name'], $responce.data[$i]['Code']);
$op.id=$responce.data[$i]['Name'];//specifying the id for options
document.getElementById('fmacas_category_name').options.add($op);
}
} */
function getFmacasSubjectDetails() {
if (trim(document.getElementById("fmacas_degree_code").value) == "") {
alert("Please enter the Degree Code");
$("#fmacas_degree_code").focus();
return;
}
if (trim(document.getElementById("fmacas_sub_Examno").value) == "") {
alert("Please enter the Degree. Code");
$("#fmacas_sub_Examno").focus();
return;
}
if (trim(document.getElementById("fsection").value) == "") {
alert("Please enter the Section");
$("#fsection").focus();
return;
}
$.ajax({
type: "POST",
data:
"°ree=" +
$("#fmacas_degree_code").val() +
"&exam_no=" +
$("#fmacas_sub_Examno").val() +
"&fsection=" +
$("#fsection").val(),
url: $host_url + "getsectionSubjectDetails.demo",
success: getsectionSubjectDetailsResponce,
});
}
function getsectionSubjectDetailsResponce($responce) {
$responce = eval("(" + $responce + ")");
if ($responce.error_code == 0) {
$("#fmacas_module_subject_data").show();
$("#fmacas_module_subject_data").html("");
$("#fmacas_module_subject_data").html($responce.data.html_data);
$g_fmacas_total_row_count = $responce.data.total_count;
$g_fmacas_org_rem_sub = $responce.data.rem_sub;
$g_fmacas_rem_sub = $responce.data.rem_sub;
} else {
$("#fmacas_module_subject_data").show();
$("#fmacas_module_subject_data").html("");
$g_fmacas_total_row_count = 0;
}
}
function savefreezeModuleAtAdminCollegesectionSubject() {
if (trim(document.getElementById("fmacas_degree_code").value) == "") {
alert("Please enter the Degree. Code");
document.getElementById("fmacas_degree_code").focus();
return;
}
if (trim(document.getElementById("fmacas_sub_Examno").value) == "") {
alert("Please enter the Degree. Code");
document.getElementById("fmacas_sub_Examno").focus();
return;
}
if (trim(document.getElementById("fsection").value) == "") {
alert("Please enter the Section");
$("#fsection").focus();
return;
}
$checked_subjects = "";
$unchecked_subjects = "";
$arr = new Object();
for ($k = 0; $k < $g_fmacas_total_row_count; $k++) {
if (
document.getElementById("fmacas_FCSTATUS_check_" + $k).checked !=
document.getElementById("fmacas_FCSTATUS_checkH_" + $k).checked
) {
if (document.getElementById("fmacas_FCSTATUS_check_" + $k).checked)
$checked_subjects += trim($("#fmacas_FSUBCODE_" + $k).html()) + "*";
if (!document.getElementById("fmacas_FCSTATUS_check_" + $k).checked)
$unchecked_subjects += trim($("#fmacas_FSUBCODE_" + $k).html()) + "*";
}
}
//$g_fmacas_rem_sub = $g_fmacas_rem_sub+'*'+$checked_subjects;
$g_fmacas_rem_sub = $checked_subjects;
// alert($g_fmacas_rem_sub);
$.ajax({
type: "POST",
data:
"degree=" +
$("#fmacas_degree_code").val() +
"&exam_no=" +
document.getElementById("fmacas_sub_Examno").value +
"&rem_sub=" +
$g_fmacas_rem_sub +
"&rem_unsub=" +
$unchecked_subjects +
"&fsection=" +
$("#fsection").val(),
url: $host_url + "savefreezeModuleAtAdminCollegesectionSubject.demo",
success: savefreezeModuleAtAdminCollegeSubjectResponce,
});
}
function savefreezeModuleAtAdminCollegeSubjectResponce($responce) {
$responce = eval("(" + $responce + ")");
alert($responce.data);
$g_fmacas_rem_sub = $g_fmacas_org_rem_sub;
document.getElementById("fmacas_module_subject_data").innerHTML = "";
}
function checkAllFamuFcSubjects($id) {
if (document.getElementById($id).checked) {
for ($k = 0; $k < $g_fmacas_total_row_count; $k++) {
document.getElementById("fmacas_FCSTATUS_check_" + $k).checked = true;
}
} else {
for ($k = 0; $k < $g_fmacas_total_row_count; $k++) {
document.getElementById("fmacas_FCSTATUS_check_" + $k).checked = false;
}
}
}
function ClearFreezeModuleAtAdminCollegeSubject() {
document.getElementById("fmacas_degree_code").value = "";
document.getElementById("fmacas_sub_Examno").value = "";
document.getElementById("fsection").value = "";
}
|