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.136.19.136
Current Path : /var/www/html/stph/js/ |
| Current File : /var/www/html/stph/js/attendance_freez_mth.js |
/*
*
* 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 Loadattendancefreezmth()
{
$g_fmacs_total_row_count=0;
$g_fmacas_rem_sub='';
$g_fmacas_org_rem_sub='';
$("#page_main_div").load('html_modules/attendance_freez_mth.html',function()
{
document.getElementById('display_module_name').innerHTML = 'Attendance Freeze Mothwise';
document.getElementById('module_name_for_save').value = 'Attendance Freeze';
document.getElementById('is_add_edit').value = 'Add';
document.getElementById('freeze_module_at_university_college').style.height='420px';
getDefaultHeadFooterLinks('Attendance Freeze');
$("#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("");
$("#print_row").hide();
}
);
$('#module_details_div').hide();
}
/* 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 getattfreezdeatils()
{
if(trim(document.getElementById('college_code_from').value) == '' )
{
alert('Please Enter the From Collge Code');
$("#college_code_from").focus();
return;
}
if(trim(document.getElementById('college_code_to').value) == '' )
{
alert('Please Enter the To Collge Code');
$("#college_code_to").focus();
return;
}
if(trim(document.getElementById('degree_code_from').value) == '' )
{
alert('Please Enter the From Degree Code');
$("#degree_code_from").focus();
return;
}
if(trim(document.getElementById('degree_code_to').value) == '' )
{
alert('Please Enter the From Degree Code');
$("#degree_code_to").focus();
return;
}
if(trim(document.getElementById('Examno_from').value) == '' )
{
alert('Please Enter the From Exam No');
$("#Examno_from").focus();
return;
}
if(trim(document.getElementById('Examno_to').value) == '' )
{
alert('Please Enter the To Exam No');
$("#Examno_to").focus();
return;
}
//$.blockUI({ message: "<h1 class='h1' style='font-size:12px'><img src='img/ajax-loader.gif' border='0'></h1>" });
$.ajax({
type: "POST",
data:"°from="+$("#degree_code_from").val()+"°to="+$("#degree_code_to").val()+"&collfrom="+$("#college_code_from").val()+"&collto="+$("#college_code_to").val()+"&examfrom="+$("#Examno_from").val()+"&examto="+$("#Examno_to").val()+"&mth="+$("#month_name").val(),
url: $host_url+"getattfreezdeatils.demo",
success: getattfreezdeatilsResponce
});
}
function getattfreezdeatilsResponce($responce)
{
$responce = eval('(' + $responce + ')');
//$.unblockUI();
$('#freeze_module_at_university_college').show();
if($responce.error_code==0)
{
$("#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;
//alert($('#fmacas_subcode_1').text());
$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 saveattfreezmth()
{
if(trim(document.getElementById('college_code_from').value) == '' )
{
alert('Please Enter the From Collge Code');
$("#college_code_from").focus();
return;
}
if(trim(document.getElementById('college_code_to').value) == '' )
{
alert('Please Enter the To Collge Code');
$("#college_code_to").focus();
return;
}
if(trim(document.getElementById('degree_code_from').value) == '' )
{
alert('Please Enter the From Degree Code');
$("#degree_code_from").focus();
return;
}
if(trim(document.getElementById('degree_code_to').value) == '' )
{
alert('Please Enter the From Degree Code');
$("#degree_code_to").focus();
return;
}
if(trim(document.getElementById('Examno_from').value) == '' )
{
alert('Please Enter the From Exam No');
$("#Examno_from").focus();
return;
}
if(trim(document.getElementById('Examno_to').value) == '' )
{
alert('Please Enter the To Exam No');
$("#Examno_to").focus();
return;
}
var arraychecked = {};
var arraynotchecked = {};
var z = 1;
var chknotcnt = 0;
for($k=0;$k<$g_fmacas_total_row_count;$k++)
{
if(document.getElementById("fmacas_FCSTATUS_check_"+$k).checked)
{
arraychecked[z] = new Object();
arraychecked[z]['subcode'] = $('#fmacas_subcode_'+$k).text();
arraychecked[z]['collcode'] = $('#fmacas_collcode_'+$k).text();
arraychecked[z]['degree'] = $('#fmacas_degree_'+$k).text();
arraychecked[z]['examno'] = $('#fmacas_examno_'+$k).text();
z++;
}
if(!document.getElementById("fmacas_FCSTATUS_check_"+$k).checked)
{
++chknotcnt;
arraynotchecked[chknotcnt] = new Object();
arraynotchecked[chknotcnt]['subcode'] = $('#fmacas_subcode_'+$k).text();
arraynotchecked[chknotcnt]['collcode'] = $('#fmacas_collcode_'+$k).text();
arraynotchecked[chknotcnt]['degree'] = $('#fmacas_degree_'+$k).text();
arraynotchecked[chknotcnt]['examno'] = $('#fmacas_examno_'+$k).text();
}
}
var datastring = "°from="+$("#degree_code_from").val()+"°to="+$("#degree_code_to").val()+"&collfrom="+$("#college_code_from").val()+"&collto="+$("#college_code_to").val()+"&examfrom="+$("#Examno_from").val()+"&examto="+$("#Examno_to").val()+"&arraychecked="+encodeURIComponent(JSON.stringify(arraychecked))+"&arraynotchecked="+encodeURIComponent(JSON.stringify(arraynotchecked))+"&mth="+$("#month_name").val();
$.ajax({
type: "POST",
data:datastring,
url: $host_url+"saveattfreezmth.demo",
success: saveattfreezmthResponce
});
}
function saveattfreezmthResponce($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_degree_name').value = '';
document.getElementById('fmacas_sub_Examno').value = '';
document.getElementById('fmacas_sub_Exam_name').value = '';
document.getElementById('fmacas_module_subject_data').innerHTML = '';
}
|