0xV3NOMx
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.145.43.200


Current Path : /proc/thread-self/root/var/www/student/suk/libs/
Upload File :
Current File : //proc/thread-self/root/var/www/student/suk/libs/practical_entry_freezing.js

 var g_freeze_data="";
 var g_freeze_time="";// FREEZE TIMETABLE
function LoadEnablePracticalEntryFreezing(type)
{   
   //alert(type);
   g_freeze_time=type;
   $("#page_main_div").load('html_modules/practical_entry_freezing.html',function()
	{ 
		$geditinternalcode=0;
		window.enable_proper_module="enableLoadRevaluationt";
        if(g_freeze_time=="FREEZE")		
		{
		document.getElementById('display_module_name').innerHTML = 'Practical Entry Freezing';
		getDefaultHeadFooterLinks("Practical Entry Freezing"); 
		}
		else
		{
		document.getElementById('display_module_name').innerHTML = 'Batch Wise Time Table';
		$("#a_pr_id").html("Batchwise Time Table");
		getDefaultHeadFooterLinks("Batch Wise Time Table"); 
		}
		document.getElementById('module_name_for_save').value = 'SavePracticalEntryFreezing';
		document.getElementById('is_add_edit').value = 'Edit';	
		       
	});	 
}
function getPracticalEntryFreezeDetails()
{
if(empty(trim($("#fmacas_degree_code").val())))
	{
		alert("Please Enter Degree");
		return false;
	}if(empty(trim($("#fmacas_sub_Examno").val())))
	{
		alert("Please Enter Exam");
		return false;
	} 
	
 	var str="&degree_code="+trim($("#fmacas_degree_code").val());
		str+="&exam_no="+trim($("#fmacas_sub_Examno").val());		
		str+="&subject="+trim($("#fmacas_sub_final_subcode").val());		
		str+="&g_freeze_time="+g_freeze_time;		
$.blockUI({ message: "<h1 class='h1' style='font-size:12px'>Freezing... <img src='images/spinner.gif' border='0'></h1>" }); 		 	
			 $.ajax({
			        type: "POST",					
				   	url: $host_url+"getPracticalEntryFreezeDetails",
					data:str,
					success: getPracticalEntryFreezeDetailsResponce
				});	
	
}
function getPracticalEntryFreezeDetailsResponce(responce)
{
	responce = eval('(' + responce + ')');
	$.unblockUI();
    g_freeze_data=responce.data.freeze_data;
	if(responce.error_code == '0')
	{
	 $("#fmacas_module_subject_data").html(responce.data.html_data);
	 $("#fmacas_module_subject_data").show();	
	}
	else
	{
	$("#fmacas_module_subject_data").html("<div align='left'>No Records Found</left>");
	 $("#fmacas_module_subject_data").show();
	}
	$("#batch_sl_no_0").focus();
 
}

function FreezePracticalMaks()
{
	if(empty(trim($("#fmacas_degree_code").val())))
	{
		alert("Please Enter Degree");
		return false;
	}if(empty(trim($("#fmacas_sub_Examno").val())))
	{
		alert("Please Enter Exam");
		return false;
	} if(empty(trim($("#fmacas_sub_final_subcode").val())))
	{
		alert("Please Enter Subject");
		return false;
	} 
   	var freeze_obj=new Object();
	j=0;
	var sub_code_freeze=$("input[id*='fmacas_FCSTATUS_check']");
	jQuery.each(sub_code_freeze, function(ke, v) 
		{	
		    var check_box_id=v['id'];
			check_box_id_arr=check_box_id.split('fmacas_FCSTATUS_check_');
			int_code=check_box_id_arr[1];
			checked="F";
            if(document.getElementById(check_box_id).checked==true)
			checked="T"; 
			
			p_id="fmacas_print_check_"+int_code;
			p_checked="F";
            if(document.getElementById(p_id).checked==true)
			p_checked="T";   
			
             freeze_obj[j]=new Object();	         	
          	 freeze_obj[j]['sub_code_freeze']=trim($("#fmacas_FSUBCODE_"+int_code).html());
          	 freeze_obj[j]['batch']=trim($("#batch_"+int_code).html());
          	 freeze_obj[j]['date']=date_format($("#practical_entry_freeze_exam_date_"+int_code).val());
          	 freeze_obj[j]['time']=($("#time_"+int_code).val());
          	 freeze_obj[j]['checked']=checked;
          	 freeze_obj[j]['p_checked']=p_checked;
			 j++;
			 
            			
		});
	var myJSONText = JSON.stringify(freeze_obj);  
	
   	var str="&degree_code="+trim($("#fmacas_degree_code").val());
		str+="&exam_no="+trim($("#fmacas_sub_Examno").val());	
		str+="&subject="+trim($("#fmacas_sub_final_subcode").val());		
		str+="&output_details="+myJSONText;	
		$.blockUI({ message: "<h1 class='h1' style='font-size:12px'>Saving... <img src='images/spinner.gif' border='0'></h1>" }); 	
			 $.ajax({
			        type: "POST",					
				   	url: $host_url+"FreezePracticalMaks",
					data:str,
					success: FreezePracticalMaksResponce
				});
}

