<?php
$current_page = 'online-form.php' ;
include 'connect/cms-config.php' ;
include 'requires/function.php' ;

// include the class
include 'requires/class_resize.php' ;


// if submit the form
if ($_POST['hidden'] == '1'){

	$array_other_details = array() ;
	$result = 'failed' ;
	

		// personal information
	$positionApplyText = escapeString($_POST['positionApplyText']) ;
	$positionApplySelect = escapeString($_POST['positionApplySelect']) ;
	$expectedSalary = escapeString($_POST['expectedSalary']) ;
	$noticePeroid = escapeString($_POST['noticePeroid']) ;
	$referralName = escapeString($_POST['referralName']) ;
	$nric = escapeString($_POST['nric']);
	$personal_name = escapeString($_POST['personal_name']) ;
	$personal_name_chinese = escapeString($_POST['personal_name_chinese']) ;
	$personal_name_nickname = escapeString($_POST['personal_name_nickname']) ;
	$personal_dob = escapeString($_POST['personal_dob']) ;
	$personal_age = escapeString($_POST['personal_age']) ;
	$personal_email = escapeString($_POST['personal_email']) ;
	$personal_nationality = escapeString($_POST['personal_nationality']) ;
	$personal_religion = escapeString($_POST['personal_religion']) ;
	$personal_mobile = escapeString($_POST['personal_mobile']) ;
	$personal_home_tel = escapeString($_POST['personal_home_tel']) ;
	$personal_gender = escapeString($_POST['personal_gender']) ;// radio value male:female
	$personal_marital_status = escapeString($_POST['personal_marital_status']) ; // radio value single married ...
	$personal_lisence = escapeString($_POST['personal_lisence']) ; // radio value yes no
	$personal_lisence_class = escapeString($_POST['personal_lisence_class']) ; // only if personal lisence is yes
	$personal_permanent_address = escapeString($_POST['personal_permanent_address']) ;
	$personal_residential_address = escapeString($_POST['personal_residential_address']) ;

	// Family member
	$array_family_member = array();
	for ($i = 0; $i < 8; $i++) {
	    $array_family_member[] = array(
	        'name' => !empty($_POST['family_member_name'][$i]) ? $_POST['family_member_name'][$i] : '',
	        'age' => !empty($_POST['family_member_age'][$i]) ? $_POST['family_member_age'][$i] : '',
	        'occupation' => !empty($_POST['family_member_occupation'][$i]) ? $_POST['family_member_occupation'][$i] : '',
	        'relationship' => !empty($_POST['family_member_relationship'][$i]) ? $_POST['family_member_relationship'][$i] : '',
	        'company' => !empty($_POST['family_member_company'][$i]) ? $_POST['family_member_company'][$i] : ''
	    );
	}
	
	// education background
	$array_education_level = array();
	for ($i = 0; $i < 5; $i++) {
	    $array_education_level[] = array(
	        'schoolName' => !empty($_POST['education_name_school'][$i]) ? $_POST['education_name_school'][$i] : '',
	        'startYear' => !empty($_POST['education_start_year'][$i]) ? $_POST['education_start_year'][$i] : '',
	        'finishYear' => !empty($_POST['education_finish_year'][$i]) ? $_POST['education_finish_year'][$i] : '',
	        'grade' => !empty($_POST['education_grade'][$i]) ? $_POST['education_grade'][$i] : '',
	        'qualification' => !empty($_POST['education_qualification'][$i]) ? $_POST['education_qualification'][$i] : ''
	    );
	}

	// professional qualification
	$array_professional_qualification = array();
	for ($i = 0; $i < 5; $i++) {
	    $array_professional_qualification[] = array(
	        'qualification' => !empty($_POST['professional_qualification'][$i]) ? $_POST['professional_qualification'][$i] : '',
	        'accredited' => !empty($_POST['professional_accredited_by'][$i]) ? $_POST['professional_accredited_by'][$i] : '',
	        'startYear' => !empty($_POST['professional_qualification_start_year'][$i]) ? $_POST['professional_qualification_start_year'][$i] : '',
	        'finishYear' => !empty($_POST['professional_qualification_finish_year'][$i]) ? $_POST['professional_qualification_finish_year'][$i] : '',
	    );
	}

	// language proficiency
	$spoken_english = $_POST['spoken_english'];
	$written_english = $_POST['written_english'];
	$spoken_mandarin = $_POST['spoken_mandarin'];
	$written_mandarin = $_POST['written_mandarin'];
	$spoken_bm = $_POST['spoken_bm'];
	$written_bm = $_POST['written_bm'];
	$language_other_1=$_POST['language_other_1'];
	$spoken_other1 = $_POST['spoken_other1'];
	$written_other1 = $_POST['written_other1'];
	$language_other_2 = $_POST['language_other_2'];
	$spoken_other2 = $_POST['spoken_other2'];
	$written_other2 = $_POST['written_other2'];


	//REFERENCE DETAIL
	$array_reference = array();
	for ($i = 0; $i < 2; $i++) {
	    $array_reference[] = array(
	        'name' => !empty($_POST['references_name'][$i]) ? $_POST['references_name'][$i] : '',
	        'position' => !empty($_POST['references_position'][$i]) ? $_POST['references_position'][$i] : '',
	        'contact' => !empty($_POST['references_contacts'][$i]) ? $_POST['references_contacts'][$i] : '',
	        'year' => !empty($_POST['references_years'][$i]) ? $_POST['references_years'][$i] : '',
	    );
	}

	//employment history
	$currentCompanyName = $_POST['current_company_name'];
	$currentCompanyPosition = $_POST['current_position_name'];
	$currentCompanyAddress = $_POST['current_company_full_address'];
	$currentCompanyJoinDate = $_POST['current_company_join_date'];
	$currentCompanyLeftDate = $_POST['current_company_left_date'];
	$currentCompanySalary = $_POST['current_company_basic_salary'];
	$currentCompanyAllowance = $_POST['current_company_fix_allowance']; 
	$currentCompanyReason = $_POST['current_company_leave_reason'];


	//subsequent employment history
	$array_subsequent_employment = array() ;
	for ($i = 0; $i < 3; $i++) {
	    $array_subsequent_employment[] = array(
	        'name' => !empty($_POST['subsequent_company_name'][$i]) ? $_POST['subsequent_company_name'][$i] : '',
	        'position' => !empty($_POST['subsequent_position_name'][$i]) ? $_POST['subsequent_position_name'][$i] : '',
	        'joinDate' => !empty($_POST['subsequent_company_join_date'][$i]) ? $_POST['subsequent_company_join_date'][$i] : '',
	        'leftDate' => !empty($_POST['subsequent_company_left_date'][$i]) ? $_POST['subsequent_company_left_date'][$i] : '',
	        'salary' => !empty($_POST['subsequent_company_basic_salary'][$i]) ? $_POST['subsequent_company_basic_salary'][$i] : '',
	        'allowance' => !empty($_POST['subsequent_company_fix_allowance'][$i]) ? $_POST['subsequent_company_fix_allowance'][$i] : '',
	        'reason' => !empty($_POST['subsequent_company_leave_reason'][$i]) ? $_POST['subsequent_company_leave_reason'][$i] : '',
	    );
	}

	//other info
	$gambling = $_POST['gambling'];
	$smoking = $_POST['smoking'];
	$drug = $_POST['drug'];
	$drinking = $_POST['drinking'];

	$disability =$_POST['disability'];
	$disability_detail = ($_POST['disability'] == 'yes')?$_POST['disability_detail']:'';
	$medication = $_POST['medication'];
	$medication_detail = ($_POST['medication'] == 'yes')?$_POST['medication_detail']:'';
	$pregnancy = $_POST['pregnancy'];
	$pregnancy_detail = ($_POST['pregnancy'] == 'yes')?$_POST['pregnancy_detail']:'';
	$dismissed = $_POST['dismissed'];
	$dismissed_detail = ($_POST['dismissed'] == 'yes')?$_POST['dismissed_detail']:'';
	$court = $_POST['court'];
	$court_detail = ($_POST['court'] == 'yes')?$_POST['court_detail']:'';
	$finance = $_POST['finance'];
	$finance_detail = ($_POST['finance'] == 'yes')?$_POST['finance_detail']:'';
	$applied = $_POST['applied'];
	$applied_detail = ($_POST['applied'] == 'yes')?$_POST['applied_detail']:'';
	$dispute = $_POST['dispute'];
	$dispute_detail = ($_POST['dispute'] == 'yes')?$_POST['dispute_detail']:'';
	$other_job = $_POST['other_job'];
	$other_job_detail = ($_POST['other_job'] == 'yes')?$_POST['other_job_detail']:'';

	$willingToTransferWithrelocation = $_POST['relocation']; //yes no
	$willingToTransferWithoutrelocation = $_POST['without_relocation']; //yes no
	$bankruptcy = $_POST['bankruptcy'];
	$vehicle = $_POST['vehicle'];
	$overtime = $_POST['overtime'];
	$attract = $_POST['attract'];
	$career_plan = $_POST['career_plan'];


	// policy
	$privacy_name = $_POST['privacy_name'];
	$privacy_nric_number = $_POST['privacy_nric_number'];
	$privacy_date = $_POST['privacy_date'];


	//acknowledgement
	$acknowledgement_name = $_POST['acknowledgement_name'];
	$acknowledgement_nric_number = $_POST['acknowledgement_nric_number'];
	$acknowledgement_privacy_date = $_POST['acknowledgement_privacy_date'];

	
	// signature
	$acknowledgement_certify = escapeString($_POST['acknowledgement_certify']) ;
	$acknowledgement_authorize = escapeString($_POST['acknowledgement_authorize']) ;
	$acknowledgement_event = escapeString($_POST['acknowledgement_event']) ;
	

	//signature

	if ($_POST['application_signature'] != '' && $_POST['application_signature'] != $_POST['application_signature_hidden']) {
		// signature
		$application_signature = escapeString($_POST['application_signature']) ;
		$application_signature_date = TODAYDATE ;

		$image_name		= time().'-'.uniqid(count($application_signature));
		$sign_img_name 	= $image_name.'.jpg';

		$boolean_upload_signature = uploadImageBased64('Employment_Application', $sign_img_name, $application_signature);
		// $boolean_upload_signature = true;
		if($boolean_upload_signature == true){
			$signature_image_uploaded = '/uploads/Employment_Application/'.$sign_img_name;
		}else{
			$signature_image_uploaded = '';
		}
	}else{
		$user_details = jsonEncodeDecode('decode', $row_page['employment_details']) ;
		$application = $user_details['application'] ;
		if($application != ''){
			$application_signature = $application['signature'] ;
			$application_signature_date = $application['date'] ;
			$signature_image_uploaded = $application_signature;
		}else{
			$application_signature = escapeString($_POST['application_signature']) ;
			$application_signature_date = TODAYDATE ;
			$signature_image_uploaded = '';
		}
		

	}

	// keep other value in array
		$array_other_details = [
				    // Personal Information
				    'positionApplyText' => $positionApplyText,
				    'expectedSalary' => $expectedSalary,
				    'noticePeriod' => $noticePeroid,
				    'referralName' => $referralName,
					'nric' => $nric,
				    'personal_name' => $personal_name,
				    'personal_name_chinese' => $personal_name_chinese,
				    'personal_name_nickname' => $personal_name_nickname,
				    'personal_dob' => $personal_dob,
				    'personal_age' => $personal_age,
				    'personal_email' => $personal_email,
				    'personal_nationality' => $personal_nationality,
				    'personal_religion' => $personal_religion,
				    'personal_mobile' => $personal_mobile,
				    'personal_home_tel' => $personal_home_tel,
				    'personal_gender' => $personal_gender,
				    'personal_marital_status' => $personal_marital_status,
				    'personal_lisence' => $personal_lisence,
				    'personal_lisence_class' => $personal_lisence_class,
				    'personal_permanent_address' => $personal_permanent_address,
				    'personal_residential_address' => $personal_residential_address,

				    // Family Members
				    'family_members' => $array_family_member,

				    // Education Background
				    'education_levels' => $array_education_level,

				    // Professional Qualification
				    'professional_qualifications' => $array_professional_qualification,

				    // Language Proficiency
				    'language_proficiency' => [
				        'spoken_english' => $spoken_english,
				        'written_english' => $written_english,
				        'spoken_mandarin' => $spoken_mandarin,
				        'written_mandarin' => $written_mandarin,
				        'spoken_bm' => $spoken_bm,
				        'written_bm' => $written_bm,
				        'language_other_1' => $language_other_1,
				        'spoken_other1' => $spoken_other1,
				        'written_other1' => $written_other1,
						'language_other_2' => $language_other_2,
				        'spoken_other2' => $spoken_other2,
				        'written_other2' => $written_other2,
				    ],

				    // Reference Detail
				    'references' => $array_reference,

				    // Current Employment
				    'current_employment' => [
				        'company_name' => $currentCompanyName,
				        'position' => $currentCompanyPosition,
				        'address' => $currentCompanyAddress,
				        'join_date' => $currentCompanyJoinDate,
				        'left_date' => $currentCompanyLeftDate,
				        'salary' => $currentCompanySalary,
				        'allowance' => $currentCompanyAllowance,
				        'leave_reason' => $currentCompanyReason,
				    ],

				    // Subsequent Employment
				    'subsequent_employments' => $array_subsequent_employment,

				    // Other Info
				    'habits' => [
				        'gambling' => $gambling,
				        'smoking' => $smoking,
				        'drug' => $drug,
				        'drinking' => $drinking,
				    ],
				    'conditions' => [
				    	'disability' => $disability,
				        'disability_detail' => $disability_detail,
				        'medication' => $medication,
				        'medication_detail' => $medication_detail,
				        'pregnancy' => $pregnancy,
				        'pregnancy_detail' => $pregnancy_detail,
				        'dismissed' => $dismissed,
				        'dismissed_detail' => $dismissed_detail,
				        'court' => $court,
				        'court_detail' => $court_detail,
				        'finance' => $finance,
				        'finance_detail' => $finance_detail,
				        'applied' => $applied,
				        'applied_detail' => $applied_detail,
				        'dispute' => $dispute,
				        'dispute_detail' => $dispute_detail,
				        'other_job' => $other_job,
				        'other_job_detail' => $other_job_detail,
				    ],

				    'relocation' => [
				        'with' => $willingToTransferWithrelocation,
				        'without' => $willingToTransferWithoutrelocation,
				    ],

				    'vehicle' => $vehicle,
				    'overtime' => $overtime,
				    'attract' => $attract,
				    'career_plan' => $career_plan,

				    // Policy Consent
				    'privacy' => [
				        'name' => $privacy_name,
				        'nric' => $privacy_nric_number,
				        'date' => $privacy_date,
				    ],

				    // Acknowledgement
				    'acknowledgement' => [
				        'name' => $acknowledgement_name,
				        'nric' => $acknowledgement_nric_number,
				        'date' => $acknowledgement_privacy_date,
				    ],
				];
		$array_other_details = json_encode($array_other_details, JSON_UNESCAPED_UNICODE) ;
		

		// reset dob

		$personal_dob = date('Y-m-d', strtotime(str_replace('/', '-', $personal_dob))) ;

		if ($mysqli->query("INSERT INTO staff_employment (
								    employment_user_id,
								    employment_position,
								    employment_call,
								    employment_name,
								    employment_nric,
								    employment_age,
								    employment_dob,
								    employment_sex,
								    employment_religion,
								    employment_nationality,
								    employment_marital,
								    employment_mobile,
								    employment_tel,
								    employment_address,
								    employment_email,
								    employment_details,
								    employment_branch,
								    employment_status,
								    employment_modified
								) VALUES (
								    '".$incharge_person."',
								    '".$positionApplySelect."',
								    '".$personal_name."',
								    '".$personal_name."',
								    '".$nric."',
								    '".$personal_age."',
								    '".$personal_dob."',
								    '".$personal_gender."',
								    '".$personal_religion."',
								    '".$personal_nationality."',
								    '".$personal_marital."',
								    '".$personal_mobile."',
								    '".$personal_home_tel."',
								    '".$personal_permanent_address."',
								    '".$personal_email."',
								    '".$array_other_details."',
								    '".$_GET['branch']."',
								    '".$_POST['employment_status']."',
								    '".TODAYDATE."'
								)")){
			$last_id = $mysqli->insert_id ;
			$result = 'success-employment' ;

		}
			//////////////////////////////////////////////////////////////
			////////////////////upload image and resume///////////////////
			//////////////////////////////////////////////////////////////
			/*
			$create_image = reCreateImage('Employment', $page, $page, '', $personal_image, $personal_image_type, $_FILES['image']['tmp_name']) ;
			// Image uploads when exists
			if ($create_image['result'] && is_array($create_image['crop']) && count($create_image['result']) > 0){
				$resizeObj = new resize($create_image['original']) ; // Initialise load image
				foreach($create_image['crop'] as $value){
					// Resize image (options: exact, portrait, landscape, auto, crop)
					$resizeObj -> resizeImage($value['width'], $value['height'], $value['type']) ;
					$resizeObj -> saveImage($value['source'], 70) ; // Save image	
				}
				
				$file_upload = array('path' => PATH.'uploads/Employment/',
									 'file' => $create_image['image']) ;
				$file_upload = jsonEncodeDecode('encode', $file_upload) ;
				
				// update database
				if ($mysqli->query("UPDATE staff_employment SET
									employment_file = '".$file_upload."'
									WHERE employment_id = '".$page."'")){

				}
			}	


			//upload resume
			if ($resume_attached != '' && $resume_attached_tmp != '' && $resume_attached_type == 'application/pdf') {
				$newResumeFile = time().'-'.$resume_attached;
				$resume_attached_path = $_SERVER["DOCUMENT_ROOT"].'/uploads/Employment_Resume/';
				$boolean_upload_resume = move_uploaded_file($resume_attached_tmp, $resume_attached_path.$newResumeFile);

				if ($boolean_upload_resume) {
					$mysqli->query("UPDATE staff_employment SET employment_resume = '".$newResumeFile."' WHERE employment_id = '".$page."'");
				}
			}*/

$_SESSION['system_result'] = $result ;
	//header("Refresh: 0;") ;
	//exit ;
}

