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.116.88.132
/*
*
* FOR THE CANDIDATE list ENTRY FORM
* PROGRAMED BY Natesha
* DATE: 13/03/09
* TIME: 1:15 PM
*
*/
$g_total_count_of_each_div=0;
$g_student_reg_no_exam_details='';
window.location.g_FeePopUpExamNo='';
window.location.fee_exam_A='';
window.location.fee_exam_B='';
window.location.fee_exam_C='';
window.location.fee_exam_D='';
window.location.fee_exam_E='';
window.location.fee_exam_F='';
window.location.fee_exam_G='';
window.location.fee_exam_H='';
window.location.fee_exam_I='';
window.location.fee_exam_J='';
function LoadcandidateList()
{
$("#page_main_div").load('html_modules/candidate_list.html',function()
{
window.location.g_FeePopUpExamNo='';
document.getElementById('display_module_name').innerHTML = 'Candidate List';
document.getElementById('module_name_for_save').value = 'candidate_list';
document.getElementById('is_add_edit').value = 'Add';
clearcandidateList();
$("#candidate_list_degree_code").focus();
$("#error_msg").html("");
$("#candidate_list_reg_no_details").html("");
$("#candidate_list_reg_no_details").hide();
getCategoryNames('candidate_list_category');
$g_total_count_of_each_div=0;
$g_student_reg_no_exam_details='';
getDefaultHeadFooterLinks("Application Form");
enableCandidateHeaderFields();
$("#candidate_list_exam_A_details").hide();
$("#candidate_list_exam_B_details").hide();
$("#candidate_list_exam_C_details").hide();
$("#candidate_list_exam_D_details").hide();
$("#candidate_list_exam_E_details").hide();
$("#candidate_list_exam_F_details").hide();
$("#candidate_list_exam_G_details").hide();
$("#candidate_list_exam_H_details").hide();
$("#candidate_list_exam_I_details").hide();
$("#candidate_list_exam_J_details").hide();
$("#candidate_list_footer_details").hide();
}
);
$('#module_details_div').hide();
}
function clearcandidateList()
{
$("#candidate_list_degree_code").val('');
$("#candidate_list_degree_name").val('');
$("#candidate_list_reg_no").val('');
$("#candidate_list_reg_name").val('');
$("#Candidate_total_fee").html('');
$("#candidate_list_date").val('');
$("#candidate_list_receipt_no").val('');
$("#candidate_list_remarks").val('');
$g_total_exam_details='';
window.location.fee_exam_A='';
window.location.fee_exam_B='';
window.location.fee_exam_C='';
window.location.fee_exam_D='';
window.location.fee_exam_E='';
window.location.fee_exam_F='';
window.location.fee_exam_G='';
window.location.fee_exam_H='';
window.location.fee_exam_I='';
window.location.fee_exam_J='';
}
function displayCandidateEntryRegNoDetails()
{
$.ajax({
type: "POST",
async:false,
data: "Regno="+$("#candidate_list_reg_no").val()+"°ree="+$("#candidate_list_degree_code").val(),
url: $host_url+"displayCandidateEntryRegNoDetails.demo",
success: displayCandidateEntryRegNoDetailsResponse
});
}
function displayCandidateEntryRegNoDetailsResponse($responce)
{
$responce = eval('(' + $responce + ')');
if($responce.error_code==0)
{
disableCandidateHeaderFields();
$g_total_count_of_each_div=$responce.data.total_count_of_each_div;
$g_student_reg_no_exam_details=$responce.data.table_data;
$("#candidate_list_category").val($responce.data.table_data.FCATEGORY);
$("#candidate_list_sex").val($responce.data.table_data.FSEX);
$("#candidate_list_reg_no_details").html($responce.data.html_data);
$("#candidate_list_reg_no_details").show();
$("#candidate_list_exam_A_details").html("");
$("#candidate_list_exam_B_details").html("");
$("#candidate_list_exam_C_details").html("");
$("#candidate_list_exam_D_details").html("");
$("#candidate_list_exam_E_details").html("");
$("#candidate_list_exam_F_details").html("");
$("#candidate_list_exam_G_details").html("");
$("#candidate_list_exam_H_details").html("");
$("#candidate_list_exam_I_details").html("");
$("#candidate_list_exam_J_details").html("");
$("#Candidate_total_fee").html('');
$("#candidate_list_date").val('');
$("#candidate_list_receipt_no").val('');
$("#candidate_list_remarks").val('');
$("#candidate_list_exam_A_details").html($responce.data.candidate_list_exam_A_details);
$("#candidate_list_exam_B_details").html($responce.data.candidate_list_exam_B_details);
$("#candidate_list_exam_C_details").html($responce.data.candidate_list_exam_C_details);
$("#candidate_list_exam_D_details").html($responce.data.candidate_list_exam_D_details);
$("#candidate_list_exam_E_details").html($responce.data.candidate_list_exam_E_details);
$("#candidate_list_exam_F_details").html($responce.data.candidate_list_exam_F_details);
$("#candidate_list_exam_G_details").html($responce.data.candidate_list_exam_G_details);
$("#candidate_list_exam_H_details").html($responce.data.candidate_list_exam_H_details);
$("#candidate_list_exam_I_details").html($responce.data.candidate_list_exam_I_details);
$("#candidate_list_exam_J_details").html($responce.data.candidate_list_exam_J_details);
$("#candidate_list_date").val($responce.data.date);
$("#candidate_list_receipt_no").val($g_student_reg_no_exam_details.FRECPTNO);
$("#candidate_list_date").val(($g_student_reg_no_exam_details.FRECPTDATE));
$("#candidate_list_remarks").val($g_student_reg_no_exam_details.FREMARKS);
document.getElementById("cand_entry_A").checked=true;
showExamNosDiv('candidate_list_exam_A_details');
$("#candidate_list_footer_details").show();
}
}
function hideAllDivs()
{
$("#candidate_list_reg_no_details").hide();
$("#candidate_list_exam_A_details").hide();
$("#candidate_list_exam_B_details").hide();
$("#candidate_list_exam_C_details").hide();
$("#candidate_list_exam_D_details").hide();
$("#candidate_list_exam_E_details").hide();
$("#candidate_list_exam_F_details").hide();
$("#candidate_list_exam_G_details").hide();
$("#candidate_list_exam_H_details").hide();
$("#candidate_list_exam_I_details").hide();
$("#candidate_list_exam_J_details").hide();
$("#candidate_list_footer_details").hide();
}
function showExamNosDiv($id)
{
$div_id_split=$id.split("_");
$char_code=$div_id_split[3];
document.getElementById("cand_entry_"+$char_code).checked=true;
$("#candidate_list_exam_A_details").hide();
$("#candidate_list_exam_B_details").hide();
$("#candidate_list_exam_C_details").hide();
$("#candidate_list_exam_D_details").hide();
$("#candidate_list_exam_E_details").hide();
$("#candidate_list_exam_F_details").hide();
$("#candidate_list_exam_G_details").hide();
$("#candidate_list_exam_H_details").hide();
$("#candidate_list_exam_I_details").hide();
$("#candidate_list_exam_J_details").hide();
$("#"+$id).show();
$total_fee=0.0;
for($k=65;$k<75;$k++)
{
$char_code=String.fromCharCode($k) ;
if($g_total_count_of_each_div && $("#candidate_list_exam_"+$char_code+"_details_total")!='' && $g_total_count_of_each_div["candidate_list_exam_"+$char_code+"_details"])
{
if($("#candidate_list_exam_"+$char_code+"_details_total").val()=='')
$("#candidate_list_exam_"+$char_code+"_details_total").val('0.00');
$total_fee=eval($total_fee+parseFloat($("#candidate_list_exam_"+$char_code+"_details_total").val()));
}
}
$("#Candidate_total_fee").html(roundNumber($total_fee,2));
}
function saveCandidateEntryDetails()
{
if(trim(document.getElementById('candidate_list_degree_code').value) == '' )
{
alert('Please enter the Degree. Code');
document.getElementById('candidate_list_degree_code').focus();
return;
}
else if(trim(document.getElementById('candidate_list_reg_no').value) == '' )
{
alert('Please enter the Reg No');
document.getElementById('candidate_list_reg_no').focus();
return;
}
else if(trim(document.getElementById('candidate_list_date').value) == '' )
{
alert('Please enter the Date');
document.getElementById('candidate_list_date').focus();
return;
}
else if (!isDate(document.getElementById('candidate_list_date').value,'d/M/y'))
{
alert('Please Enter Valid date as dd//mm/yy');
document.getElementById('candidate_list_date').focus();
return;
}
//################Check Empty Subjects Starts#################################
for($c_code=65;$c_code<75;$c_code++)
{
$char_code=String.fromCharCode($c_code);
$div_id="candidate_list_exam_"+$char_code+"_details";
$div_id_total="candidate_list_exam_"+$char_code+"_details_total";
$div_id_date="exam_"+$char_code+"_date";
if($g_total_count_of_each_div[$div_id]>0 )
{
$checked_flag=0;
$total_rows=$g_total_count_of_each_div[$div_id];
$n=0;
$exam_fee=parseFloat($("#"+$div_id_total).val());
for($k=0;$k<$total_rows;$k++)
{
$input_id="exam_"+$char_code+"_ce_sub_code_"+$k;
$pass_id="exam_"+$char_code+"_ce_pass_"+$k;
$year_id="exam_"+$char_code+"_ce_pass_"+$k;
if(document.getElementById($year_id).checked==true)
$checked_flag=1;
if(($checked_flag==0 && $exam_fee>0) || ($checked_flag==1 && $exam_fee==0.00))
{
/* if(trim($("#"+$input_id).val())=='')
{
showExamNosDiv($div_id);
alert("Please select All Subjects..");
$("#"+$input_id).focus();
return;
} */
}
/* if(!isDate(document.getElementById($div_id_date).value,'d/M/y'))
{
alert("Please enter the date format as dd/mm/yyy");
showExamNosDiv($div_id);
return;
} */
}
if($checked_flag==0 && $exam_fee>0)
{
alert("Please select any subject as you have entered Exam Fee");
showExamNosDiv($div_id);
$("#"+$div_id_total).focus();
return;
}
else if($checked_flag==1 && $exam_fee==0.00)
{
alert("Please Enter the Exam Fee since you have allready selected subjects");
showExamNosDiv($div_id);
$("#"+$div_id_total).focus();
return;
}
}
}
//################Check Empty Subjects ENDS#################################
showExamNosDiv('candidate_list_exam_A_details')
$degree=trim(document.getElementById('candidate_list_degree_code').value);
$reg_no=trim(document.getElementById('candidate_list_reg_no').value);
$total_fee=trim(document.getElementById('Candidate_total_fee').innerHTML);
$candidate_list_date=date_format(trim($('#candidate_list_date').val()));
$candidate_list_receipt_no=encodeURIComponent(trim($('#candidate_list_receipt_no').val()));
$candidate_list_remarks=encodeURIComponent(trim($('#candidate_list_remarks').val()));
$total_fee=trim(document.getElementById('Candidate_total_fee').innerHTML);
$details = new Object();
$fee_details = new Object();
$sub_details = new Object();
for($c_code=65;$c_code<75;$c_code++)
{
$char_code=String.fromCharCode($c_code);
$div_id="candidate_list_exam_"+$char_code+"_details";
$div_id_total="candidate_list_exam_"+$char_code+"_details_total";
$div_id_receipt_no="exam_"+$char_code+"_receipt_no";
$div_id_date="exam_"+$char_code+"_date";
$app_id="FAPPEAR"+$char_code;
$details[$char_code] = new Object();
$fee_details[$char_code] = new Object();
$sub_details[$char_code] = new Object();
$sub_fee = new Object();
if($g_total_count_of_each_div[$div_id]>0 && $g_student_reg_no_exam_details[$app_id]!='N' && $g_student_reg_no_exam_details[$app_id]!='P' )
{
$total_rows=$g_total_count_of_each_div[$div_id];
$sub_arr='';
$sub_arr="\$exam_"+$char_code;
$sub_arr = new Object();
$sub_fee='';
$sub_fee="\$exam_"+$char_code;
$sub_fee = new Object();
$sub_fee[0] = new Object();
$sub_fee[0]['total_fee']=trim($("#"+$div_id_total).val());
$sub_fee[0]['receipt_no']=trim($("#"+$div_id_receipt_no).val());
$sub_fee[0]['date']=date_format(trim($("#"+$div_id_date).val()));
$fee='';
$fee="\$exam_"+$char_code;
$fee= new Object();
$fee=eval("window.location.fee_exam_"+$char_code);
$n=0;
for($k=0;$k<$total_rows;$k++)
{
$input_id="exam_"+$char_code+"_ce_sub_code_"+$k;
$pass_id="exam_"+$char_code+"_ce_pass_"+$k;
if(trim($("#"+$input_id).val())!='')
{
$sub_arr[$n]= new Object();
$sub_arr[$n]['sub_code']=trim($("#"+$input_id).val());
$sub_arr[$n]['oper']=document.getElementById($input_id).name;
$sub_arr[$n]['FEXAMNO']=$char_code;
if(document.getElementById($pass_id).type=='checkbox')
{
if(document.getElementById($pass_id).checked==true)
$sub_month_year=1;
else
$sub_month_year=0;
}
else
$sub_month_year=-1;
$sub_arr[$n]['sub_month_year']=$sub_month_year;
$n++;
}
}
var myJSONText='';
myJSONText =($sub_arr) ;
$details[$char_code]=myJSONText;
var myJSONSubText='';
myJSONSubText =($sub_fee) ;
$sub_details[$char_code]=myJSONSubText;
var myJSONFeeText='';
myJSONFeeText =($fee) ;
$fee_details[$char_code]=myJSONFeeText;
}
else
{
$details[$char_code]='';
$sub_fee[$char_code] =0;
$sub_fee[$char_code] =0;
$sub_fee[$char_code] =0;
$fee_details[$char_code] =0;
}
}
/* $.ajax({
type: "POST",
async:false,
data: "reg_no="+$reg_no+"°ree="+$degree+"&total_fee="+$total_fee+"&details="+encodeURIComponent(JSON.stringify($details))+"&sub_fee="+encodeURIComponent(JSON.stringify($sub_details))+"&fee_details="+encodeURIComponent(JSON.stringify($fee_details))+"&candidate_list_date="+$candidate_list_date+"&candidate_list_receipt_no="+$candidate_list_receipt_no+"&candidate_list_remarks="+$candidate_list_remarks,
url: $host_url+"saveCandidateEntryDetails.demo",
success: saveCandidateEntryDetailsResponse
}); */
var valid_file_extentions = new Array("jpeg","jpg",'png','gif');
var ext=$("#student_entry_upload").val();
filepath=ext;
ext = ext.substring(ext.length-3,ext.length);
ext = ext.toLowerCase();
if(ext != "" && !in_array(ext,valid_file_extentions))
{
alert("Please Select the Valid Photo!");
return false;
}
var data="®_no="+$reg_no+"°ree="+$degree+"&total_fee="+$total_fee+"&details="+encodeURIComponent(JSON.stringify($details))+"&sub_fee="+encodeURIComponent(JSON.stringify($sub_details))+"&fee_details="+encodeURIComponent(JSON.stringify($fee_details))+"&candidate_list_date="+$candidate_list_date+"&candidate_list_receipt_no="+$candidate_list_receipt_no+"&candidate_list_remarks="+$candidate_list_remarks;
data+="&filepath="+filepath;
data+="&unlink_file="+encodeURIComponent($("#student_entry_photo").attr('src'));;
var full_url=$host_url+"saveCandidateEntryDetails.demo&"+data;
document.getElementById("form_module_image_upload").setAttribute("action",full_url);
return AIM.submit(document.getElementById("form_module_image_upload"), 'report_display',{'onComplete' : saveCandidateEntryDetailsResponse});
// return AIM.submit(document.getElementById("form_module_image_upload"), 'new_tab',{'onComplete' : saveCandidateEntryDetailsResponse});
}
function saveCandidateEntryDetailsResponse($responce)
{
$responce = eval('(' + $responce + ')');
alert($responce.data);
$("#student_entry_photo").attr("src", "images/default_photo.jpg");
var confirm_tag=confirm("Do You Want to Print Admission Ticket?")
if(confirm_tag)
{
printCandidateAdmTicketRecord();
}
else
enableCandidateHeaderFields();
}
function disableCandidateHeaderFields()
{
document.getElementById('candidate_list_degree_code').disabled=true;
document.getElementById('candidate_list_reg_no').disabled=true;
}
function enableCandidateHeaderFields()
{
document.getElementById('candidate_list_degree_code').disabled=false;
document.getElementById('candidate_list_reg_no').disabled=false;
$("#candidate_list_reg_no").val('');
$("#candidate_list_reg_name").val('');
$("#Candidate_total_fee").html('');
$("#candidate_list_date").val('');
$("#candidate_list_receipt_no").val('');
$("#candidate_list_remarks").val('');
$g_total_exam_details='';
window.location.fee_exam_A='';
window.location.fee_exam_B='';
window.location.fee_exam_C='';
window.location.fee_exam_D='';
window.location.fee_exam_E='';
window.location.fee_exam_F='';
window.location.fee_exam_G='';
window.location.fee_exam_H='';
window.location.fee_exam_I='';
window.location.fee_exam_J='';
hideAllDivs();
document.getElementById('candidate_list_degree_code').focus();
}
function checkAllCandidateSemisterSub($full_div_id)
{
$div_id_split=$full_div_id.split("^");
$div_id=$div_id_split[0];
$div_name=$div_id_split[1];
if(document.getElementById($full_div_id).checked==true)
{
for($k=0;$k<$g_total_count_of_each_div[$div_id];$k++)
{
document.getElementById("exam_"+$div_name+"_ce_pass_"+$k).checked=true;
}
}
else if(document.getElementById($full_div_id).checked==false)
{
for($k=0;$k<$g_total_count_of_each_div[$div_id];$k++)
{
document.getElementById("exam_"+$div_name+"_ce_pass_"+$k).checked=false;
}
}
}
function CheckCheckBoxIsChecked($div_id)
{
$div_id_split=$div_id.split("_");
$char_code=$div_id_split[3];
$div_id_total=$div_id+"_total";
$exam_fee=parseFloat($("#"+$div_id_total).val());
$checked_flag=0;
if($g_total_count_of_each_div[$div_id]>0)
{
$total_rows=$g_total_count_of_each_div[$div_id];
for($k=0;$k<$total_rows;$k++)
{
$input_id="exam_"+$char_code+"_ce_pass_"+$k;
if(document.getElementById($input_id).checked==true)
$checked_flag=1;
}
if($checked_flag==0 && $exam_fee>0)
{
alert("Please select any subject as you have entered Exam Fee");
showExamNosDiv($div_id);
$("#"+$div_id_total).focus();
document.getElementById($div_id_total).focus();
return;
}
else if($checked_flag==1 && $exam_fee==0.00)
{
alert("Please Enter the Exam Fee since you have allready selected subjects");
showExamNosDiv($div_id);
$("#"+$div_id_total).focus();
return;
}
}
}
function GetFeePopUp($exam)
{
window.location.g_FeePopUpExamNo=$exam;
$('#dialog').dialog('open');
$("#dialog").data("width.dialog",430);
//$("#dialog").css({height:195});
$path="html_modules/GetFeePopUp.html";
$('#ui-dialog-title-dialog').html('Fee Details');
$('#dialog').html('');
$('#dialog').load($path);
/* var url = "html_modules/GetFeePopUp.html?height=100&width=400";
tb_show("Fee Details", url); */
}
function printCandidateAdmTicketRecord()
{
window.location.href = $host_url+"generateAdmissionTicket.demo°ree_code="+trim(($("#candidate_list_degree_code").val()))+"®_starts="+trim(($("#candidate_list_reg_no").val()))+"®_ends="+trim(($("#candidate_list_reg_no").val()));
//myRef = window.open(window.location.g_rem_rpt,'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');
//window.location.href = $host_url+"generateAdmissionTicket.demo°ree_code="+trim(($("#candidate_list_degree_code").val()))+"®_starts="+trim(($("#candidate_list_reg_no").val()))+"®_ends="+trim(($("#candidate_list_reg_no").val()));
//window.open(myRef,'welcome','width=300,height=200,menubar=yes,status=yes, location=yes,toolbar=yes,scrollbars=yes');
}
function GetCandidateListPhoto()
{
var degree=trim(document.getElementById('candidate_list_degree_code').value);
var reg_no=trim(document.getElementById('candidate_list_reg_no').value);
$.ajax({
type: "POST",
async:false,
data: "degree="+degree+"®_no="+reg_no,
url: $host_url+"GetCandidateListPhoto",
success: GetCandidateListPhotoResponse
});
}
function GetCandidateListPhotoResponse($responce)
{
$responce = eval('(' + $responce + ')');
if($responce.error_code==0)
$("#student_entry_photo").attr("src", $responce.data);
else if($responce.error_code==-1)
$("#student_entry_photo").attr("src", "images/default_photo.jpg");
}
|