function FreezePracticalMaksResponce(responce)
{
	responce = eval('(' + responce + ')');
	$.unblockUI();
	$("#fmacas_module_subject_data").html("");
	alert(responce.data);
	getPracticalEntryFreezeDetails();
 
}
 
function GenerateBatchWorkSheetsFromLink(id)
{
	degree=trim($("#fmacas_degree_code").val());
	exam=trim($("#fmacas_sub_Examno").val());
	sub=trim($("#fmacas_sub_final_subcode").val());
	from_batch=trim($("#batch_"+id).html());
	to_batch=trim($("#batch_"+id).html());
	
	var str="&degree="+degree;
	str+="&degree_name="+trim($("#fmacas_degree_name").val());
	str+="&sub_name="+trim($("#fmacas_sub_fsubname").val());
	str+="&exam="+exam;
	str+="&sub="+sub;
	str+="&fs_sub_name="+trim($("#fmacas_sub_fssubname").val());
	str+="&from_batch="+from_batch; 
	str+="&to_batch="+to_batch;
	 window.location.href = $host_url+"GenerateBatchWorkSheets"+str;  
}
function GeneratePracticalMarksReportsFromLink(id)
{
	degree=trim($("#fmacas_degree_code").val());
	exam=trim($("#fmacas_sub_Examno").val());
	sub=trim($("#fmacas_sub_final_subcode").val());
	from_qp_code=sub;
	to_qp_code=sub;
	batch_no=trim($("#batch_"+id).html());
	 
	var str="&degree="+degree;
	str+="&degree_name="+trim($("#batch_sub_degree_name").val());;
	str+="&sub_name="+trim($("#batch_sub_fsubname").val());;
	str+="&batch_no="+batch_no;
	str+="&sub_name="+trim($("#fmacas_sub_fsubname").val());
	str+="&exam="+exam;
	str+="&sub="+sub;
	str+="&fs_sub_name="+trim($("#fmacas_sub_fssubname").val());
	str+="&from_qp_code="+from_qp_code; 
	str+="&to_qp_code="+to_qp_code;
	  window.location.href = $host_url+"GeneratePracticalMarksReports"+str;  
}

function GenerateFromBatchBatchTimeTable()
{
	degree=trim($("#fmacas_degree_code").val());
	exam=trim($("#fmacas_sub_Examno").val());
	sub=trim($("#fmacas_sub_final_subcode").val());
	from_batch=trim($("#from_batch").val());
	to_batch=trim($("#to_batch").val());
	if(empty(degree))
	{
		alert("Please Select Degree!!");
		return false;
	}
	else if(empty(exam))
	{
		alert("Please Select exam!!");
		return false;
	}else if(empty(sub))
	{
		alert("Please Select sub!!");
		return false;
	}
 
	var str="&degree="+degree;
	str+="&degree_name="+trim($("#fmacas_degree_code").val());
	str+="&sub_name="+trim($("#fmacas_sub_fsubname").val());
	str+="&fs_sub_name="+trim($("#fmacas_sub_fsubname").val());
	str+="&exam="+exam;
	str+="&sub="+sub;
	str+="&from_batch="+from_batch; 
	str+="&to_batch="+to_batch;
	$('#batch_dialog').dialog('close');
	  window.location.href = $host_url+"GenerateBatchSetupDetails"+str;  
}
function GenerateBatchWorkSheetsFromBatchTimeTable()
{
	degree=trim($("#fmacas_degree_code").val());
	exam=trim($("#fmacas_sub_Examno").val());
	sub=trim($("#fmacas_sub_final_subcode").val());
	from_batch=trim($("#from_batch").val());
	to_batch=trim($("#to_batch").val());
	if(empty(degree))
	{
		alert("Please Select Degree!!");
		return false;
	}
	else if(empty(exam))
	{
		alert("Please Select exam!!");
		return false;
	}else if(empty(sub))
	{
		alert("Please Select sub!!");
		return false;
	}
 
	var str="&degree="+degree;
	str+="&degree_name="+trim($("#fmacas_degree_code").val());
	str+="&sub_name="+trim($("#fmacas_sub_fsubname").val());
	str+="&fs_sub_name="+trim($("#fmacas_sub_fsubname").val());
	str+="&exam="+exam;
	str+="&sub="+sub;
	str+="&from_batch="+from_batch; 
	str+="&to_batch="+to_batch;
	  window.location.href = $host_url+"GenerateBatchWorkSheets"+str;  
}