$branch_id = escapeString($_GET['branch']);

$mysqli_ck_branch = $mysqli->query("SELECT branch_id FROM branch");
if ($mysqli_ck_branch->num_rows >0) {
	while ($row_ck_branch = $mysqli_ck_branch->fetch_array()) {
		$array_branch_id_list[] = $row_ck_branch['branch_id'];
	}
}
// print_r($array_branch_id_list);exit;
$boolean_ck_branch = in_array($branch_id, $array_branch_id_list) ;

if ($branch_id == '' || $boolean_ck_branch == false) {
	echo '
	<script>
	alert("Invalid application form!") ;
	</script>' ;
	exit;
}

// page header

$letter_head = getOwnerCompanyLetterHead($branch_id) ;
// page footer

$header = $letter_head['header'] ;


?>
<!DOCTYPE html>
<html lang="en" class="">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Online Application Form - <?= COMPANY ?></title>
    <meta name="description" content="">
    <meta name="author" content="JImmyLimSengHang">
    <meta name="creator" content="JImmyLimSengHang">
    <meta name="robots" content="noindex,nofollow" />
    <link type="image/ico" rel="shortcut icon" href="images/favicon.ico?v=1">
    <link rel="stylesheet" href="css/css_employment.css">
    <script src="scripts/jquery-1.8.3.js"></script>
    <script src="scripts/jquery.validate.js"></script>
</head>


<body style="color: black;">
    <div class="employee_application_form">
        <form method="post" class="employment_online_form" id="signature_pad_form" novalidate
            enctype="multipart/form-data">
            <?php

			if ($_SESSION['system_result'] != ''){

				switch($_SESSION['system_result']){

					case 'success-employment' :

					/* $message = 'Thank you, your employment has been added.' ; */

					$message = 'Thank you for your interest in the employment registration position at '.COMPANY.' We appreciate you taking the time to complete the application form.' ;
					break ;	

					case 'success-image' :

					/* $message = 'Thank you, your employment has been added.' ; */

					$message = 'Thank you for your interest in the employment registration position at '.COMPANY.' We appreciate you taking the time to complete the application form.' ;
					break ;	

				// case 'success-image' :

				// 	$message = 'Thank you with attach your profile picture.' ;
				// break ;	

					case 'failed' :

					default :

					$message = 'Sorry, please try again later!' ;
					break ;	

				}

				?>
            <script>
            alert("<?= $message ?>");
            </script>
            <?php

				unset($_SESSION['system_result']) ;
			}

			?>




            <div class="container">
                <table border="0" cellpadding="0" cellspacing="0" class="employment_table"
                    style="width:100%; padding:0; margin:0 auto;border-collapse: collapse; font-size: 16px;">
                    <tr>
                        <td colspan="4">
                            <table style="width:100%;" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td
                                        style="width:100%;font-size:20px; padding:2px 0; text-align:center;background-color:#5e5bd0 ;color: white;">
                                        <strong><?= $lang['EMPLOYMENT APPLICATION FORM']?></strong>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4" style="font-weight:bold; font-size:16px;">
                            <table style="width: 100%;">
                                <tr>
                                    <td style="width: 30%;">
                                        <?= $lang['POSITION APPLIED FOR'] ?> :
                                    </td>
                                    <td>
                                        <input type="hidden" name="positionApplyText" id="positionApplyText" />
                                        <?php
                                                $mysqli_query = "SELECT a.job_position_id, b.job_position_desc FROM setting_job_position a
                                                LEFT JOIN setting_job_position_translation b ON ( a.job_position_id = b.job_position_id )
                                                WHERE a.deleted_at IS NULL AND b.lang = 'en' AND a.job_position_show_al = 'Show'
                                                ORDER BY b.job_position_desc ASC";

                                                $mysqli_position = $mysqli->query($mysqli_query);
                                                if ($mysqli_position->num_rows > 0) {
                                                    echo '
                                                    <select id="positionApplySelect" name="positionApplySelect" style="width: 100%;height: 100%">
                                                    <option value="">' . $lang['select'] . '</option>';
                                                    while ($row_position = $mysqli_position->fetch_array(MYSQLI_ASSOC)) {
                                                        echo '<option value="' . $row_position['job_position_id'] . '">' . dataFilter($row_position['job_position_desc']) . '</option>';
                                                    }
                                                    echo '</select>';
                                                }
                                                ?>
                                        <script>
                                        const select = document.getElementById('positionApplySelect');
                                        const input = document.getElementById('positionApplyText');
                                        if (select && input) {
                                            select.addEventListener('change', function() {
                                                const selectedOption = this.options[this
                                                    .selectedIndex];
                                                input.value = this.value ? selectedOption.text : '';
                                            });
                                        }
                                        </script>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td colspan="4" style="font-weight:bold; font-size:16px;">
                            <table style="width: 100%;">
                                <tr>
                                    <td style="width: 30%;"><?= $lang['EXPECTED SALARY'] ?> :</td>
                                    <td><input name="expectedSalary" type="number" step="0.01" min="0"
                                            placeholder="0.00" style="width: 100%;" /></td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td colspan="4" style="font-weight:bold; font-size:16px;">
                            <table style="width: 100%;">
                                <tr>
                                    <td style="width: 30%;"><?= $lang['NOTICE PERIOD'] ?> :</td>
                                    <td><input name="noticePeroid" type="number" min="0"
                                            placeholder="<?= $lang['Days'] ?>" style="width: 100%;" /></td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td colspan="4" style="font-weight:bold; font-size:16px;">
                            <table style="width: 100%;">
                                <tr>
                                    <td style="width: 30%;"><?= $lang['REFERRAL NAME (IF APPLICABLE)'] ?> :
                                    </td>
                                    <td><input name="referralName" type="text" style="width: 100%;" /></td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td colspan="4" style="font-weight:bold; font-size:16px;">
                            <table style="width: 100%;">
                                <tr>
                                    <td style="width: 30%;">NRIC (ONLY NUMBER) :
                                    </td>
                                    <td>
                                    	<input name="nric" type="text" style="width: 100%;" />
                                        <small style="color: gray;">without dash or space</small>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>

                            <div class="panel panel-primary" style="border: 2px solid #5e5bd0;">
                                <div class="panel-heading"
                                    style="font-size:16px; background-color: #5e5bd0;color: white; font-weight: bold;padding: 10px;">
                                    <?= $lang['PERSONAL INFORMATION'] ?>
                                </div>
                                <div class="panel-body" style="padding: 0;font-size: 16px;font-weight: bold;">

                                    <table class="table table-bordered" style="margin: 0;padding: 0;width: 100%;">

                                        <!-- Full Name -->
                                        <tr>
                                            <td colspan="4">
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td colspan="2" style="padding:5px;">
                                                            <?= $lang['FULL NAME (AS PER NRIC)'] ?> :
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2" >
                                                        	<input name="personal_name" type="text"
                                                                style="width: 100%;"></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>

                                        <!-- Chinese & Nickname -->
                                        <tr>
                                            <td colspan="4">
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td style="padding:5px;">
                                                            <?= $lang['NAME IN CHINESE CHARACTER (IF APPLICABLE)'] ?>
                                                            :
                                                        </td>
                                                        <td style="padding:5px;">
                                                            <?= $lang['NICKNAME'] ?> :
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td><input name="personal_name_chinese" type="text"
                                                                style="width: 100%;"></td>
                                                        <td><input name="personal_name_nickname" type="text"
                                                                style="width: 100%;"></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>

                                        <!-- DOB, Age, Email -->
                                        <tr>
                                            <td colspan="4">
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td style="padding:5px;">
                                                            <?= $lang['DATE OF BIRTH'] ?> :
                                                        </td>
                                                        <td style="padding:5px;">
                                                            <?= $lang['AGE'] ?> :
                                                        </td>
                                                        <td style="width: 50%;padding:5px;">
                                                            <?= $lang['EMAIL ADDRESS'] ?> :
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td><input name="personal_dob" class="datetimepicker"
                                                                type="text" style="width: 100%;"></td>
                                                        <td><input name="personal_age" type="number"
                                                                style="width: 100%;"></td>
                                                        <td><input type="email" name="personal_email"
                                                                style="width: 100%;" /></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>

                                        <!-- Nationality & Religion -->
                                        <tr>
                                            <td colspan="4">
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td style="padding:5px;">
                                                            <?= $lang['NATIONALITY'] ?> :
                                                        </td>
                                                        <td style="padding:5px;">
                                                            <?= $lang['RELIGION'] ?> :
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td><input type="text" name="personal_nationality"
                                                                style="width: 100%;" /></td>
                                                        <td><input type="text" name="personal_religion"
                                                                style="width: 100%;" /></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>

                                        <!-- Mobile & Home Tel -->
                                        <tr>
                                            <td colspan="4">
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td style="padding:5px;">
                                                            <?= $lang['MOBILE NO.'] ?> :
                                                        </td>
                                                        <td style="padding:5px;">
                                                            <?= $lang['HOME TELEPHONE'] ?> :
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td><input type="text" name="personal_mobile"
                                                                style="width: 100%;" /></td>
                                                        <td><input type="text" name="personal_home_tel"
                                                                style="width: 100%;" /></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>

                                        <!-- Gender, Marital, License -->
                                        <tr>
                                            <td colspan="4">
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td style="padding:5px;">
                                                            <?= $lang['GENDER'] ?> :
                                                        </td>
                                                        <td style="padding:5px;">
                                                            <?= $lang['MARITAL STATUS'] ?> :
                                                        </td>
                                                        <td style="width: 50%;padding:5px;">
                                                            <?= $lang['DRIVING LISENCE'] ?> :
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="vertical-align: top;">
                                                            <label><input type="radio" name="personal_gender"
                                                                    value="male" />
                                                                <?= $lang['MALE'] ?></label><br />
                                                            <label><input type="radio" name="personal_gender"
                                                                    value="female" />
                                                                <?= $lang['FEMALE'] ?></label>
                                                        </td>
                                                        <td style="vertical-align: top;">
                                                            <label><input type="radio" name="personal_marital_status"
                                                                    value="single" />
                                                                <?= $lang['SINGLE'] ?></label><br />
                                                            <label><input type="radio" name="personal_marital_status"
                                                                    value="married" />
                                                                <?= $lang['MARRIED'] ?></label><br />
                                                            <label><input type="radio" name="personal_marital_status"
                                                                    value="divorced" />
                                                                <?= $lang['DIVORCED'] ?></label><br />
                                                            <label><input type="radio" name="personal_marital_status"
                                                                    value="windowed" />
                                                                <?= $lang['WINDOWED'] ?></label><br />
                                                            <label><input type="radio" name="personal_marital_status"
                                                                    value="seperated" />
                                                                <?= $lang['SEPERATED'] ?></label>
                                                        </td>
                                                        <td style="vertical-align: top;">
                                                            <div
                                                                style="display: flex; align-items: center; gap: 10px; margin-bottom: 8px; margin-top: 8px;">
                                                                <input type="radio" name="personal_lisence"
                                                                    id="radio_yes" value="yes" />
                                                                <label for="radio_yes"
                                                                    style="margin: 0;"><?= $lang['YES'] ?></label>
                                                                <span
                                                                    id="personal_lisence_class_title"><?= $lang['CLASS'] ?>:</span>
                                                                <input type="text" name="personal_lisence_class"
                                                                    id="personal_lisence_class"
                                                                    style="height: 18px; font-size: 16px;">
                                                            </div>
                                                            <div style="display: flex; align-items: center; gap: 10px;">
                                                                <input type="radio" name="personal_lisence"
                                                                    id="radio_no" value="no" />
                                                                <label for="radio_no"
                                                                    style="margin: 0;"><?= $lang['NO'] ?></label>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>

                                                <script>
                                                const yesRadio = document.getElementById('radio_yes');
                                                const noRadio = document.getElementById('radio_no');
                                                const classInput = document.getElementById(
                                                    'personal_lisence_class');
                                                const classTitle = document.getElementById(
                                                    'personal_lisence_class_title');

                                                function toggleClassInput() {
                                                    if (yesRadio.checked) {
                                                        classInput.style.display = 'inline-block';
                                                        classTitle.style.display = 'inline-block';
                                                    } else {
                                                        classInput.style.display = 'none';
                                                        classTitle.style.display = 'none';
                                                        classInput.value = '';
                                                    }
                                                }

                                                yesRadio.addEventListener('change', toggleClassInput);
                                                noRadio.addEventListener('change', toggleClassInput);
                                                toggleClassInput();
                                                </script>
                                            </td>
                                        </tr>

                                        <!-- Permanent Address -->
                                        <tr>
                                            <td colspan="4">
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td style="padding:5px;">
                                                            <?= $lang['PERMANENT ADDRESS'] ?> :
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td><input type="text" name="personal_permanent_address"
                                                                style="width: 100%;" /></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>

                                        <!-- Residential Address -->
                                        <tr>
                                            <td colspan="4">
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td style="padding:5px;">
                                                            <?= $lang['RESIDENTIAL ADDRESS'] ?> :
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td><input type="text" name="personal_residential_address"
                                                                style="width: 100%;" /></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>

                                    </table>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>

                            <div class="panel panel-primary" style="border: 2px solid #5e5bd0;">
                                <div class="panel-heading"
                                    style="font-size:16px; background-color: #5e5bd0;color: white; font-weight: bold;padding: 10px;">
                                    <?=$lang['FAMILY PARTICULARS']?>
                                </div>
                                <div class="panel-body" style="padding: 0;">

                                    <table border="0" cellpadding="0" cellspacing="0" width="100%"
                                        style="font-size:16px;margin:0;border-bottom: 1px solid #000;border-right: 1px solid #000;">
                                        <tr>
                                            <th
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?= $lang['NAME']?></th>
                                            <th
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?=$lang['RELATIONSHIP']?></th>
                                            <th
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?=$lang['AGE']?></th>
                                            <th
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?= $lang['OCCUPATION']?></th>
                                            <th
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?= $lang['COMPANY NAME']?></th>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_name[0]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_relationship[0]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_age[0]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_occupation[0]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_company[0]" style="margin:0;" />
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="hidden" name="family_member_key[]" value="1" />
                                                <input type="text" name="family_member_name[1]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_relationship[1]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_age[1]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_occupation[1]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_company[1]" style="margin:0;" />
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="hidden" name="family_member_key[]" value="2" />
                                                <input type="text" name="family_member_name[2]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_relationship[2]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_age[2]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_occupation[2]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_company[2]" style="margin:0;" />
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="hidden" name="family_member_key[]" value="3" />
                                                <input type="text" name="family_member_name[3]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_relationship[3]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_age[3]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_occupation[3]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_company[3]" style="margin:0;" />
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="hidden" name="family_member_key[]" value="4" />
                                                <input type="text" name="family_member_name[4]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_relationship[4]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_age[4]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_occupation[4]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_company[4]" style="margin:0;" />
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="hidden" name="family_member_key[]" value="5" />
                                                <input type="text" name="family_member_name[5]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_relationship[5]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_age[5]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_occupation[5]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_company[5]" style="margin:0;" />
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="hidden" name="family_member_key[]" value="6" />
                                                <input type="text" name="family_member_name[6]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_relationship[6]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_age[6]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_occupation[6]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_company[6]" style="margin:0;" />
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="hidden" name="family_member_key[]" value="7" />
                                                <input type="text" name="family_member_name[7]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_relationship[7]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_age[7]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_occupation[7]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="family_member_company[7]" style="margin:0;" />
                                            </td>
                                        </tr>

                                    </table>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>

                            <div class="panel panel-primary" style="border: 2px solid #5e5bd0;">
                                <div class="panel-heading"
                                    style="font-size:16px; background-color: #5e5bd0;color: white; font-weight: bold;padding: 10px;">
                                    <?= $lang['EDUCATIONAL LEVEL']?>
                                </div>
                                <div class="panel-body" style="padding: 0;">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%"
                                        style="font-size:16px;border-bottom: 1px solid #000;border-right: 1px solid #000;">
                                        <tr>
                                            <th rowspan="2"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?=$lang['QUALIFICATIONS']?></th>
                                            <th rowspan="2"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?= $lang['NAME OF SCHOOL / COLLEGE / UNIVERSITY']?></th>
                                            <th width="130px"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;text-align: center;">
                                                <?=$lang['START']?>
                                            </th>
                                            <th width="130px"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;text-align: center;">
                                                <?=$lang['FINISH']?>
                                            </th>
                                            <th width="160px" rowspan="2"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?=$lang['GRADE']?></th>
                                        </tr>
                                        <tr>
                                            <th width="130px"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;text-align: center;">
                                                <?=$lang['(month/year)']?>
                                            </th>
                                            <th width="130px"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;text-align: center;">
                                                <?=$lang['(month/year)']?>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <select name="education_qualification[0]"
                                                    style="max-width:470px;margin:0px;border:0px;">
                                                    <option value=""><?= $lang['select'] ?></option>
                                                    <option value="qua_below_pmr">Below PMR</option>
                                                    <option value="qua_pmr_pt3">PMR / PT3</option>
                                                    <option value="qua_spm">SPM</option>
                                                    <option value="qua_certificate_skm_svm">Certificate/ SKM
                                                        / SVM</option>
                                                    <option value="qua_alevel_uec">A-Level / UEC</option>
                                                    <option value="qua_diploma">Diploma</option>
                                                    <option value="qua_degree">Degree</option>
                                                    <option value="qua_master_degree">Master Degree</option>
                                                    <option value="qua_phd">PHD</option>
                                                </select>
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_name_school[0]" style="margin:0;" />
                                                <input type="hidden" name="education_key[]" value="0" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_start_year[0]" style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_finish_year[0]" style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_grade[0]" style="margin:0;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <select name="education_qualification[1]"
                                                    style="max-width:470px;margin:0px;border:0px;">
                                                    <option value=""><?= $lang['select'] ?></option>
                                                    <option value="qua_below_pmr">Below PMR</option>
                                                    <option value="qua_pmr_pt3">PMR / PT3</option>
                                                    <option value="qua_spm">SPM</option>
                                                    <option value="qua_certificate_skm_svm">Certificate/ SKM
                                                        / SVM</option>
                                                    <option value="qua_alevel_uec">A-Level / UEC</option>
                                                    <option value="qua_diploma">Diploma</option>
                                                    <option value="qua_degree">Degree</option>
                                                    <option value="qua_master_degree">Master Degree</option>
                                                    <option value="qua_phd">PHD</option>
                                                </select>
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_name_school[1]" style="margin:0;" />
                                                <input type="hidden" name="education_key[]" value="1" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_start_year[1]" style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_finish_year[1]" style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_grade[1]" style="margin:0;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <select name="education_qualification[2]"
                                                    style="max-width:470px;margin:0px;border:0px;">
                                                    <option value=""><?= $lang['select'] ?></option>
                                                    <option value="qua_below_pmr">Below PMR</option>
                                                    <option value="qua_pmr_pt3">PMR / PT3</option>
                                                    <option value="qua_spm">SPM</option>
                                                    <option value="qua_certificate_skm_svm">Certificate/ SKM
                                                        / SVM</option>
                                                    <option value="qua_alevel_uec">A-Level / UEC</option>
                                                    <option value="qua_diploma">Diploma</option>
                                                    <option value="qua_degree">Degree</option>
                                                    <option value="qua_master_degree">Master Degree</option>
                                                    <option value="qua_phd">PHD</option>
                                                </select>
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_name_school[2]" style="margin:0;" />
                                                <input type="hidden" name="education_key[]" value="2" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_start_year[2]" style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_finish_year[2]" style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_grade[2]" style="margin:0;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <select name="education_qualification[3]"
                                                    style="max-width:470px;margin:0px;border:0px;">
                                                    <option value=""><?= $lang['select'] ?></option>
                                                    <option value="qua_below_pmr">Below PMR</option>
                                                    <option value="qua_pmr_pt3">PMR / PT3</option>
                                                    <option value="qua_spm">SPM</option>
                                                    <option value="qua_certificate_skm_svm">Certificate/ SKM
                                                        / SVM</option>
                                                    <option value="qua_alevel_uec">A-Level / UEC</option>
                                                    <option value="qua_diploma">Diploma</option>
                                                    <option value="qua_degree">Degree</option>
                                                    <option value="qua_master_degree">Master Degree</option>
                                                    <option value="qua_phd">PHD</option>
                                                </select>
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_name_school[3]" style="margin:0;" />
                                                <input type="hidden" name="education_key[]" value="3" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_start_year[3]" style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_finish_year[3]" style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_grade[3]" style="margin:0;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <select name="education_qualification[4]"
                                                    style="max-width:470px;margin:0px;border:0px;">
                                                    <option value=""><?= $lang['select'] ?></option>
                                                    <option value="qua_below_pmr">Below PMR</option>
                                                    <option value="qua_pmr_pt3">PMR / PT3</option>
                                                    <option value="qua_spm">SPM</option>
                                                    <option value="qua_certificate_skm_svm">Certificate/ SKM
                                                        / SVM</option>
                                                    <option value="qua_alevel_uec">A-Level / UEC</option>
                                                    <option value="qua_diploma">Diploma</option>
                                                    <option value="qua_degree">Degree</option>
                                                    <option value="qua_master_degree">Master Degree</option>
                                                    <option value="qua_phd">PHD</option>
                                                </select>
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_name_school[4]" style="margin:0;" />
                                                <input type="hidden" name="education_key[]" value="4" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_start_year[4]" style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_finish_year[4]" style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="education_grade[4]" style="margin:0;" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <div class="panel panel-primary" style="border: 2px solid #5e5bd0;">
                                <div class="panel-heading"
                                    style="font-size:16px; background-color: #5e5bd0;color: white; font-weight: bold;padding: 10px;">
                                    <?= $lang['PROFESSIONAL QUALIFICATIONS (MEMBERSHIPS / TECHNICAL / PROFESSIONAL / OCCUPATION TRAINING)']?>
                                </div>
                                <div class="panel-body" style="padding: 0;">


                                    <table border="0" cellpadding="0" cellspacing="0" width="100%"
                                        style="font-size:16px;border-bottom: 1px solid #000;border-right: 1px solid #000;">
                                        <tr>
                                            <th rowspan="2"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?=$lang['PROFESSIONAL QUALIFICATION']?></th>
                                            <th rowspan="2"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?= $lang['ACCREDITED BY']?></th>
                                            <th width="130px"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;text-align: center;">
                                                <?= $lang['START']?></th>
                                            <th width="130px"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;text-align: center;">
                                                <?= $lang['FINISH']?></th>
                                        </tr>
                                        <tr>
                                            <th width="130px"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;text-align: center;">
                                                <?= $lang['(month/year)']?>
                                            </th>
                                            <th width="130px"
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;text-align: center;">
                                                <?= $lang['(month/year)']?>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification[0]"
                                                    style="margin:0;" />
                                                <input type="hidden" name="professional_qualification_key[]"
                                                    value="0" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_accredited_by[0]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification_start_year[0]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification_finish_year[0]"
                                                    style="margin:0;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification[1]"
                                                    style="margin:0;" />
                                                <input type="hidden" name="professional_qualification_key[]"
                                                    value="1" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_accredited_by[1]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification_start_year[1]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification_finish_year[1]"
                                                    style="margin:0;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification[2]"
                                                    style="margin:0;" />
                                                <input type="hidden" name="professional_qualification_key[]"
                                                    value="2" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_accredited_by[2]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification_start_year[2]"
                                                    style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification_finish_year[2]"
                                                    style="margin:0;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification[3]"
                                                    style="margin:0;" />
                                                <input type="hidden" name="professional_qualification_key[]"
                                                    value="3" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_accredited_by[3]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification_start_year[3]"
                                                    style="margin:0;" />
                                            </td>

                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification_finish_year[3]"
                                                    style="margin:0;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification[4]"
                                                    style="margin:0;" />
                                                <input type="hidden" name="professional_qualification_key[]"
                                                    value="4" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_accredited_by[4]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification_start_year[4]"
                                                    style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="professional_qualification_finish_year[4]"
                                                    style="margin:0;" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <div class="panel panel-primary" style="border: 2px solid #5e5bd0;">
                                <div class="panel-heading"
                                    style="font-size:16px; background-color: #5e5bd0;color: white; font-weight: bold;padding: 10px;">
                                    <?=$lang['LANGUAGE PROFICIENCY']?>
                                </div>
                                <div class="panel-body" style="padding: 0;">

                                    <table cellspacing="0" cellpadding="5" border="1" 
                                        style="border-collapse: collapse;border: 1px solid black; width: 100%; text-align: center; font-size:16px; font-weight: bold;">
                                        <thead>
                                            <tr>
                                                <th style="padding:5px;" rowspan="2"><?=$lang['LANGUAGE PROFICIENCY']?></th>
                                                <th style="padding:5px;" colspan="3"><?=$lang['SPOKEN']?></th>
                                                <th style="padding:5px;" colspan="3"><?=$lang['WRITTEN']?></th>
                                            </tr>
                                            <tr>
                                                <th style="padding:5px;"><?=$lang['GOOD']?></th>
                                                <th style="padding:5px;"><?=$lang['AVERAGE']?></th>
                                                <th style="padding:5px;"><?=$lang['POOR']?></th>
                                                <th style="padding:5px;"><?=$lang['GOOD']?></th>
                                                <th style="padding:5px;"><?=$lang['AVERAGE']?></th>
                                                <th style="padding:5px;"><?=$lang['POOR']?></th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <!-- ENGLISH -->
                                            <tr>
                                                <td style="padding:5px;font-size: 16px;">
                                                    <?=$lang['ENGLISH']?></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_english"
                                                        value="good"></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_english"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_english"
                                                        value="poor"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_english"
                                                        value="good"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_english"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_english"
                                                        value="poor"></td>
                                            </tr>

                                            <!-- MANDARIN -->
                                            <tr>
                                                <td style="padding:5px;font-size: 16px;">
                                                    <?=$lang['MANDARIN']?></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_mandarin"
                                                        value="good"></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_mandarin"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_mandarin"
                                                        value="poor"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_mandarin"
                                                        value="good"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_mandarin"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_mandarin"
                                                        value="poor"></td>
                                            </tr>

                                            <!-- BAHASA MALAYSIA -->
                                            <tr>
                                                <td style="padding:5px;font-size: 16px;">
                                                    <?=$lang['BAHASA MALAYSIA']?></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_bm"
                                                        value="good"></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_bm"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_bm"
                                                        value="poor"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_bm"
                                                        value="good"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_bm"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_bm"
                                                        value="poor"></td>
                                            </tr>

                                            <!-- OTHERS 1 -->
                                            <tr>
                                                <td style="">
                                                    <input type="text" placeholder="Other" name="language_other_1"
                                                        style="margin: 0;font-size: 16px;">
                                                </td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_other1"
                                                        value="good"></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_other1"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_other1"
                                                        value="poor"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_other1"
                                                        value="good"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_other1"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_other1"
                                                        value="poor"></td>
                                            </tr>

                                            <!-- OTHERS 2 -->
                                            <tr>
                                                <td style="">
                                                    <input type="text" placeholder="Other" name="language_other_2"
                                                        style="margin: 0;font-size: 16px;">
                                                </td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_other2"
                                                        value="good"></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_other2"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="spoken_other2"
                                                        value="poor"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_other2"
                                                        value="good"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_other2"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="written_other2"
                                                        value="poor"></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>

                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <div class="panel panel-primary" style="border: 2px solid #5e5bd0;">
                                <div class="panel-heading"
                                    style="font-size:16px; background-color: #5e5bd0;color: white; font-weight: bold;padding: 10px;">
                                    <?=$lang['REFERENCE DETAIL']?>
                                </div>
                                <div class="panel-body" style="padding: 0;">

                                    <p style="margin: 5px;">
                                        <?=$lang['LIST AT LEAST TWO (2) FORMER SUPERVISOR, HR MANAGER AND/OR COLLEAGUE.']?>
                                    <p>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%"
                                        style="font-size:16px;border-bottom: 1px solid #000;border-right: 1px solid #000;">
                                        <tr>
                                            <th
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?= $lang['Name']?></th>
                                            <th
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?= $lang['Position company']?></th>
                                            <th
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?= $lang['Contacts no']?></th>
                                            <th
                                                style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                <?= $lang['Years known']?></th>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="hidden" name="references_key[]" value="0" />
                                                <input type="text" name="references_name[0]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="references_position[0]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="references_contacts[0]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="references_years[0]" style="margin:0;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="hidden" name="references_key[]" value="1" />
                                                <input type="text" name="references_name[1]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="references_position[1]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="references_contacts[1]" style="margin:0;" />
                                            </td>
                                            <td style="border-top:1px solid #000;border-left:1px solid #000;">
                                                <input type="text" name="references_years[1]" style="margin:0;" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <div class="panel panel-primary" style="border: 2px solid #5e5bd0;">
                                <div class="panel-heading"
                                    style="font-size:16px; background-color: #5e5bd0;color: white; font-weight: bold;padding: 10px;">
                                    <?= $lang['EMPLOYMENT HISTORY']?>
                                </div>
                                <div class="panel-body" style="padding: 0; font-weight: bold; font-size: 16px;">
                                    <table width="100%" border="0" cellspacing="10">
									  <tr>
									    <td width="50%" style="padding:5px;">
									      <?=$lang['CURRENT COMPANY :']?><br />
									      <input name="current_company_name" type="text" style="width: 100%;">
									    </td>
									    <td width="50%" style="padding:5px;">
									      <?=$lang['CURRENT POSITION :']?><br />
									      <input name="current_position_name" type="text" style="width: 100%;">
									    </td>
									  </tr>
									  <tr>
									    <td colspan="2" style="padding:5px;">
									      <?=$lang['FULL ADDRESS :']?><br />
									      <input name="current_company_full_address" type="text" style="width: 100%;">
									    </td>
									  </tr>
									  <tr>
									    <td style="padding:5px;">
									      <?=$lang['DATE JOIN :']?><br />
									      <input name="current_company_join_date" type="text" class="datetimepicker" style="width: 100%;">
									    </td>
									    <td style="padding:5px;">
									      <?=$lang['DATE LEFT :']?><br />
									      <input name="current_company_left_date" type="text" class="datetimepicker" style="width: 100%;">
									    </td>
									  </tr>
									  <tr>
									    <td style="padding:5px;">
									      <?=$lang['BASIC SALARY :']?><br />
									      <input name="current_company_basic_salary" type="number" step="0.01" min="0" placeholder="0.00" style="width: 100%;">
									    </td>
									    <td style="padding:5px;">
									      <?=$lang['FIX AllOWANCE :']?><br />
									      <input name="current_company_fix_allowance" type="number" step="0.01" min="0" placeholder="0.00" style="width: 100%;">
									    </td>
									  </tr>
									  <tr>
									    <td colspan="2" style="padding:5px;">
									      <?=$lang['REASON FOR LEAVING :']?><br />
									      <input name="current_company_leave_reason" type="text" style="width: 100%;">
									    </td>
									  </tr>
									</table>
                   				</div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <div class="panel panel-primary" style="border: 2px solid #5e5bd0;">
                                <div class="panel-heading"
                                    style="font-size:16px; background-color: #5e5bd0;color: white; font-weight: bold;padding: 10px;">
                                    <?=$lang['SUBSEQUENT EMPLOYMENT HISTORY']?>
                                </div>
                                <div class="panel-body" style="padding: 0; font-weight: bold; font-size: 16px;">


                                    <table width="100%" style="border-collapse: collapse;">
                                        <!-- Block 1 -->
                                        <tr>
                                            <th colspan="4"
                                                style="padding:10px 5px; text-align:center; font-weight:bold;">
                                                <?=$lang['Employment Record']?> #1</th>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Company:']?></td>
                                            <td><input name="subsequent_company_name[0]" type="text"
                                                    style="width:100%;"></td>
                                            <td style="padding:5px;"><?=$lang['Position:']?></td>
                                            <td><input name="subsequent_position_name[0]" type="text"
                                                    style="width:100%;"></td>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Date Join:']?></td>
                                            <td><input name="subsequent_company_join_date[0]" type="text"
                                                    class="datetimepicker" style="width:100%;"></td>
                                            <td style="padding:5px;"><?=$lang['Date Left:']?></td>
                                            <td><input name="subsequent_company_left_date[0]" type="text"
                                                    class="datetimepicker" style="width:100%;"></td>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Basic Salary:']?></td>
                                            <td><input name="subsequent_company_basic_salary[0]" type="number"
                                                    step="0.01" min="0" placeholder="0.00" style="width:100%;"></td>
                                            <td style="padding:5px;"><?=$lang['Fix Allowance:']?></td>
                                            <td><input name="subsequent_company_fix_allowance[0]" type="number"
                                                    step="0.01" min="0" placeholder="0.00" style="width:100%;"></td>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Reason for Leaving:']?></td>
                                            <td colspan="3"><input name="subsequent_company_leave_reason[0]" type="text"
                                                    style="width:100%;"></td>
                                        </tr>

                                        <!-- Block 2 -->
                                        <tr>
                                            <th colspan="4"
                                                style="padding:10px 5px; text-align:center; font-weight:bold;">
                                                <?=$lang['Employment Record']?> #2</th>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Company:']?></td>
                                            <td><input name="subsequent_company_name[1]" type="text"
                                                    style="width:100%;"></td>
                                            <td style="padding:5px;"><?=$lang['Position:']?></td>
                                            <td><input name="subsequent_position_name[1]" type="text"
                                                    style="width:100%;"></td>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Date Join:']?></td>
                                            <td><input name="subsequent_company_join_date[1]" type="text"
                                                    class="datetimepicker" style="width:100%;"></td>
                                            <td style="padding:5px;"><?=$lang['Date Left:']?></td>
                                            <td><input name="subsequent_company_left_date[1]" type="text"
                                                    class="datetimepicker" style="width:100%;"></td>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Basic Salary:']?></td>
                                            <td><input name="subsequent_company_basic_salary[1]" type="number"
                                                    step="0.01" min="0" placeholder="0.00" style="width:100%;"></td>
                                            <td style="padding:5px;"><?=$lang['Fix Allowance:']?></td>
                                            <td><input name="subsequent_company_fix_allowance[1]" type="number"
                                                    step="0.01" min="0" placeholder="0.00" style="width:100%;"></td>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Reason for Leaving:']?></td>
                                            <td colspan="3"><input name="subsequent_company_leave_reason[1]" type="text"
                                                    style="width:100%;"></td>
                                        </tr>

                                        <!-- Block 3 -->
                                        <tr>
                                            <th colspan="4"
                                                style="padding:10px 5px; text-align:center; font-weight:bold;">
                                                <?=$lang['Employment Record']?> #3</th>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Company:']?></td>
                                            <td><input name="subsequent_company_name[2]" type="text"
                                                    style="width:100%;"></td>
                                            <td style="padding:5px;"><?=$lang['Position:']?></td>
                                            <td><input name="subsequent_position_name[2]" type="text"
                                                    style="width:100%;"></td>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Date Join:']?></td>
                                            <td><input name="subsequent_company_join_date[2]" type="text"
                                                    class="datetimepicker" style="width:100%;"></td>
                                            <td style="padding:5px;"><?=$lang['Date Left:']?></td>
                                            <td><input name="subsequent_company_left_date[2]" type="text"
                                                    class="datetimepicker" style="width:100%;"></td>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Basic Salary:']?></td>
                                            <td><input name="subsequent_company_basic_salary[2]" type="number"
                                                    step="0.01" min="0" placeholder="0.00" style="width:100%;"></td>
                                            <td style="padding:5px;"><?=$lang['Fix Allowance:']?></td>
                                            <td><input name="subsequent_company_fix_allowance[2]" type="number"
                                                    step="0.01" min="0" placeholder="0.00" style="width:100%;"></td>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;"><?=$lang['Reason for Leaving:']?></td>
                                            <td colspan="3"><input name="subsequent_company_leave_reason[2]" type="text"
                                                    style="width:100%;"></td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <div class="panel panel-primary" style="border: 2px solid #5e5bd0;">
                                <div class="panel-heading"
                                    style="font-size:16px; background-color: #5e5bd0;color: white; font-weight: bold;padding: 10px;">
                                    <?=$lang['OTHER INFORMATION']?>
                                </div>
                                <div class="panel-body" style="padding: 0; font-weight: bold; font-size: 16px;">

                                    <p style="margin:10px">
                                        <?=$lang['WHAT IS YOUR INVOLVEMENT IN THE FOLLOWING ACTIVITY :']?>
                                    </p>
                                    <table border="1" cellspacing="0" cellpadding="5"
                                        style="border-collapse: collapse; width: 100%; text-align: center;">
                                        <thead>
                                            <tr>
                                                <th style="padding:5px;border:1px solid #000;"></th>
                                                <th
                                                    style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                    <?=$lang['NEVER']?></th>
                                                <th
                                                    style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                    <?=$lang['OCCASIONALLY']?></th>
                                                <th
                                                    style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                    <?=$lang['AVERAGE']?></th>
                                                <th
                                                    style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                    <?=$lang['REGULARLY']?></th>
                                                <th
                                                    style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                    <?=$lang['HABITUAL']?></th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <td
                                                    style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                    <?=$lang['GAMBLING']?></td>
                                                <td><input style="margin:5px;" type="radio" name="gambling"
                                                        value="never"></td>
                                                <td><input style="margin:5px;" type="radio" name="gambling"
                                                        value="occasionally"></td>
                                                <td><input style="margin:5px;" type="radio" name="gambling"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="gambling"
                                                        value="regularly"></td>
                                                <td><input style="margin:5px;" type="radio" name="gambling"
                                                        value="habitual"></td>
                                            </tr>
                                            <tr>
                                                <td
                                                    style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                    <?=$lang['DRINKING']?></td>
                                                <td><input style="margin:5px;" type="radio" name="drinking"
                                                        value="never"></td>
                                                <td><input style="margin:5px;" type="radio" name="drinking"
                                                        value="occasionally"></td>
                                                <td><input style="margin:5px;" type="radio" name="drinking"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="drinking"
                                                        value="regularly"></td>
                                                <td><input style="margin:5px;" type="radio" name="drinking"
                                                        value="habitual"></td>
                                            </tr>
                                            <tr>
                                                <td
                                                    style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                    <?=$lang['SMOKING']?></td>
                                                <td><input style="margin:5px;" type="radio" name="smoking"
                                                        value="never"></td>
                                                <td><input style="margin:5px;" type="radio" name="smoking"
                                                        value="occasionally"></td>
                                                <td><input style="margin:5px;" type="radio" name="smoking"
                                                        value="average"></td>
                                                <td><input style="margin:5px;" type="radio" name="smoking"
                                                        value="regularly"></td>
                                                <td><input style="margin:5px;" type="radio" name="smoking"
                                                        value="habitual"></td>
                                            </tr>
                                            <tr>
                                                <td
                                                    style="padding:5px;border-top:1px solid #000;border-left:1px solid #000;">
                                                    <?=$lang['DRUG TAKING']?></td>
                                                <td><input style="margin:5px;" type="radio" name="drug" value="never">
                                                </td>
                                                <td><input style="margin:5px;" type="radio" name="drug"
                                                        value="occasionally"></td>
                                                <td><input style="margin:5px;" type="radio" name="drug" value="average">
                                                </td>
                                                <td><input style="margin:5px;" type="radio" name="drug"
                                                        value="regularly"></td>
                                                <td><input style="margin:5px;" type="radio" name="drug"
                                                        value="habitual"></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    <br />
                                    <br />
                                    <table cellpadding="5" cellspacing="5" width="100%"
                                        style="border-collapse: collapse;">
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['1) DID YOU SUFFER FROM ANY PHYSICAL DISABILITY, CHRONIC AILMENT HANDICAP, ALLERGIES OR SERIOUS ILLNESS?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="disability" value="yes"
                                                    onclick="toggleDetail('disability_detail', true)"></td>
                                            <td style="padding:5px;">
                                                <?=$lang['IF YES, PLEASE GIVE DETAILS:']?><input type="text"
                                                    id="disability_detail" name="disability_detail"
                                                    style="display: none;"></td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="disability" value="no"
                                                    onclick="toggleDetail('disability_detail', false)"></td>
                                            <td style="padding:5px;"><?=$lang['NO']?></td>
                                        </tr>

                                        <!-- Question 2 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['2) ARE YOU TAKING ANY LONG-TERM MEDICATION FOR DIABETIC, ASTHMA, ETC.?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="medication" value="yes"
                                                    onclick="toggleDetail('medication_detail', true)"></td>
                                            <td style="padding:5px;">
                                                <?=$lang['IF YES, PLEASE GIVE DETAILS:']?><input type="text"
                                                    id="medication_detail" name="medication_detail"
                                                    style="width: 70%; display: none;"></td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="medication" value="no"
                                                    onclick="toggleDetail('medication_detail', false)"></td>
                                            <td style="padding:5px;"><?=$lang['NO']?></td>
                                        </tr>

                                        <!-- Question 3 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['3) PREGNANCY BEFORE JOINING (CURRENTLY / PLANNING IN COMING FEW THREE (3) MONTHS)?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="pregnancy" value="yes"
                                                    onclick="toggleDetail('pregnancy_detail', true)"></td>
                                            <td style="padding:5px;">
                                                <?=$lang['IF YES, PLEASE GIVE DETAILS:']?><input type="text"
                                                    id="pregnancy_detail" name="pregnancy_detail"
                                                    style="width: 70%; display: none;"></td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="pregnancy" value="no"
                                                    onclick="toggleDetail('pregnancy_detail', false)"></td>
                                            <td style="padding:5px;"><?=$lang['NO']?></td>
                                        </tr>

                                        <!-- Question 4 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['4) ARE YOU WILLING TO TRANSFER TO A NEW DEPARTMENT OR COMPANY IF THE OPPORTUNITY ARISES?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <div style="margin-top: 10px;">
                                                    <strong>A. WITH RELOCATION:</strong><br>
                                                    <label><input style="margin:5px;" type="radio" name="relocation"
                                                            value="yes">
                                                        <?=$lang['YES']?></label><br>
                                                    <label><input style="margin:5px;" type="radio" name="relocation"
                                                            value="no">
                                                        <?=$lang['NO']?></label>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <div style="margin-top: 10px;">
                                                    <strong>B. WITHOUT RELOCATION:</strong><br>
                                                    <label><input style="margin:5px;" type="radio"
                                                            name="without_relocation" value="yes">
                                                        YES</label><br>
                                                    <label><input style="margin:5px;" type="radio"
                                                            name="without_relocation" value="no">
                                                        <?=$lang['NO']?></label>
                                                </div>
                                            </td>
                                        </tr>

                                        <!-- Question 5 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['5) HAVE YOU EVER BEEN DISMISSED, DISCHARGED, OR LAID OFF FROM ANY EMPLOYMENT?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 40px;"><input style="margin:5px;" value="yes" type="radio"
                                                    name="dismissed" onclick="toggleDetail('dismissed_detail', true)">
                                            </td>
                                            <td style="padding:5px;">
                                                <?=$lang['IF YES, PLEASE GIVE DETAILS:']?><input type="text"
                                                    id="dismissed_detail" name="dismissed_detail"
                                                    style="width: 70%; display: none;"></td>
                                        </tr>
                                        <tr>
                                            <td><input type="radio" style="margin:5px;" value="no" name="dismissed"
                                                    onclick="toggleDetail('dismissed_detail', false)"></td>
                                            <td style="padding:5px;"><?=$lang['NO']?></td>
                                        </tr>

                                        <!-- Question 6 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['6) HAVE YOU EVER BEEN CHARGED IN A COURT LAW?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="radio" style="margin:5px;" name="court" value="yes"
                                                    onclick="toggleDetail('court_detail', true)"></td>
                                            <td style="padding:5px;">
                                                <?=$lang['IF YES, PLEASE GIVE DETAILS:']?><input type="text"
                                                    id="court_detail" name="court_detail"
                                                    style="width: 70%; display: none;"></td>
                                        </tr>
                                        <tr>
                                            <td><input type="radio" style="margin:5px;" value="no" name="court"
                                                    onclick="toggleDetail('court_detail', false)"></td>
                                            <td style="padding:5px;"><?=$lang['NO']?></td>
                                        </tr>

                                        <!-- Question 7 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['7) HAVE YOU BEEN DECLARED BANKRUPTCY?']?></td>
                                        </tr>
                                        <tr>
                                            <td><input value="yes" style="margin:5px;" type="radio" name="bankruptcy">
                                            </td>
                                            <td style="padding:5px;"><?=$lang['YES']?></td>
                                        </tr>
                                        <tr>
                                            <td><input value="no" style="margin:5px;" type="radio" name="bankruptcy">
                                            </td>
                                            <td style="padding:5px;"><?=$lang['NO']?></td>
                                        </tr>

                                        <!-- Question 8 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['8) ARE YOU CURRENTLY EXPERIENCING ANY FINANCIAL DIFFICULTIES?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="radio" style="margin:5px;" value="yes" name="finance"
                                                    onclick="toggleDetail('finance_detail', true)"></td>
                                            <td style="padding:5px;">
                                                <?=$lang['IF YES, PLEASE GIVE DETAILS:']?><input type="text"
                                                    id="finance_detail" name="finance_detail"
                                                    style="width: 70%; display: none;"></td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="finance" value="no"
                                                    onclick="toggleDetail('finance_detail', false)"></td>
                                            <td style="padding:5px;">NO</td>
                                        </tr>

                                        <!-- Question 9 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['9) HAVE YOU APPLIED TO OUR COMPANY BEFORE?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="radio" style="margin:5px;" value="yes" name="applied"
                                                    onclick="toggleDetail('applied_detail', true)"></td>
                                            <td style="padding:5px;">
                                                <?=$lang['IF YES, PLEASE GIVE DETAILS:']?><input type="text"
                                                    id="applied_detail" name="applied_detail"
                                                    style="width: 70%; display: none;"></td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="applied" value="no"
                                                    onclick="toggleDetail('applied_detail', false)"></td>
                                            <td style="padding:5px;"><?=$lang['NO']?></td>
                                        </tr>

                                        <!-- Question 10 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['10) HAVE YOU BEEN INVOLVED IN A TRADE DISPUTE REFERRED TO LABOUR COURT?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" value="yes" name="dispute"
                                                    onclick="toggleDetail('dispute_detail', true)"></td>
                                            <td style="padding:5px;">
                                                <?=$lang['IF YES, PLEASE GIVE DETAILS:']?><input type="text"
                                                    id="dispute_detail" name="dispute_detail"
                                                    style="width: 70%; display: none;"></td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="dispute" value="no"
                                                    onclick="toggleDetail('dispute_detail', false)"></td>
                                            <td style="padding:5px;"><?=$lang['NO']?></td>
                                        </tr>

                                        <!-- Question 11 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['11) DO YOU OWN A CAR AND/OR MOTORCYCLE WITH VALID LICENSE?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="vehicle" value="yes"></td>
                                            <td style="padding:5px;"><?=$lang['YES']?></td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="vehicle" value="no"></td>
                                            <td style="padding:5px;"><?=$lang['NO']?></td>
                                        </tr>

                                        <!-- Question 12 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['12) ARE YOU WILLING TO WORK OVERTIME?']?></td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="overtime" value="yes">
                                            </td>
                                            <td style="padding:5px;"><?=$lang['YES']?></td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="overtime" value="no"></td>
                                            <td style="padding:5px;"><?=$lang['NO']?></td>
                                        </tr>

                                        <!-- Question 13 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['13) DO YOU HAVE ANY OTHER SIDE JOB OR BUSINESS?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="other_job" value="yes"
                                                    onclick="toggleDetail('other_job_detail', true)"></td>
                                            <td style="padding:5px;">
                                                <?=$lang['IF YES, PLEASE GIVE DETAILS:']?> <input type="text"
                                                    id="applied_detail" name="other_job_detail"
                                                    style="width: 70%; display: none;"></td>
                                        </tr>
                                        <tr>
                                            <td><input style="margin:5px;" type="radio" name="other_job" value="no"
                                                    onclick="toggleDetail('other_job_detail', false)"></td>
                                            <td style="padding:5px;"><?=$lang['NO']?></td>
                                        </tr>

                                        <!-- Question 14 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['14) WHAT ATTRACTED YOU TO THIS CAREER OPPORTUNITY?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" style="padding:0;">
                                                <input type="text" name="attract" style="margin:0; width: 100%;"
                                                    onclick="toggleDetail('applied_detail', false)">
                                            </td>
                                        </tr>

                                        <!-- Question 15 -->
                                        <tr>
                                            <td style="padding:5px;" colspan="2">
                                                <?=$lang['15) WHAT ARE YOUR CAREER GOALS IN 5 YEARS, AND HOW TO ACHIEVE THEM?']?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" style="padding:0;">
                                                <input type="text" name="career_plan" style="margin:0; width: 100%;"
                                                    onclick="toggleDetail('applied_detail', false)">
                                            </td>
                                        </tr>


                                    </table>
                                </div>
                            </div>
                            <script>
                            function toggleDetail(inputId, show) {
                                const input = document.getElementById(inputId);
                                input.style.display = show ? 'inline-block' : 'none';
                                if (!show) input.value = '';
                            }
                            </script>
                        </td>
                    </tr>

                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <div class="panel panel-primary" style="border: 2px solid #5e5bd0;">
                                <div class="panel-heading"
                                    style="font-size:16px; background-color: #5e5bd0;color: white; font-weight: bold;padding: 10px;">
                                    <?=$lang['PRIVACY NOTICE FOR PERSONAL DATA']?>
                                </div>
                                <div class="panel-body" style="padding: 0; font-weight: bold; font-size: 16px;">

                                    <p style="margin:10px">BY PROVIDING PERSONAL DATA AS STATED IN THIS
                                        EMPLOYMENT APPLICATION FORM, I HAVE CONSENTED YOUR COMPANY TO
                                        PROCESS THE PERSONAL DATA IN ACCORDANCE WITH PERSONAL DATA
                                        PROTECTION ACT, AND I FURTHER CONFIRM THAT ALL PERSONAL DATA
                                        PROVIDED HEREIN ARE ACCURATE AND COMPLETE.</p>

                                    <p style="margin:10px">TO THE EXTENT THAT I HAVE PROVIDED ABOUT MY
                                        FAMILY MEMBERS, SPOUSE, OTHER DEPENDENTS, AND PERSONAL REFERRALS
                                        CONFIRM THAT I HAVE EXPLAINED TO THEM THAT THEIR PERSONAL DATA WILL
                                        BE PROVIDED TO, AND PROCESSED BY YOUR COMPANY AND I REPRESENT AND
                                        WARRANT THAT I HAVE OBTAINED THEIR CONSENT TO THE PROCESSING OF
                                        THEIR PERSONAL DATA IN ACCORDANCE WITH PERSONAL DATA PROTECTION ACT.
                                    </p>

                                    <p style="margin:10px">I FURTHER AUTHORIZE AND CONSENT YOUR COMPANY TO
                                        CONDUCT BACKGROUND SEARCH ON ME WHETHER BASED ON THE DATA PROVIDED
                                        BY ME IN THIS EMPLOYMENT APPLICATION FORM OR RELATED INFORMATION
                                        THAT YOUR COMPANY MAY OBTAIN FROM OTHER SOURCES FOR EVALUATING MY
                                        JOB APPLICATION.</p>

                                    <br />
                                    <br />
                                    <label style="margin:10px">FULL NAME</label><input type="text"
                                        name="privacy_name"><br>
                                    <label style="margin:10px"> NRIC NUMBER </label><input type="text"
                                        name="privacy_nric_number"><br>
                                    <label style="margin:10px"> DATE</label> <input type="text" name="privacy_date"
                                        class="datetimepicker"><br>
                                </div>
                            </div>
                        </td>
                    </tr>

                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>

                            <div class="panel panel-primary" style="border: 2px solid #5e5bd0;">
                                <div class="panel-heading"
                                    style="font-size:16px; background-color: #5e5bd0;color: white; font-weight: bold;padding: 10px;">
                                    <?= $lang['ACKNOWLEDGEMENT AND AUTHORIZATION']?>
                                </div>
                                <div class="panel-body" style="padding: 0; font-weight: bold; font-size: 16px;">

                                    <p style="margin:10px;">I HEREBY DECLARE THAT ALL PARTICULARS AND
                                        DOCUMENTS GIVEN BY ME ON THIS EMPLOYMENT APPLICATION FORM ARE TO THE
                                        BEST OF MY KNOWLEDGE AND BELIEF, TRUE AND CORRECT. I UNDERSTAND THAT
                                        IF OR AT ANY TIME AFTER MY EMPLOYMENT, THE INFORMATION GIVEN ON THIS
                                        FORM ARE FOUND TO BE FALSE, INCORRECT OR INCOMPLETE, THE COMPANY
                                        RESERVES THE RIGHT TO DISMISS MY SERVICES WITHOUT NOTICE OR
                                        COMPENSATION. </p>
                                    <br />
                                    <br />
                                    <label style="margin:10px">FULL NAME</label><input type="text"
                                        name="acknowledgement_name"><br>
                                    <label style="margin:10px"> NRIC NUMBER </label><input type="text"
                                        name="acknowledgement_nric_number"><br>
                                    <label style="margin:10px"> DATE</label><input type="text"
                                        name="acknowledgement_privacy_date" class="datetimepicker"><br>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="4">&nbsp;</td>
                    </tr>
                </table>
            </div>
            <br />
            <!--<div class="clearfix" style="width:100%; margin:0 auto;">
            <div style="width:350px; float:left;">
            	<div class="received_by_signature_box clearfix">
                    <div style="width:350px; float:left;">
                        <canvas class="received_by_file" id="canvas" width="350" height="150"></canvas>
                        <div class="clearButton"><a href="#" id="clearSig">Clear</a></div>
                        <input type="hidden" name="application_signature" id="received_by_file" />
                    </div>
                </div>
                Application's signature

            </div>
            <div style="width:260px; float:left;">&nbsp;</div>
            <div style="width:350px; float:left;">&nbsp;</div>
        </div>-->
            <div class="clearfix" style="max-width:960px; width:100%; margin:0 auto;">
                <div style="width:350px;float:left;">

                    <div id="signature-pad" style="width:350px;" class="signature-pad">
                        <div id="protective-layer"
                            style="position: absolute;width: inherit;height: 150px; text-align: center;font-size: large;font-weight: bolder;padding: 50px 0px;">
                            Click To Sign Here</div>
                        <div class="signature-pad--body">
                            <canvas
                                style="border: 1px solid #ccc; width:350px !important; height:150px !important;"></canvas>
                        </div>
                        <div class="signature-pad--footer">
                            <div class="signature-pad--actions">
                                <div>
                                    <button type="button" class="button clear"
                                        data-action="clear"><?= $lang['Clear']?></button>
                                </div>
                            </div>
                        </div>
                        <input type="hidden" name="application_signature" id="signature_pad" required="required" />
                        <input type="hidden" name="application_signature_hidden" id="signature_pad_hidden"
                            required="required" />
                    </div>


                    <!-- <canvas id="canvas" width="350" height="150" style="border: 1px solid #ccc;"></canvas>
                <a href="#" id="clearSig" style="margin-top:5px;"><?= $lang['Clear']?></a>
                <a href="#" id="saveSig" style="float:right;"><?= $lang['Save']?></a>
                <span id="application_signature_save"><i class="fa fa-check-circle"></i></span> -->
                    <!--Application's signature-->
                </div>
                <script src="<?= PATH ?>scripts/signature_pad.umd.js"></script>
                <script
                    src="<?= PATH ?>scripts/signature.js?v=<?= filemtime( $_SERVER["DOCUMENT_ROOT"].'/scripts/signature.js')  ?>">
                </script>
                <div style="width:260px; float:left;">&nbsp;</div>
                <div style="width:350px; float:left;">&nbsp;</div>
            </div>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" style="padding:0; margin:0 auto;">
                <tr>
                    <td colspan="4">&nbsp;</td>
                </tr>
                <tr>
                    <td colspan="4" style="border-bottom:1px solid #000;">&nbsp;</td>
                </tr>
                <tr>
                    <td colspan="4">
                        <input type="hidden" name="hidden" value="1" />
                        <input type="hidden" name="email_type" value="online_form" />
                        <input id="apform_submit_btn" type="submit" class="cd-btn custom_button float_right">
                        <input type="hidden" name="employment_status" value="pending">
                    </td>
                </tr>
                <tr>
                    <td colspan="4">&nbsp;</td>
                </tr>
                <tr>
                    <td colspan="4">&nbsp;</td>
                </tr>
            </table>
        </form>
    </div>

    <script src="scripts/jquery.datetimepicker.full.min.js"></script>
    <!-- <script src="scripts/jquery.signaturepad.min.js"></script> -->
    <script src="scripts/all_employment.js"></script>
    <script>
    $(document).ready(function() {


        $("#apform_submit_btn").click(function(event) {
            event.preventDefault();
            if (confirm("Please make sure you have inserted all the details and signed the form?") ==
                true) {
                $(".employment_online_form").submit();
            }
        });


        $(".employment_online_form").validate({

            submitHandler: function(form) {



                var boolean_image = true,

                    boolean_submit = true;
                $('.photo_box_right').css('border', '');


                // send email

                var parent = $('.employment_online_form');

                data = parent.serialize();


                $.ajax({

                    type: 'POST',

                    url: 'requires/ajax_employment_update.php?type=online-email',

                    data: data,

                    success: function(data) {

                        if (data['result'] == true) {

                            $('input[type="text"], input[type="email"], textarea').val(
                                '');
                        }

                    }

                });


                form.submit();


            }

        });

    });
    </script>
</body>

</html>