function GeneratePracticalMarksReportsFromFreezeModule()
{
	degree=trim($("#fmacas_degree_code").val());
	exam=trim($("#fmacas_sub_Examno").val());
	sub=trim($("#fmacas_sub_final_subcode").val());
	from_qp_code=trim($("#fmacas_sub_final_subcode").val());
	to_qp_code=trim($("#fmacas_sub_final_subcode").val());
	batch_no="";
	if(empty(degree))
	{
		alert("Please Select Degree!!");
		return false;
	}
	else if(empty(exam))
	{
		alert("Please Select exam!!");
		return false;
	}else if(empty(sub))
	{
		alert("Please Select sub!!");
		return false;
	}
	else if(empty(from_qp_code))
	{
		alert("Please Select from_qp_code!!");
		return false;
	} 
	var str="&degree="+degree;
	str+="&degree_name="+trim($("#fmacas_degree_name").val());;
	str+="&sub_name="+trim($("#fmacas_sub_fsubname").val());;
	str+="&fs_sub_name="+trim($("#fmacas_sub_fssubname").val());;
	str+="&batch_no="+batch_no;
	str+="&exam="+exam;
	str+="&sub="+sub;
	str+="&from_qp_code="+from_qp_code; 
	str+="&to_qp_code="+to_qp_code;
	window.location.href = $host_url+"GeneratePracticalMarksReports"+str;  
}

function GenerateAttendanceSheetPreparation()
{
	degree=trim($("#fmacas_degree_code").val());
	exam=trim($("#fmacas_sub_Examno").val());
	sub=trim($("#fmacas_sub_final_subcode").val());
	from_batch=trim($("#from_batch").val());
	to_batch=trim($("#to_batch").val());
	if(empty(degree))
	{
		alert("Please Select Degree!!");
		return false;
	}
	else if(empty(exam))
	{
		alert("Please Select exam!!");
		return false;
	}else if(empty(sub))
	{
		alert("Please Select sub!!");
		return false;
	}
 
	var str="&degree="+degree;
	str+="&degree_name="+trim($("#fmacas_degree_code").val());
	str+="&sub_name="+trim($("#fmacas_sub_fsubname").val());
	str+="&fs_sub_name="+trim($("#fmacas_sub_fsubname").val());
	str+="&exam="+exam;
	str+="&sub="+sub;
	str+="&from_batch="+from_batch; 
	str+="&to_batch="+to_batch;
	window.location.href = $host_url+"GenerateAttendanceSheets"+str;   
}

function GenerateBatchpreparation()
{
	document.getElementById('module_name_for_save').value = 'bacthpreparation';
	GenerateBatchDairy();
	 
} 

function GenerateBatchpreparationDairy()
{
	degree=trim($("#fmacas_degree_code").val());
	exam=trim($("#fmacas_sub_Examno").val());
	sub=trim($("#fmacas_sub_final_subcode").val());
	from_batch=trim($("#from_batch").val());
	to_batch=trim($("#to_batch").val());
	if(empty(degree))
	{
		alert("Please Select Degree!!");
		return false;
	}
	else if(empty(exam))
	{
		alert("Please Select exam!!");
		return false;
	}else if(empty(sub))
	{
		alert("Please Select sub!!");
		return false;
	}
 
	 var str="&degree="+degree;
	str+="&degree_name="+trim($("#fmacas_degree_code").val());
	str+="&sub_name="+trim($("#fmacas_sub_fsubname").val());
	str+="&fs_sub_name="+trim($("#fmacas_sub_fsubname").val());
	str+="&exam="+exam;
	str+="&sub="+sub;
	str+="&from_batch="+from_batch; 
	str+="&to_batch="+to_batch;
	 window.location.href = $host_url+"GenerateBatchDairy"+str;  
	
}