first commit

This commit is contained in:
LAPTOP-V9RRD1TL\Michelle's Computer 2025-07-21 21:38:17 +08:00
commit f8f8fcaf96
2529 changed files with 227800 additions and 0 deletions

View File

@ -0,0 +1,640 @@
<?php
// require 'PhpSpreadsheet/vendor/autoload.php';
// require 'PhpSpreadsheet/src/PhpSpreadsheet/IOFactory.php';
// require 'PhpSpreadsheet/src/PhpSpreadsheet/Cell/Coordinate.php';
$page = escapeString($_GET['page']) ;
$search_name = escapeString($_GET['search_name']) ;
$search_idno = escapeString($_GET['search_idno']) ;
$search_department = ($_GET['search_department']) ;
$search_country = escapeString($_GET['search_country']) ;
$search_branch = escapeString($_GET['search_branch']) ;
$search_resigned = escapeString($_GET['search_resigned']) ;
$sort_by = escapeString($_GET['sort_by']) ;
$sort_by = ( $sort_by != '' ? $sort_by : 'created_at' ) ;
$sort_by_type = escapeString($_GET['sort_by_type']) ;
$export = escapeString($_GET['export']) ;
$export = ( $export == 'yes' ? 'yes' : 'no' ) ;
$search_mobile = escapeString($_GET['search_mobile']) ;
$search_mail = escapeString($_GET['search_mail']) ;
$search_tier = escapeString($_GET['search_tier']) ;
$date_time = escapeString($_GET['date_time']) ;
$date_current = TODAYDAY ;
$date_time = ( $date_time != '' ? $date_time : date('Y-m', strtotime($date_current)) ) ;
$day_of_month = date("t", strtotime($date_time)) ;
$start_day = 1;
$search_day_from = escapeString($_GET['search_day_from']) ;
$search_day_to = escapeString($_GET['search_day_to']) ;
// pagination
if (isset($page) && !empty($page)) { $product_page = $page ; } else { $product_page = 1 ; } // next and prev page (5 thing need to change)
$start_from = ($product_page - 1) * LIMIT ; //end next and prev page
$search_query = '' ;
// add permission
/*
if ( $_SESSION['system_permission'] != 'admin' ){
if ( permissionCheck($row_user, 'local-only') && permissionCheck($row_user, 'foreign-only') ){
// do nothing
}elseif ( permissionCheck($row_user, 'local-only') ){
$search_query .= " AND a.country_id = '1'" ;
}else{
$search_query .= " AND a.country_id != '1'" ;
}
}
*/
if ( $search_name != '' ){
$search_query .= " AND ( a.staff_name LIKE '%".$search_name."%' )" ;
}
if ( $search_idno != '' ){
$search_query .= " AND ( a.staff_idno LIKE '%".$search_idno."%' )" ;
}
if( $search_mobile != ''){
$search_query .= " AND a.staff_mobileno LIKE '%".$search_mobile."%'" ;
}
if( $search_mail != ''){
$search_query .= " AND a.staff_email LIKE '%".$search_mail."%'" ;
}
if( $search_tier != ''){
$search_query .= " AND a.staff_tier LIKE '%".$search_tier."%'" ;
}
$check_department = false ;
if ( $search_department != '' ){
$check_department = true ;
if(arrayCheck($search_department)){
$search_query .= " AND b.department_id IN (".implode(',',$search_department).")" ;
foreach($search_department as $k => $v ){
$search_department_url .= '&search_department%5B'.$k.'%5D='.$v;
}
}
}
if ( $search_country != '' ){
if ( $search_country == 'local' ){
$search_query .= " AND a.country_id = '1'" ;
}else{
$search_query .= " AND a.country_id != '1'" ;
}
}
if ( $search_branch != '' ){
$search_query .= " AND a.branch_id = '".$search_branch."'" ;
}
if ( $search_resigned != '' ){
$search_query .= " AND ( a.staff_date_resigned != '0000-00-00' and a.staff_date_resigned IS NOT NULL )" ;
}else{
$search_query .= " AND ( a.staff_date_resigned IS NULL OR a.staff_date_resigned = '0000-00-00' OR a.staff_date_resigned >= '".$date_time."' )" ;
}
if ( $search_day_from ){
$start_day = $search_day_from;
}
if ( $search_day_to ){
$day_of_month = $search_day_to;
}
$get_user_tier = userTierQuery( $row_user ) ;
// $search_query .= ( $get_user_tier['check'] ? " AND a.staff_tier IN ( ".implode(', ', $get_user_tier['tiers'])." )" : '' ) ;
// page query
$mysqli_query = "SELECT a.staff_id, a.staff_name, a.staff_idno, a.staff_image, a.job_position_id, a.group_id, a.staff_tier, GROUP_CONCAT( DISTINCT CONCAT(c.department_desc) ) as department_desc FROM staff a
LEFT JOIN staff_department b ON (a.staff_id = b.staff_id)
LEFT JOIN setting_department_translation c ON (b.department_id = c.department_id)
WHERE b.deleted_at IS NULL AND c.lang = 'en' AND " ;
$mysqli_query = $mysqli_query . " a.deleted_at IS NULL " . $search_query . $user_branch_permission_sql_a . " GROUP BY a.staff_id" ;
$mysqli_page = $mysqli->query( $mysqli_query." ORDER BY (" . $sort_by . ' * 1) ' . $sort_by_type . ', ' . $sort_by . ' ' . $sort_by_type . ( $export == 'no' ? " LIMIT $start_from, " . LIMIT : "" ) ) ;
// set search url
$search_url = 'page='.$page.'&page_mode='.$_GET['page_mode'].'&edit='.$_GET['edit'].'&date_time='.$_GET['date_time'].'&search_name='.$_GET['search_name'].'&search_idno='.$_GET['search_idno'].'&search_country='.$_GET['search_country'].'&search_branch='.$_GET['search_branch'].'&sort_by='.$_GET['sort_by'].'&sort_by_type='.$_GET['sort_by_type'].'&search_resigned='.$_GET['search_resigned'].$search_department_url."&search_day_to=".$search_day_to."&search_day_from=".$search_day_from ;
// load pagination
if ( $export == 'no' ){
$page_pagination = nextPrevious($product_page, LIMIT, $search_url, $mysqli_query) ;
}
// get all staff
$attendances = [] ;
$staff_list = [] ;
if( $mysqli_page->num_rows > 0 ){
// loop all position
$array_position = [] ;
$mysqli_position = $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'" ) ;
if( $mysqli_position->num_rows > 0 ){
$row_position = $mysqli_position->fetch_assoc() ;
$array_position[$row_position['job_position_id']] = $row_position['job_position_desc'] ;
}
while( $row_staff = $mysqli_page->fetch_assoc() ){
$staff_id = $row_staff['staff_id'] ;
$attendances[$staff_id]['staff_id'] = $staff_id ;
$attendances[$staff_id]['staff_idno'] = $row_staff['staff_idno'] ;
$attendances[$staff_id]['staff_name'] = $row_staff['staff_name'] ;
$attendances[$staff_id]['staff_positionname'] = $array_position[$row_staff['job_position_id']] ;
$attendances[$staff_id]['staff_department'] = $row_staff['department_desc'] ;
$attendances[$staff_id]['staff_image'] = PATH . ( $row_staff['staff_image'] != '' ? 'uploads/Staff/'.$row_staff['staff_image'] : 'images/NoProduct.jpg' ) ;
$attendances[$staff_id]['group_id'] = $row_staff['group_id'] ;
$attendances[$staff_id]['staff_tier'] = $row_staff['staff_tier'] ;
$staff_list[] = $staff_id ;
}
}
$array_health = [] ;
if ( count($staff_list) > 0 ){
$mysqli_health = $mysqli->query( "SELECT staff_id, degree, request_date FROM staff_health
WHERE deleted_at IS NULL AND request_date LIKE '".$date_time."%' AND staff_id IN (".implode(',', $staff_list).")" ) ;
if( $mysqli_health->num_rows > 0 ){
while ( $row_health = $mysqli_health->fetch_assoc() ){
$array_health[$row_health['staff_id']][date('Y-m-d', strtotime($row_health['request_date']))] = $row_health['degree'] ;
}
}
}
// get all selected month attendances
$get_attendances = $mysqli->query("SELECT staff_id, record_from, code, abnormal, latitude, longitude, created_at, updated_at FROM staff_attendance
WHERE deleted_at IS NULL AND staff_id IN (".implode(',', $staff_list).") AND created_at LIKE '".$date_time."-%'
ORDER BY created_at ASC") ;
if ( $get_attendances->num_rows > 0 ){
while ( $v = $get_attendances->fetch_assoc() ){
$created_at = $v['created_at'] ;
$date_group = date('Y-m-d', strtotime($created_at)) ;
$attendances[$v['staff_id']]['group'][$date_group][] = [
'abnormal' => $v['abnormal'],
'latitude' => $v['latitude'],
'longitude' => $v['longitude'],
'record_from' => $v['record_from'],
'code' => $v['code'],
'created_at' => $created_at,
'updated_at' => $v['updated_at']
] ;
}
}
$get_department = $mysqli->query("SELECT a.staff_id, b.department_desc FROM staff_department a
LEFT JOIN setting_department_translation b on ( a.department_id = b.department_id )
WHERE b.lang = 'en' AND a.staff_id IN (".implode(',', $staff_list).") ");
if ( $get_department->num_rows > 0 ){
while ( $v = $get_department->fetch_assoc() ){
$attendances[$v['staff_id']]['department'][] = $v['department_desc'];
}
}
// export excel
if ( $export == 'yes' ){
include 'PhpExcel/PHPExcel.php' ;
// get all attendance list
$array_list = [] ;
$get_attendaces = $mysqli->query("SELECT list_id, list_work_day, list_ot_day, list_late, list_amt, list_early_out, list_time_off, list_type_remark, staff_id, list_date, list_work_day, list_ot_day, list_allow_food, list_food, list_attendance_remark FROM staff_attendance_list
WHERE deleted_at IS NULL AND list_date LIKE '".$date_time."%'") ;
if ( $get_attendaces->num_rows > 0 ){
while ( $row_list = $get_attendaces->fetch_assoc() ){
$array_list[$row_list['staff_id']][$row_list['list_date']] = $row_list ;
}
}
// set excel content
$page_filename = 'Attenndance-'.date( 'Ymd', time() ) ;
$objPHPExcel = new PHPExcel() ;
$objPHPExcel->getProperties()
->setCreator(COMPANY)
->setTitle(COMPANY)
->setSubject(COMPANY)
->setDescription(COMPANY)
->setKeywords(COMPANY)
->setCategory(COMPANY) ;
$objPHPExcel->getActiveSheet()->setTitle( $page_filename ) ;
$objPHPExcel->setActiveSheetIndex(0);
$objWriter = PHPExcel_IOFactory::createWriter( $objPHPExcel, 'Excel5' ) ;
$styleArrayTitle = array(
'font' => array(
'bold' => true ,
'color' => array( 'rgb' => '000000' ) ,
'size' => 15
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
)
);
$styleArrayDay = array(
'font' => array(
'bold' => true
),
'borders' => array(
'outline' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN
)
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
)
) ;
$styleArrayBg1 = array(
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'AFABAB')
),
'borders' => array(
'outline' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN
)
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
)
) ;
$styleArrayBg2 = array(
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'FFDA65')
),
'borders' => array(
'outline' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN
)
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
)
) ;
$styleArray = array(
'borders' => array(
'outline' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN
)
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
)
) ;
$styleArrayLeft = array(
'borders' => array(
'outline' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN
)
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT,
)
) ;
$styleArray2 = array(
'alignment' => array(
'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,
)
) ;
$styleArrayRed = array(
'font' => array(
'color' => array('rgb' => 'FF0000'),
));
$count = 1 ;
$firstChar = 'A' ;
// $lastChar = 'AG' ;
$lastChar = "A";
for ($i= $start_day; $i <= ($day_of_month) ; $i++) {
$lastChar++;
}
// title name
$objPHPExcel->getActiveSheet()->mergeCells( $firstChar.$count.':'.$lastChar.$count ) ;
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count.':'.$lastChar.$count )->applyFromArray( $styleArrayTitle ) ;
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar.$count, 'Attendance Clock Table' ) ;
$count++ ;
// $array_title = array( 'DD', 'DAY', 'MIN', 'AMT', 'OT', 'FOOD', 'CK', 'RK', 'HL' ) ;
$array_title = array( 'DD', 'CK' ) ;
// loop all attendance record
if ( count($attendances) > 0 ){
foreach ( $attendances as $k => $v ){
$count++ ;
$count++ ;
$date_group = $v['group'] ;
$staff_idno = ucwords($v['staff_idno']) ;
$objPHPExcel->getActiveSheet()->getStyle($firstChar.$count)->applyFromArray( $styleArray ) ;
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar.$count, 'US' ) ;
$firstChar2 = $firstChar ;
$firstChar2++ ;
$mc1 = $firstChar2.$count;
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar2.$count, 'ID: '.$staff_idno.' Name: '.$v['staff_name'].' Department: '.implode(",", $v['department'])) ;
$mc2 = $lastChar.$count ;
$objPHPExcel->getActiveSheet()->mergeCells($mc1.':'.$mc2) ;
$objPHPExcel->getActiveSheet()->getStyle($mc1.':'.$mc2)->applyFromArray( $styleArrayLeft ) ;
$count++ ;
$count2 = $count ;
for ($row = 6; $row <= 10; $row++) {
$objPHPExcel->getActiveSheet()->getStyle('AG' . $row)->applyFromArray($styleArray);
$objPHPExcel->getActiveSheet(0)->setCellValue('AG' . $row, '=SUM(B' . $row . ':AF' . $row . ')');
}
if( arrayCheck( $array_title ) ){
foreach( $array_title as $key_title => $value_title ){
$objPHPExcel->getActiveSheet()->getStyle($firstChar.$count)->applyFromArray( $styleArray ) ;
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar.$count, $value_title ) ;
$firstChar2 = $firstChar ;
$firstChar2++ ;
$total_day = 0 ;
$total_ot = 0 ;
$total_min = 0 ;
$total_amt = 0 ;
$total_fb = 0 ;
for( $i = $start_day ; $i <= $day_of_month ; $i++ ){
$objPHPExcel->getActiveSheet()->getStyle($firstChar2.$count)->applyFromArray( $styleArray ) ;
// default parameter ;
$report_day = 0 ;
$report_min = '00:00:00' ;
$report_ot = 0 ;
$report_amt = 0 ;
$report_fb = 0 ;
$list_late = 0 ;
$list_early_out = 0 ;
$report_wt = '' ;
$list_type_remark = '' ;
$report_remark = '' ;
$report_health = '' ;
$report_allow_food = '' ;
$new_day = $date_time.'-'.str_pad($i, 2, '0', STR_PAD_LEFT) ;
$apply_color = [] ;
// get attendance list report
$list_date = $new_day ;
$row_report = $array_list[$v['staff_id']][$list_date] ;
if ( $row_report != undefined && arrayCheck($row_report) ){
$report_day = ( $row_report['list_work_day'] != '' ? $row_report['list_work_day'] : 0 ) ;
$report_ot = ( $row_report['list_ot_day'] != '' ? $row_report['list_ot_day'] : 0 ) ;
$list_late = ( $row_report['list_late'] != '00:00:00' ? $row_report['list_late'] : 0 ) ;
$list_early_out = ( $row_report['list_early_out'] != '00:00:00' ? $row_report['list_early_out'] : 0 ) ;
$list_type_remark = $row_report['list_type_remark'] ;
$report_remark = $row_report['list_attendance_remark'];
$report_health = ( $array_health[$v['staff_id']][$list_date] != '' ? $array_health[$v['staff_id']][$list_date] : '-');
// $report_min = ( $row_report['list_late'] != '00:00:00' ? substr($row_report['list_late'], 0, -3) : '00:00' ) ;
$report_amt = ( $row_report['list_amt'] != '' ? $row_report['list_amt'] : 0 ) ;
$report_fb = ( $row_report['list_allow_food'] == 'yes' ? $row_report['list_food'] : 0 ) ;
$report_allow_food = ( $row_report['list_allow_food'] == 'yes' ? '1' : '' ) ;
if ( $row_report['list_late'] != '00:00:00' ){
$report_min = commonAddTime($row_report['list_late'], '00:00:01') ;
}
if ( $row_report['list_early_out'] != '00:00:00' ){
$report_min = commonAddTime($row_report['list_early_out'], $report_min) ;
}
if ( $row_report['list_time_off'] != '00:00:00' && $row_report['list_time_off'] != '' ){
$report_min = commonAddTime($row_report['list_time_off'], $report_min) ;
}
}
$report_min = substr($report_min, 0, -3) ;
// 'DD', 'DAY', 'MIN', 'AMT', 'OT', 'CK', 'HL'
$content = '' ;
$show_decimal = true ;
switch ( $value_title ){
case 'DD' :
$content = $i ;
$show_decimal = false ;
break ;
case 'DAY' :
$content = $report_day ;
$total_day += $report_day ;
break ;
case 'MIN' :
$content = ( $report_min != '00:00' ? numberFormat(convertMinutes($report_min)) : '' ) ;
$total_min += numberFormat(convertMinutes($report_min)) ;
break ;
case 'AMT' :
$content = ( $report_amt > 0 ? $report_amt : '' ) ;
$total_amt += $report_amt ;
break ;
case 'OT' :
$content = ( $report_ot > 0 ? $report_ot : '' ) ;
$total_ot += $report_ot ;
break ;
case 'FOOD' :
$content = ( $report_allow_food ) ;
// $total_fb += $report_fb ;
break ;
case 'CK' :
$boolean_abnormal = false ;
$show_decimal = false ;
$array_group = [] ;
if ( !empty($date_group[$new_day]) ){
$get_group = $date_group[$new_day] ;
foreach( $get_group as $k_group => $v_group ){
$array_group[] = date('H:i', strtotime($v_group['created_at'])) ;
if ( $v_group['abnormal'] == 'yes' ){
$boolean_abnormal = true ;
}
}
}
$style_red = array('fill' => array('type' => PHPExcel_Style_Fill::FILL_SOLID,'color' => array('rgb' => 'FF0000')));
$style_yellow = array('fill' => array('type' => PHPExcel_Style_Fill::FILL_SOLID,'color' => array('rgb' => 'FFFF00')));
$style_green = array('fill' => array('type' => PHPExcel_Style_Fill::FILL_SOLID,'color' => array('rgb' => '00FF00')));
$style_blue = array('fill' => array('type' => PHPExcel_Style_Fill::FILL_SOLID,'color' => array('rgb' => '0000FF')));
$style_orange = array('fill' => array('type' => PHPExcel_Style_Fill::FILL_SOLID,'color' => array('rgb' => 'FF8000')));
$style_purple = array('fill' => array('type' => PHPExcel_Style_Fill::FILL_SOLID,'color' => array('rgb' => 'C000FF')));
$apply_text = '' ;
$objRichText = new PHPExcel_RichText();
switch( $list_type_remark ){
case 'OD' : // OFF DAY
$apply_text = 'OFF DAY' ;
$apply_color = $style_green ;
break ;
case 'MC' : // SICK LEAVE
$apply_text = 'SICK LEAVE' ;
$apply_color = $style_yellow; ;
break ;
case 'UL' : // UNPAID LEAVE
$apply_text = 'UNPAID LEAVE'; ;
$apply_color = $style_red ;
break ;
case 'AL' : // ANNUAL LEAVE
$apply_text = 'ANNUAL LEAVE' ;
$apply_color = $style_blue ;
break ;
case 'AS' : // ABSENT
$apply_text = 'ABSENT' ;
$apply_color = $style_orange ;
break ;
case 'HL' : // HOLIDAY LIST
$apply_text = 'HOLIDAY LIST' ;
// $apply_color = $style_orange ;
break ;
case 'CL' : // COMPANY LEAVE
$apply_text = 'COMPANY LEAVE' ;
// $apply_color = $style_orange ;
break ;
case 'SP' : // SUSPEND LEAVE
$apply_text = 'SUSPEND LEAVE' ;
// $apply_color = $style_orange ;
break ;
default :
if ( $boolean_abnormal ){
$apply_color = $style_purple ;
}
}
$content = implode("\n", $array_group) . ( $apply_text != '' ? "\n".$apply_text : '' ) ;
break ;
case "RK":
$content = $report_remark ;
break;
case "HL":
$content = $report_health ;
break;
}
if ( $show_decimal ){
$objPHPExcel->setActiveSheetIndex(0)->getStyle( $firstChar2.$count )->getNumberFormat()->setFormatCode('#,##0.00') ;
}
################################################################## add color ##################################################################
if($value_title == 'CK'){
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar2.$count, $content ) ;
$objPHPExcel->getActiveSheet()->getStyle($firstChar2.$count)->getAlignment()->setWrapText(true);
if(ALLOWCOLOREXCEL == "YES" && arrayCheck($apply_color)){
$objPHPExcel->getActiveSheet()->getStyle($firstChar2.$count)->applyFromArray($apply_color);
}
}else{
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar2.$count, $content ) ;
}
################################################################## add color ##################################################################
$firstChar2++ ;
// if after day 31, add total
if ( $i == $search_day_to ){
$last_content = '' ;
switch ( $value_title ){
case 'DD' :
$last_content = 'TOTAL' ;
break ;
case 'DAY' :
$last_content = $total_day ;
break ;
case 'MIN' :
$last_content = $total_min ;
break;
case 'AMT' :
$last_content = $total_amt ;
break ;
case 'OT' :
$last_content = $total_ot ;
break ;
case 'CK' :
break ;
}
$objPHPExcel->getActiveSheet()->getStyle($firstChar2.$count)->applyFromArray( $styleArray ) ;
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar2.$count, $last_content ) ;
$firstChar2++ ;
}
}
$count++ ;
}
}
}
}
// Submission from
header( 'Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ) ;
header( 'Content-Disposition: attachment;filename="'.$page_filename.'.xlsx"' ) ;
header( 'Cache-Control: max-age=0' ) ;
// save to pc
$objWriter->save('php://output') ;
header( "Refresh: 0" ) ;
exit ;
}
?>

View File

@ -0,0 +1,237 @@
<?php
$error_message = '' ;
$staff_id = escapeString($_POST['modal_staff_id']) ;
$check_group = escapeString($_POST['modal_check_group']) ;
if ( $staff_id != '' && $check_group != '' ){
$error_message = '<div class="result_error">Out must be greater than in.</div>' ;
// get previous check group
$previous_group = date('Y-m-d', strtotime($check_group.' -1 days')) ;
// default parameter
$attendance_id_0 = escapeString($_POST['attendance_id_0']) ;
$attendance_time_0 = escapeString($_POST['attendance_time_0']) ;
$attendance_remark_0 = escapeString($_POST['attendance_remark_0']) ;
$new_in_out_0 = ( $attendance_time_0 != '' ? ( escapeString($_POST['attendance_date_0']) . ' ' . $attendance_time_0 ) : '' ) ;
$attendance_id_1 = escapeString($_POST['attendance_id_1']) ;
$attendance_time_1 = escapeString($_POST['attendance_time_1']) ;
$attendance_remark_1 = escapeString($_POST['attendance_remark_1']) ;
$new_in_out_1 = ( $attendance_time_1 != '' ? ( escapeString($_POST['attendance_date_1']) . ' ' . $attendance_time_1 ) : '' ) ;
$attendance_id_2 = escapeString($_POST['attendance_id_2']) ;
$attendance_time_2 = escapeString($_POST['attendance_time_2']) ;
$attendance_remark_2 = escapeString($_POST['attendance_remark_2']) ;
$new_in_out_2 = ( $attendance_time_2 != '' ? ( escapeString($_POST['attendance_date_2']) . ' ' . $attendance_time_2 ) : '' ) ;
$attendance_id_3 = escapeString($_POST['attendance_id_3']) ;
$attendance_time_3 = escapeString($_POST['attendance_time_3']) ;
$attendance_remark_3 = escapeString($_POST['attendance_remark_3']) ;
$new_in_out_3 = ( $attendance_time_3 != '' ? ( escapeString($_POST['attendance_date_3']) . ' ' . $attendance_time_3 ) : '' ) ;
$attendance_id_4 = escapeString($_POST['attendance_id_4']) ;
$attendance_time_4 = escapeString($_POST['attendance_time_4']) ;
$attendance_remark_4 = escapeString($_POST['attendance_remark_4']) ;
$new_in_out_4 = ( $attendance_time_4 != '' ? ( escapeString($_POST['attendance_date_4']) . ' ' . $attendance_time_4 ) : '' ) ;
$attendance_id_5 = escapeString($_POST['attendance_id_5']) ;
$attendance_time_5 = escapeString($_POST['attendance_time_5']) ;
$attendance_remark_5 = escapeString($_POST['attendance_remark_5']) ;
$new_in_out_5 = ( $attendance_time_5 != '' ? ( escapeString($_POST['attendance_date_5']) . ' ' . $attendance_time_5 ) : '' ) ;
$attendance_id_6 = escapeString($_POST['attendance_id_6']) ;
$attendance_time_6 = escapeString($_POST['attendance_time_6']) ;
$attendance_remark_6 = escapeString($_POST['attendance_remark_6']) ;
$new_in_out_6 = ( $attendance_time_6 != '' ? ( escapeString($_POST['attendance_date_6']) . ' ' . $attendance_time_6 ) : '' ) ;
$attendance_id_7 = escapeString($_POST['attendance_id_7']) ;
$attendance_time_7 = escapeString($_POST['attendance_time_7']) ;
$attendance_remark_7 = escapeString($_POST['attendance_remark_7']) ;
$new_in_out_7 = ( $attendance_time_7 != '' ? ( escapeString($_POST['attendance_date_7']) . ' ' . $attendance_time_7 ) : '' ) ;
// check out must be greater than in
$boolean_check = false ;
if ( $attendance_time_0 != '' && $attendance_time_1 != '' ){
if ( $attendance_time_1 >= $attendance_time_0 ){ }else{ $boolean_check = true ; }
}
if ( $attendance_time_1 != '' && $attendance_time_2 != '' ){
if ( $attendance_time_2 >= $attendance_time_1 ){ }else{ $boolean_check = true ; }
}
if ( $attendance_time_2 != '' && $attendance_time_3 != '' ){
if ( $attendance_time_3 >= $attendance_time_2 ){ }else{ $boolean_check = true ; }
}
if ( $attendance_time_3 != '' && $attendance_time_4 != '' ){
if ( $attendance_time_4 >= $attendance_time_3 ){ }else{ $boolean_check = true ; }
}
if ( $attendance_time_4 != '' && $attendance_time_5 != '' ){
if ( $attendance_time_5 >= $attendance_time_4 ){ }else{ $boolean_check = true ; }
}
if ( $attendance_time_5 != '' && $attendance_time_6 != '' ){
if ( $attendance_time_6 >= $attendance_time_5 ){ }else{ $boolean_check = true ; }
}
if ( $attendance_time_6 != '' && $attendance_time_7 != '' ){
if ( $attendance_time_7 >= $attendance_time_6 ){ }else{ $boolean_check = true ; }
}
// if false then allow to access
if ( !$boolean_check ){
$error_message = '<div class="result_error">Record failed to updated.</div>' ;
// start commit
$error = 0 ;
$mysqli->autocommit( false ) ;
// insert or update attendance
for ( $a = 0 ; $a < 8 ; $a++ ){
$attendance_id = '' ;
$remark = '' ;
$new_in_out = '' ;
switch ( $a ){
case '0' :
$attendance_id = $attendance_id_0 ;
$remark = $attendance_remark_0 ;
$new_in_out = $new_in_out_0 ;
break ;
case '1' :
$attendance_id = $attendance_id_1 ;
$remark = $attendance_remark_1 ;
$new_in_out = $new_in_out_1 ;
break ;
case '2' :
$attendance_id = $attendance_id_2 ;
$remark = $attendance_remark_2 ;
$new_in_out = $new_in_out_2 ;
break ;
case '3' :
$attendance_id = $attendance_id_3 ;
$remark = $attendance_remark_3 ;
$new_in_out = $new_in_out_3 ;
break ;
case '4' :
$attendance_id = $attendance_id_4 ;
$remark = $attendance_remark_4 ;
$new_in_out = $new_in_out_4 ;
break ;
case '5' :
$attendance_id = $attendance_id_5 ;
$remark = $attendance_remark_5 ;
$new_in_out = $new_in_out_5 ;
break ;
case '6' :
$attendance_id = $attendance_id_6 ;
$remark = $attendance_remark_6 ;
$new_in_out = $new_in_out_6 ;
break ;
case '7' :
$attendance_id = $attendance_id_7 ;
$remark = $attendance_remark_7 ;
$new_in_out = $new_in_out_7 ;
break ;
}
if ( $new_in_out != '' ){
if ( $attendance_id == '0' ){
// add attendance
if ( $mysqli->query("INSERT INTO staff_attendance
(staff_id, check_group, type, code, record_from, mac_address, ip_address, latitude, longitude, check_area, remark, created_at, updated_at) VALUES
('".$staff_id."', '".$check_group."', '".$attendance_type."', '', 'manual', '', '', '', '', 'in', '".$remark."', '".$new_in_out."', '".TODAYDATE."')") ){ }else{
$error++ ;
}
}else{
// update attendance
$attendance_q = $mysqli->query("SELECT * FROM staff_attendance
WHERE deleted_at IS NULL AND attendance_id = '".$attendance_id."' LIMIT 1") ;
if ( $attendance_q->num_rows > 0 ){
$attendance = $attendance_q->fetch_assoc() ;
$query_date = '' ;
if ( $attendance['created_at'] != $new_in_out ){
$query_date .= "created_at = '".$new_in_out."'," ;
}
// update attendance
if ( $mysqli->query("UPDATE staff_attendance SET
".$query_date."
remark = '".$remark."',
updated_at = '".TODAYDATE."'
WHERE attendance_id = '".$attendance_id."'") ){ }else{
$error++ ;
}
}
}
}else{
if ( $attendance_id != '0' ){
// update attendance
$attendance_q = $mysqli->query("SELECT * FROM staff_attendance
WHERE deleted_at IS NULL AND attendance_id = '".$attendance_id."' LIMIT 1") ;
if ( $attendance_q->num_rows > 0 ){
$attendance = $attendance_q->fetch_assoc() ;
// delete attendance list
if ( $mysqli->query("UPDATE staff_attendance SET
deleted_at = '".TODAYDATE."'
WHERE attendance_id = '".$attendance_id."'") ){ }else{
$error++ ;
}
}
}
}
}
// remove attendance list, direct remove 2 days, yesterday and today
/*
$array_group = [ $previous_group, $check_group ] ;
foreach ( $array_group as $k => $v ){
$get_list_q = $mysqli->query("SELECT list_id FROM staff_attendance_list
WHERE staff_id = '".$staff_id."' AND list_date = '".$v."' AND deleted_at IS NULL LIMIT 1") ;
if ( $get_list_q->num_rows > 0 ){
// delete attendance list
$get_list = $get_list_q->fetch_assoc() ;
$list_id = $get_list['list_id'] ;
if ( $mysqli->query("UPDATE staff_attendance_list SET
deleted_at = '".TODAYDATE."'
WHERE list_id = '".$list_id."'") ){
// delete the merge record
if ( $mysqli->query("UPDATE staff_attendance SET
list_id = '0'
WHERE list_id = '".$list_id."'") ){ }else{
$error++ ;
}
}else{
$error++ ;
}
}
}
*/
if( $error == 0 ) {
// commit query
$mysqli->commit() ;
$error_message = '<div class="result_success">Thank you, your attendance record success to updated.</div>' ;
}else{
$mysqli->rollback() ;
}
}
// refresh page
header("Refresh: 0") ;
$_SESSION['system_result'] = $error_message ;
exit ;
}
?>

View File

@ -0,0 +1,739 @@
<?php
$active_sub_menu = 'hr-employment' ;
switch($employment_status){
case 'Pending' :
$active_menu = 'hr-letter-pending' ;
break ;
case 'Interview' :
$active_menu = 'hr-letter-interview' ;
break ;
case 'Reschedule' :
$active_menu = 'hr-letter-reschedule' ;
break ;
case 'Keep In View' :
$active_menu = 'hr-letter-kiv' ;
break ;
case 'Offer' :
$active_menu = 'hr-letter-offer' ;
break ;
case 'Confirmation' :
$active_menu = 'hr-letter-confirmation' ;
break ;
case 'Reject' :
$active_menu = 'hr-letter-reject' ;
break ;
case 'Terminate' :
$active_menu = 'hr-letter-terminate' ;
break ;
}
// update database
if (isset($type) && $type == 'edit_int_det' && $_POST['hide'] == 1 && $_POST['hide_select_worker'] == 'Local'){
$int_det_q1 = escapeString($_POST['int_det_q1']) ;
$int_det_q2 = escapeString($_POST['int_det_q2']) ;
$int_det_q3 = escapeString($_POST['int_det_q3']) ;
$int_det_q4 = escapeString($_POST['int_det_q4']) ;
$int_det_q5 = escapeString($_POST['int_det_q5']) ;
$int_det_q6 = escapeString($_POST['int_det_q6']) ;
$int_det_q7 = escapeString($_POST['int_det_q7']) ;
$int_det_q8 = escapeString($_POST['int_det_q8']) ;
$int_det_q9 = escapeString($_POST['int_det_q9']) ;
$int_det_q10 = escapeString($_POST['int_det_q10']) ;
$int_det_q11 = escapeString($_POST['int_det_q11']) ;
$int_det_q12 = escapeString($_POST['int_det_q12']) ;
$int_det_q13 = escapeString($_POST['int_det_q13']) ;
$int_det_q14 = escapeString($_POST['int_det_q14']) ;
$int_det_q15 = escapeString($_POST['int_det_q15']) ;
$int_det_q16 = escapeString($_POST['int_det_q16']) ;
$int_det_interviewer = escapeString($_POST['int_det_interviewer']) ;
$int_det_int_date= escapeString($_POST['int_det_int_date']) ;
$int_det_int_pos = escapeString($_POST['int_det_int_pos']);
$int_det_status = escapeString($_POST['select_form_status']);
$int_det_verifier = escapeString($_POST['int_det_verifier']) ;
$int_det_verifier_pos = escapeString($_POST['int_det_verifier_pos']);
$int_det_approver = escapeString($_POST['int_det_approver']) ;
$int_det_approver_pos = escapeString($_POST['int_det_approver_pos']);
if ($_POST['interviewer_signature'] == $_POST['compare_signature_hidden'] || $_POST['interviewer_signature'] == '') {
$int_det_content = jsonEncodeDecode('decode', $row_page['employment_interview_details']) ;
$int_det_interviewer_con = $int_det_content['interviewer'];
if($int_det_interviewer_con != ''){
$int_det_sign = $int_det_interviewer_con['sign'] ;
$int_det_sign_date = $int_det_interviewer_con['sign_date'] ;
}else{
$int_det_sign = escapeString($_POST['interviewer_signature']) ;
$int_det_sign_date = TODAYDATE;
}
}else{
$int_det_sign = escapeString($_POST['interviewer_signature']) ;
$int_det_sign_date = TODAYDATE;
}
if ($_POST['verifier_signature'] == $_POST['compare_signature_hidden'] || $_POST['verifier_signature'] =='') {
$int_det_content = jsonEncodeDecode('decode', $row_page['employment_interview_details']) ;
$int_det_verifier_con = $int_det_content['verifier'];
if($int_det_verifier_con != ''){
$int_det_sign_verify = $int_det_verifier_con['verify_sign'] ;
$int_det_sign_verify_date = $int_det_verifier_con['verify_sign_date'] ;
}else{
$int_det_sign_verify = escapeString($_POST['verifier_signature']) ;
$int_det_sign_verify_date = TODAYDATE;
}
}else{
$int_det_sign_verify = escapeString($_POST['verifier_signature']) ;
$int_det_sign_verify_date = TODAYDATE;
}
if ($_POST['approver_signature'] == $_POST['compare_signature_hidden'] || $_POST['approver_signature']=='') {
$int_det_content = jsonEncodeDecode('decode', $row_page['employment_interview_details']) ;
$int_det_approver_con = $int_det_content['approver'];
if($int_det_approver_con != ''){
$int_det_sign_approve = $int_det_approver_con['approve_sign'] ;
$int_det_sign_approve_date = $int_det_approver_con['approve_sign_date'] ;
}else{
$int_det_sign_approve = escapeString($_POST['approver_signature']) ;
$int_det_sign_approve_date = TODAYDATE;
}
}else{
$int_det_sign_approve = escapeString($_POST['approver_signature']) ;
$int_det_sign_approve_date = TODAYDATE;
}
$array_int_det = array('question' => array(
'q1' => $int_det_q1,
'q2' => $int_det_q2,
'q3' => $int_det_q3,
'q4' => $int_det_q4,
'q5' => $int_det_q5,
'q6' => $int_det_q6,
'q7' => $int_det_q7,
'q8' => $int_det_q8,
'q9' => $int_det_q9,
'q10' => $int_det_q10,
'q11' => $int_det_q11,
'q12' => $int_det_q12,
'q13' => $int_det_q13,
'q14' => $int_det_q14,
'q15' => $int_det_q15,
'q16' => $int_det_q16),
'interviewer' => array(
'name' => $int_det_interviewer,
'int_date' => $int_det_int_date,
'int_position' => $int_det_int_pos,
'sign' => $int_det_sign,
'sign_date' => $int_det_sign_date),
'verifier' => array(
'verify_name' => $int_det_verifier ,
'verify_position' => $int_det_verifier_pos,
'verify_sign' => $int_det_sign_verify,
'verify_sign_date' => $int_det_sign_verify_date),
'approver' => array(
'approve_name' => $int_det_approver,
'approve_position' => $int_det_approver_pos,
'approve_sign' => $int_det_sign_approve,
'approve_sign_date' => $int_det_sign_approve_date),
'status' => $int_det_status
) ;
$array_int_det = jsonEncodeDecode('encode', $array_int_det) ;
// print_r($array_int_det);exit;
$old_record = '';
$mysqli_record = $mysqli->query("select employment_interview_details from staff_employment where employment_id = '".$page."' limit 1");
if ($mysqli_record->num_rows > 0 ){
$old_record = $mysqli_record->fetch_array(MYSQLI_ASSOC)['employment_interview_details'];
}else{
$old_record = '-';
}
$record = array(
"old_record" => $old_record,
"new_record" => $array_int_det,
);
$record = jsonEncodeDecode('encode', $record) ;
if($mysqli->query("UPDATE staff_employment SET employment_interview_details = '".$array_int_det."' WHERE employment_id = '".$page."'")){
$descrition = $_SESSION['system_name'].'(username) update the employment interview details';
$mysqli->query("INSERT INTO system_log_employment (log_table, log_action, log_page_id, log_page_name, log_user_id, log_description, log_record, log_date) VALUES
('employment', 'update-interview_det', '200', 'AF-".$page."', '".$_SESSION["system_id"]."', '".$descrition."', '".$record."', NOW())");
}
// refresh page
header("Location:?page_mode=edit_interview_det&page=".$page."&success=1&select_worker=Local") ;
exit ;
}
// start header here
include 'requires/page_header.php' ;
if ( $hide_title == false ){
include 'requires/page_top.php' ;
}
$user_profile = jsonEncodeDecode('decode', $row_page['employment_file']) ;
$int_det_content = jsonEncodeDecode('decode', $row_page['employment_interview_details']) ;
$int_det_question_con = $int_det_content['question'];
$int_det_interviewer_con = $int_det_content['interviewer'];
$int_det_verifier_con = $int_det_content['verifier'];
$int_det_approver_con = $int_det_content['approver'];
$int_det_status_con = $int_det_content['status'];
if ( $hide_title == true && $_GET['success'] == '1' ){
echo '
<script>
$(document).ready(function(){
alert("Thank you, you data has been submited.") ;
}) ;
</script>' ;
}
?>
<div class="warper container-fluid">
<div class="row">
<div class="col-md-12" style="position:inherit;">
<?php if ( $hide_title == false ){ ?><div class="page-header"><h1><?= $lang['Employment Interview Details']?> <small><h1><?= $lang['edit']?></small></h1></div><?php } ?>
<div class="panel panel-default">
<div class="panel-heading"></div>
<div class="panel-body">
<form method="post" class="form-horizontal" id="quotationForm" enctype="multipart/form-data" action="?page_mode=edit_interview_det&page=<?= $page ?>&type=edit_int_det&select_worker=Local" novalidate="novalidate">
<table border="0" cellpadding="0" cellspacing="0" class="employment_table" style="max-width:960px; width:100%;padding:0; margin:0 auto;">
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Picture:</td>
<td colspan="2" style="padding:5px; text-transform: uppercase;">
<img src="<?= ($user_profile['file'] != '' ? $user_profile['path'].$user_profile['file'] : 'images/user_profile.png') ?>" style="width:150px;" /></td>
<td width="400px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Name:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;"><?= $row_page['employment_name'] ?></td>
<td width="400px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Designation:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;">
<?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_id = '".$row_page['employment_position']."' LIMIT 1" ;
$mysqli_position = $mysqli->query($mysqli_query) ;
if ($mysqli_position->num_rows > 0){
while($row_position = $mysqli_position->fetch_array(MYSQLI_ASSOC)){
echo $row_position['job_position_desc'];
}
}
?>
</td>
<td width="400px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Department:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;">
<?php
$mysqli_query = "SELECT a.department_id, b.department_desc FROM setting_department a
LEFT JOIN setting_department_translation b ON ( a.department_id = b.department_id )
WHERE a.deleted_at IS NULL AND b.lang = 'en' AND a.department_id = '".$row_page['employment_department']."' LIMIT 1" ;
$mysqli_department = $mysqli->query($mysqli_query) ;
if ($mysqli_department->num_rows > 0){
while($row_department = $mysqli_department->fetch_array(MYSQLI_ASSOC)){
echo $row_department['department_desc'];
}
}
?>
</td>
<td width="400px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" class="employment_table" style="max-width:960px; width:100%;padding:0; margin:0 auto;">
<tr>
<td colspan="2">Attritube:</td>
</tr>
<tr>
<td width="400px">1. Appearance (professional dress, grooming)</td>
<td>
<label><input type="radio" name="int_det_q1" value="Excellent" required="required" <?= ($int_det_question_con['q1'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q1" value="Very Good" <?= ($int_det_question_con['q1'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q1" value="Good" required="required" <?= ($int_det_question_con['q1'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q1" value="Poor" <?= ($int_det_question_con['q1'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">2. Poise, self-confidence, 1st impression</td>
<td>
<label><input type="radio" name="int_det_q2" value="Excellent" required="required" <?= ($int_det_question_con['q2'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q2" value="Very Good" <?= ($int_det_question_con['q2'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q2" value="Good" required="required" <?= ($int_det_question_con['q2'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q2" value="Poor" <?= ($int_det_question_con['q2'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">3. Verbal communication skills (articulate, clear)</td>
<td>
<label><input type="radio" name="int_det_q3" value="Excellent" required="required" <?= ($int_det_question_con['q3'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q3" value="Very Good" <?= ($int_det_question_con['q3'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q3" value="Good" required="required" <?= ($int_det_question_con['q3'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q3" value="Poor" <?= ($int_det_question_con['q3'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">4. Listening ability and non-verbal communication</td>
<td>
<label><input type="radio" name="int_det_q4" value="Excellent" required="required" <?= ($int_det_question_con['q4'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q4" value="Very Good" <?= ($int_det_question_con['q4'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q4" value="Good" required="required" <?= ($int_det_question_con['q4'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q4" value="Poor" <?= ($int_det_question_con['q4'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">5. Clarity of career interests and goals</td>
<td>
<label><input type="radio" name="int_det_q5" value="Excellent" required="required" <?= ($int_det_question_con['q5'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q5" value="Very Good" <?= ($int_det_question_con['q5'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q5" value="Good" required="required" <?= ($int_det_question_con['q5'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q5" value="Poor" <?= ($int_det_question_con['q5'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">6. Ability to link prior work experience to position</td>
<td>
<label><input type="radio" name="int_det_q6" value="Excellent" required="required" <?= ($int_det_question_con['q6'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q6" value="Very Good" <?= ($int_det_question_con['q6'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q6" value="Good" required="required" <?= ($int_det_question_con['q6'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q6" value="Poor" <?= ($int_det_question_con['q6'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">7. Knowledge of industry</td>
<td>
<label><input type="radio" name="int_det_q7" value="Excellent" required="required" <?= ($int_det_question_con['q7'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q7" value="Very Good" <?= ($int_det_question_con['q7'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q7" value="Good" required="required" <?= ($int_det_question_con['q7'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q7" value="Poor" <?= ($int_det_question_con['q7'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">8. Preparation for interview</td>
<td>
<label><input type="radio" name="int_det_q8" value="Excellent" required="required" <?= ($int_det_question_con['q8'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q8" value="Very Good" <?= ($int_det_question_con['q8'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q8" value="Good" required="required" <?= ($int_det_question_con['q8'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q8" value="Poor" <?= ($int_det_question_con['q8'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">9. Quality of questions</td>
<td>
<label><input type="radio" name="int_det_q9" value="Excellent" required="required" <?= ($int_det_question_con['q9'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q9" value="Very Good" <?= ($int_det_question_con['q9'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q9" value="Good" required="required" <?= ($int_det_question_con['q9'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q9" value="Poor" <?= ($int_det_question_con['q9'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">10. Interest in & enthusiasm toward opportunity</td>
<td>
<label><input type="radio" name="int_det_q10" value="Excellent" required="required" <?= ($int_det_question_con['q10'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q10" value="Very Good" <?= ($int_det_question_con['q10'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q10" value="Good" required="required" <?= ($int_det_question_con['q10'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q10" value="Poor" <?= ($int_det_question_con['q10'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">11. Strength of competence / skills for position / work</td>
<td>
<label><input type="radio" name="int_det_q11" value="Excellent" required="required" <?= ($int_det_question_con['q11'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q11" value="Very Good" <?= ($int_det_question_con['q11'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q11" value="Good" required="required" <?= ($int_det_question_con['q11'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q11" value="Poor" <?= ($int_det_question_con['q11'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">12. Overall impression of candidates performance</td>
<td>
<label><input type="radio" name="int_det_q12" value="Excellent" required="required" <?= ($int_det_question_con['q12'] == 'Excellent' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Excellent']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q12" value="Very Good" <?= ($int_det_question_con['q12'] == 'Very Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Very Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q12" value="Good" required="required" <?= ($int_det_question_con['q12'] == 'Good' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Good']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q12" value="Poor" <?= ($int_det_question_con['q12'] == 'Poor' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Poor']?></label>
</td>
</tr>
<tr>
<td width="400px">13. Recommended pay</td>
<td>
<input type="number" name="int_det_q13" value="<?= ($int_det_question_con['q13']!='' ? $int_det_question_con['q13'] : '')?>" required="required" style="width:400px;" />
</td>
</tr>
<tr>
<td width="400px">14. Probationary Period months</td>
<td>
<label><input type="radio" name="int_det_q14" value="3 months" required="required" <?= ($int_det_question_con['q14'] == '3 months' ? 'checked' : '') ?>/>&nbsp;<?= $lang['3 months']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q14" value="6 months" <?= ($int_det_question_con['q14'] == '6 months' ? 'checked' : '') ?>/>&nbsp;<?= $lang['6 months']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q14" value="12 months" required="required" <?= ($int_det_question_con['q14'] == '12 months' ? 'checked' : '') ?>/>&nbsp;<?= $lang['12 months']?></label>
</td>
</tr>
<tr>
<td width="400px">15. Result</td>
<td>
<label><input type="radio" name="int_det_q15" value="Suitable" required="required" <?= ($int_det_question_con['q15'] == 'Suitable' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Suitable']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q15" value="Not Suitable" <?= ($int_det_question_con['q15'] == 'Not Suitable' ? 'checked' : '') ?>/>&nbsp;<?= $lang['Not Suitable']?></label>
<label class="margin_left_10"><input type="radio" name="int_det_q15" value="future" required="required" <?= ($int_det_question_con['q15'] == 'future' ? 'checked' : '') ?>/>&nbsp;<?= $lang['To be considered for future assignments']?></label>
</td>
</tr>
<tr>
<td width="400px" style="vertical-align: top;">16. Recommendations / high lights of the interview</td>
<td>
<textarea name="int_det_q16" style="width:400px;height: 60px;" required="required"><?= ($int_det_question_con['q16']!='' ? $int_det_question_con['q16'] : '') ?></textarea>
</td>
</tr>
</table>
<td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="employment_table" style="max-width:960px; width:100%;padding:0; margin:0 auto;">
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" style="max-width:960px; width:100%;font-size:14px;">
<tr>
<td>Form Status</td>
<td>:</td>
<td style="text-transform: uppercase;">
<select name="select_form_status" required="required">
<option value=''><?= $lang['select'] ?></option>
<option value="Interview" <?= $int_det_status_con == 'Interview' ? 'selected' : '' ?> <?= $int_det_status_con == 'Interview' || $int_det_status_con == '' ? '' : 'class="display_none"' ?> >Interview</option>
<option value="Verify" <?= $int_det_status_con == 'Verify' ? 'selected' : '' ?> <?= $int_det_status_con == 'Interview' || $int_det_status_con == 'Verify' ? '' : 'class="display_none"' ?> >Verify</option>
<option value="Approve" <?= $int_det_status_con == 'Approve' ? 'selected' : '' ?> <?= $int_det_status_con == 'Verify' || $int_det_status_con == 'Approve' ? '' : 'class="display_none"' ?> >Approve</option>
</select>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td><?= $lang['Interview date time']?></td>
<td>:</td>
<td><input type="text" name="int_det_int_date" class="datetimepicker_with_time" value="<?= $int_det_interviewer_con['int_date'] ?>" required="required"/></td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td width="150px"><?= $lang['Interview by']?></td>
<td width="15px">:</td>
<td width="305px">
<?php
$mysqli_query = "SELECT * FROM system_user
WHERE user_is_interview_by = 'yes' AND user_trash = '0' ORDER BY user_name" ;
$mysqli_user = $mysqli->query($mysqli_query) ;
if ($mysqli_user->num_rows > 0){
echo '
<select name="int_det_interviewer" required="required">
<option value="">Select</option>' ;
while ($row_user = $mysqli_user->fetch_array(MYSQLI_ASSOC)){
echo '
<option value="'.$row_user['user_id'].'" '.($row_user['user_id'] == $int_det_interviewer_con['name'] ? 'selected' : '').'>'.dataFilter($row_user['user_name']).'</option>' ;
}
echo '
</select>' ;
}
?>
</td>
<td width="140px">&nbsp;</td>
<td width="350px" >&nbsp;</td>
</tr>
<tr>
<td><?= $lang['Interviewers Position']?></td>
<td>:</td>
<td><input type="text" name="int_det_int_pos" value="<?= $int_det_interviewer_con['int_position'] ?>" required="required"/></td>
<td colspan="2">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
<?php if($int_det_interviewer_con['sign'] != ''){ ?>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" style="max-width:960px; width:100%;font-size:14px;">
<tr>
<td width="350px" style="border-bottom:1px solid #000;"><img src="<?= $int_det_interviewer_con['sign'] ?>" /></td>
<td width="260px">&nbsp;</td>
<td width="350px" style="border-bottom:1px solid #000; vertical-align:bottom; text-align:center;"><?= ($int_det_interviewer_con['sign_date'] != '' && $int_det_interviewer_con['sign_date'] != '0000-00-00 00:00:00' ? date('d/m/Y', strtotime($int_det_interviewer_con['sign_date'])) : '' ) ?><br /></td>
</tr>
<tr>
<td style="padding:8px;text-align:center;"><?= $lang['Interviewers signature']?></td>
<td>&nbsp;</td>
<td style="padding:8px;text-align:center;"><?= $lang['date']?></td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
<?php } ?>
<?php if ($int_det_status_con == 'Verify' || $int_det_status_con == 'Approve'){ ?>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" style="max-width:960px; width:100%;font-size:14px;">
<tr>
<td width="150px"><?= $lang['Verify by']?></td>
<td width="15px">:</td>
<td width="305px">
<?php
$mysqli_query = "SELECT * FROM system_user
WHERE user_is_interview_by = 'yes' AND user_trash = '0' ORDER BY user_name" ;
$mysqli_user = $mysqli->query($mysqli_query) ;
if ($mysqli_user->num_rows > 0){
echo '
<select name="int_det_verifier" required="required">
<option value="">Select</option>' ;
while ($row_user = $mysqli_user->fetch_array(MYSQLI_ASSOC)){
echo '
<option value="'.$row_user['user_id'].'" '.($row_user['user_id'] == $int_det_verifier_con['verify_name'] ? 'selected' : '').'>'.dataFilter($row_user['user_name']).'</option>' ;
}
echo '
</select>' ;
}
?>
</td>
<td width="140px">&nbsp;</td>
<td width="350px" >&nbsp;</td>
</tr>
<tr>
<td><?= $lang['Verifiers Position']?></td>
<td>:</td>
<td><input type="text" name="int_det_verifier_pos" value="<?= $int_det_verifier_con['verify_position'] ?>" required="required"/></td>
<td colspan="2">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
<?php } ?>
<?php if($int_det_verifier_con['verify_sign'] != ''){ ?>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" style="max-width:960px; width:100%;font-size:14px;">
<tr>
<td width="350px" style="border-bottom:1px solid #000;"><img src="<?= $int_det_verifier_con['verify_sign'] ?>" /></td>
<td width="260px">&nbsp;</td>
<td width="350px" style="border-bottom:1px solid #000; vertical-align:bottom; text-align:center;"><?= ($int_det_verifier_con['verify_sign_date'] != '' && $int_det_verifier_con['verify_sign_date'] != '0000-00-00 00:00:00' ? date('d/m/Y', strtotime($int_det_verifier_con['verify_sign_date'])) : '' ) ?><br /></td>
</tr>
<tr>
<td style="padding:8px;text-align:center;"><?= $lang['Verifiers signature']?></td>
<td>&nbsp;</td>
<td style="padding:8px;text-align:center;"><?= $lang['date']?></td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
<?php } ?>
<?php if ($int_det_status_con == 'Approve'){ ?>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" style="max-width:960px; width:100%;font-size:14px;">
<tr>
<td width="150px"><?= $lang['Approve by']?></td>
<td width="15px">:</td>
<td width="305px">
<?php
$mysqli_query = "SELECT * FROM system_user
WHERE user_is_interview_by = 'yes' AND user_trash = '0' ORDER BY user_name" ;
$mysqli_user = $mysqli->query($mysqli_query) ;
if ($mysqli_user->num_rows > 0){
echo '
<select name="int_det_approver" required="required">
<option value="">Select</option>' ;
while ($row_user = $mysqli_user->fetch_array(MYSQLI_ASSOC)){
echo '
<option value="'.$row_user['user_id'].'" '.($row_user['user_id'] == $int_det_approver_con['approve_name'] ? 'selected' : '').'>'.dataFilter($row_user['user_name']).'</option>' ;
}
echo '
</select>' ;
}
?>
</td>
<td width="140px">&nbsp;</td>
<td width="350px" >&nbsp;</td>
</tr>
<tr>
<td><?= $lang['Approvers Position']?></td>
<td>:</td>
<td><input type="text" name="int_det_approver_pos" value="<?= $int_det_approver_con['approve_position'] ?>" required="required"/></td>
<td colspan="2">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
<?php } ?>
<?php if($int_det_approver_con['approve_sign'] != ''){ ?>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" style="max-width:960px; width:100%;font-size:14px;">
<tr>
<td width="350px" style="border-bottom:1px solid #000;"><img src="<?= $int_det_approver_con['approve_sign'] ?>" /></td>
<td width="260px">&nbsp;</td>
<td width="350px" style="border-bottom:1px solid #000; vertical-align:bottom; text-align:center;"><?= ($int_det_approver_con['approve_sign_date'] != '' && $int_det_approver_con['approve_sign_date'] != '0000-00-00 00:00:00' ? date('d/m/Y', strtotime($int_det_approver_con['approve_sign_date'])) : '' ) ?><br /></td>
</tr>
<tr>
<td style="padding:8px;text-align:center;"><?= $lang['Approvers signature']?></td>
<td>&nbsp;</td>
<td style="padding:8px;text-align:center;"><?= $lang['date']?></td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
<?php } ?>
<tr>
<td colspan="4">
<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>
<?php
if($int_det_status_con == '' || $int_det_status_con == 'Interview'){
echo '
<input type="hidden" name="interviewer_signature" id="signature_pad" required="required" />';
}else if ($int_det_status_con == 'Verify') {
echo '
<input type="hidden" name="verifier_signature" id="signature_pad" required="required" />';
}else if ($int_det_status_con == 'Approve') {
echo '
<input type="hidden" name="approver_signature" id="signature_pad" required="required" />';
}
?>
<input type="hidden" name="compare_signature_hidden" id="signature_pad_hidden" required="required" />
</div>
</div>
<div style="width:260px; float:left;">&nbsp;</div>
<div style="width:350px; float:left;">&nbsp;</div>
</div>
</td>
</tr>
<tr><td colspan="4" style="border-bottom:1px solid #000;">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="4">
<?php
if($row_page['employment_status'] != 'Terminate' &&
$row_page['employment_status'] != 'Reject'){
echo '
<button type="submit" class="btn btn-purple" style="float:right">'.$lang['submit'].'</button>
<input type="hidden" name="int_det" value="edit" />
<input type="hidden" name="hide" value="1">
<input type="hidden" name="hide_select_worker" value="Local">
';
}
?>
</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
</table>
</form>
<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>
</div>
</div>
</div>
</div>

498
HR/hr-local-edit-status.php Normal file
View File

@ -0,0 +1,498 @@
<?php
$active_sub_menu = 'hr-employment' ;
switch($employment_status){
case 'Pending' :
$active_menu = 'hr-letter-pending' ;
break ;
case 'Processing' :
$active_menu = 'hr-letter-processing' ;
break ;
case 'Processing Confirmed' :
$active_menu = 'hr-letter-processing-manager-approved' ;
break ;
case 'Processing Rejected' :
$active_menu = 'hr-letter-processing-manager-rejected' ;
break ;
case 'Processing Interview Slot' :
$active_menu = 'hr-letter-processing-interview-slot' ;
break ;
case 'Interview' :
$active_menu = 'hr-letter-interview' ;
break ;
case 'Reschedule' :
$active_menu = 'hr-letter-reschedule' ;
break ;
case 'Keep In View' :
$active_menu = 'hr-letter-kiv' ;
break ;
case 'Offer' :
$active_menu = 'hr-letter-offer' ;
break ;
case 'Confirmation' :
$active_menu = 'hr-letter-confirmation' ;
break ;
case 'Reject' :
$active_menu = 'hr-letter-reject' ;
break ;
case 'Terminate' :
$active_menu = 'hr-letter-terminate' ;
break ;
}
// update database
if (isset($type) && $type == 'edit_status' && $_POST['hide'] == 1 && $_POST['hide_select_worker'] == 'Local'){
//employment_status_change
$employment_status_change = escapeString($_POST['employment_status_change']) ;
if ( $employment_status_change == 'Processing' ){
$employment_incharge_staff_id = escapeString($_POST['employment_incharge_staff_id']) ;
if ( $employment_incharge_staff_id != '' ){
if($mysqli->query("UPDATE staff_employment SET employment_status = '".$employment_status_change."', employment_incharge_staff_id = '".$employment_incharge_staff_id."' WHERE employment_id = '".$page."'")){
$descrition = $_SESSION['system_name'].'(username) update status to Processing and waiting manager to confirm or reject.' ;
$mysqli->query("INSERT INTO system_log_employment (log_table, log_action, log_page_id, log_page_name, log_user_id, log_description, log_record, log_date) VALUES
('employment', 'update-status', '200', 'AF-".$page."', '".$_SESSION["system_id"]."', '".$descrition."', '".$record."', NOW())");
if ( $row_page['employment_incharge_staff_id'] != $employment_incharge_staff_id ){
pushToUserCron( 'staff_employment', $page, $employment_incharge_staff_id, 'Recruitment', 'New hires ( '.$row_page['employment_name'].' ) need your confirmation or rejection' ) ;
}
}
}
}elseif( $employment_status_change == 'Interview' && ($_POST['employment_interview_date'] != '' || $_POST['email_to_cand_adm'] != '' )){
$employment_interview_date = escapeString($_POST['employment_interview_date']) ;
$employment_email_to_cand_adm = escapeString($_POST['email_to_cand_adm']) ;
if( $employment_interview_date !='' && $employment_email_to_cand_adm != '' ){
$query_email = "employment_interview_email = '".$employment_email_to_cand_adm."', ";
}
if($mysqli->query("UPDATE staff_employment SET ".$query_email." employment_status = '".$employment_status_change."', employment_interview_date = '".$employment_interview_date."' WHERE employment_id = '".$page."'")){
$descrition = $_SESSION['system_name'].'(username) update status to Interview and update the interview details. ' ;
if ($query_email != '') {
$descrition .= 'Interview emails is sent ('.TODAYDATE.')';
}
$mysqli->query("INSERT INTO system_log_employment (log_table, log_action, log_page_id, log_page_name, log_user_id, log_description, log_record, log_date) VALUES
('employment', 'update-status', '200', 'AF-".$page."', '".$_SESSION["system_id"]."', '".$descrition."', '".$record."', NOW())");
}
}elseif( $employment_status_change == 'Reschedule' && ($_POST['employment_r_interview_date'] != '' || $_POST['r_email_to_cand_adm'] != '' )){
$employment_r_interview_date = escapeString($_POST['employment_r_interview_date']) ;
$employment_r_email_to_cand_adm = escapeString($_POST['r_email_to_cand_adm']) ;
$employment_r_update_interview = escapeString($_POST['r_update_interview']);
if( $employment_r_interview_date !='' && $employment_r_email_to_cand_adm !=''){
$query_r_email = "employment_r_interview_email = '".$employment_r_email_to_cand_adm."', ";
}
if($employment_r_update_interview == '' ){
if($mysqli->query("UPDATE staff_employment SET ".$query_r_email." employment_status = '".$employment_status_change."', employment_r_interview_date = '".$employment_r_interview_date."' WHERE employment_id = '".$page."'")){
$descrition = $_SESSION['system_name'].'(username) update status to Reschedule and update the reschedule details. ' ;
if ($query_r_email != '') {
$descrition .= 'Reschedule emails is sent ('.TODAYDATE.')';
}
$mysqli->query("INSERT INTO system_log_employment (log_table, log_action, log_page_id, log_page_name, log_user_id, log_description, log_record, log_date) VALUES
('employment', 'update-status', '200', 'AF-".$page."', '".$_SESSION["system_id"]."', '".$descrition."', '".$record."', NOW())");
}
}elseif($employment_r_update_interview !=''){
if($mysqli->query("UPDATE staff_employment SET ".$query_r_email." employment_status = 'Interview', employment_interview_date = '".$employment_r_interview_date."', employment_r_interview_date = '0000-00-00 00:00:00', employment_r_candidate = '' WHERE employment_id = '".$page."'")){
$descrition = $_SESSION['system_name'].'(username) update status to Interview and update the interview details. ' ;
if ($query_r_email != '') {
$descrition .= 'Reschedule emails is sent ('.TODAYDATE.')';
}
$mysqli->query("INSERT INTO system_log_employment (log_table, log_action, log_page_id, log_page_name, log_user_id, log_description, log_record, log_date) VALUES
('employment', 'update-status', '200', 'AF-".$page."', '".$_SESSION["system_id"]."', '".$descrition."', '".$record."', NOW())");
}
}
}else{
$temp_employment_tier = [] ;
foreach ( $_POST['employment_tier'] as $kemploymenttier => $vemploymenttier ){
$temp_employment_tier[] = escapeString($vemploymenttier) ;
}
$employment_tier = implode(',', $temp_employment_tier) ;
if($mysqli->query( "UPDATE staff_employment SET
employment_status = '".$employment_status_change."',
employment_tier = '".$employment_tier."'
WHERE employment_id = '".$page."'" )){
$descrition = $_SESSION['system_name'].'(username) update the employment status to '.$employment_status_change ;
$mysqli->query("INSERT INTO system_log_employment (log_table, log_action, log_page_id, log_page_name, log_user_id, log_description, log_record, log_date) VALUES
('employment', 'update-status', '200', 'AF-".$page."', '".$_SESSION["system_id"]."', '".$descrition."', '".$record."', NOW())");
}
}
if($_POST['employment_interview_date'] != '' && $_POST['email_to_cand_adm'] != ''){
$extra_itv_link = '';
if ($_POST['email_itv_hod'] == 1 && $_POST['email_itv_to_hod'] != '') {
$email_itv_to_hod = base64_encode($_POST['email_itv_to_hod']);
$extra_itv_link .= '&hod='.$email_itv_to_hod;
}
if ($_POST['email_itv_attach'] == 1) {
$email_itv_attach = base64_encode($row_page['employment_resume']);
$extra_itv_link .= '&attach='.$email_itv_attach;
}
header("Location:?page_mode=sent_email&mail_type=interview".$extra_itv_link."&page=".$page);
exit;
}else if($_POST['employment_r_interview_date'] != '' && $_POST['r_email_to_cand_adm'] != ''){
$extra_rsd_link = '';
if ($_POST['email_rsd_hod'] == 1 && $_POST['email_rsd_to_hod'] != '') {
$email_rsd_to_hod = base64_encode($_POST['email_rsd_to_hod']);
$extra_rsd_link .= '&hod='.$email_rsd_to_hod;
}
if ($_POST['email_rsd_attach'] == 1) {
$email_rsd_attach = base64_encode($row_page['employment_resume']);
$extra_rsd_link .= '&attach='.$email_rsd_attach;
}
header("Location:?page_mode=sent_email&mail_type=reschedule".$extra_rsd_link."&page=".$page);
exit;
}else if( $_POST['employment_status_change'] == 'Reject' && $_POST['employment_status_change'] != $row_page['employment_status'] ){
$extra_rsd_link = '';
header("Location:?page_mode=sent_email&mail_type=reject".$extra_rsd_link."&page=".$page) ;
exit;
}
// refresh page
header("Location:?page_mode=edit_status&page=".$page."&success=1&select_worker=Local") ;
exit ;
}
// start header here
include 'requires/page_header.php' ;
if ( $hide_title == false ){
include 'requires/page_top.php' ;
}
$user_profile = jsonEncodeDecode('decode', $row_page['employment_file']) ;
if ( $hide_title == true && $_GET['success'] == '1' ){
echo '
<script>
$(document).ready(function(){
alert("Thank you, you data has been submited.") ;
}) ;
</script>' ;
}
?>
<div class="warper container-fluid">
<div class='container' style="background-color: white; border-radius: 10px;">
<div class="row">
<div class="col-md-12" style="position:inherit;">
<?php if ( $hide_title == false ){ ?> <div class="page-header" style="margin: 30px 0px 0px 0px;padding: 0px;"><h1><?= $lang['Employment Status']?> <small><h1><?= $lang['edit']?></small></h1></div><?php } ?>
<div class="panel panel-default">
<div class="panel-heading"></div>
<div class="panel-body">
<form method="post" class="form-horizontal" id="quotationForm" enctype="multipart/form-data" action="?page_mode=edit_status&page=<?= $page ?>&type=edit_status&select_worker=Local" novalidate="novalidate">
<table border="0" cellpadding="0" cellspacing="0" class="employment_table" style="max-width:960px; width:100%;padding:0; margin:0 auto;">
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Picture:</td>
<td colspan="2" style="padding:5px; text-transform: uppercase;">
<img src="<?= ($user_profile['file'] != '' ? $user_profile['path'].$user_profile['file'] : 'images/user_profile.png') ?>" style="width:150px;" /></td>
<td width="200px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Name:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;"><?= $row_page['employment_name'] ?></td>
<td width="200px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Designation:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;">
<?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_id = '".$row_page['employment_position']."' LIMIT 1" ;
$mysqli_position = $mysqli->query($mysqli_query) ;
if ($mysqli_position->num_rows > 0){
while($row_position = $mysqli_position->fetch_array(MYSQLI_ASSOC)){
echo $row_position['job_position_desc'];
}
}
?>
</td>
<td width="200px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Department:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;">
<?php
$mysqli_query = "SELECT a.department_id, b.department_desc FROM setting_department a
LEFT JOIN setting_department_translation b ON ( a.department_id = b.department_id )
WHERE a.deleted_at IS NULL AND b.lang = 'en' AND a.department_id = '".$row_page['employment_department']."' LIMIT 1" ;
$mysqli_department = $mysqli->query($mysqli_query) ;
if ($mysqli_department->num_rows > 0){
while($row_department = $mysqli_department->fetch_array(MYSQLI_ASSOC)){
echo $row_department['department_desc'];
}
}
?>
</td>
<td width="200px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Branch:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;">
<?php
$mysqli_query = "SELECT branch_name FROM branch WHERE deleted_at IS NULL AND branch_id = '".$row_page['employment_branch']."' LIMIT 1" ;
$mysqli_branch = $mysqli->query($mysqli_query) ;
if ($mysqli_branch->num_rows > 0){
while($row_branch = $mysqli_branch->fetch_array(MYSQLI_ASSOC)){
echo $row_branch['branch_name'];
}
}
?>
</td>
<td width="200px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Sex:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;"><?= $row_page['employment_sex'] ?></td>
<td width="200px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Race:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;"><?= $row_page['employment_race'] ?></td>
<td width="200px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Nationality:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;"><?= $row_page['employment_nationality'] ?></td>
<td width="200px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Mobile Phone:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;"><?= $row_page['employment_mobile'] ?></td>
<td width="200px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Status:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;">
<select name="employment_status_change" class="employment_status_change" required="required" style="border:0px; padding:0px; margin: 0px;">
<option value=""><?= $lang['select'] ?></option>
<?php foreach ( [ 'Pending', 'Processing', 'Processing Confirmed', 'Processing Rejected', 'Processing Interview Slot', 'Interview', 'Reschedule', 'Keep In View', 'Offer', 'Confirmation', 'Terminate', 'Reject' ] as $kstatus => $vstatus ){ ?>
<option value="<?= $vstatus ?>" <?= ( $row_page['employment_status'] == $vstatus ? 'selected' : '' ) ?> ><?= $vstatus ?></option>
<?php } ?>
</select>
</td>
<td width="200px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<?php if ( $row_page['employment_status'] == 'Offer' ||
$row_page['employment_status'] == 'Confirmation' ||
$row_page['employment_status'] == 'Terminate' ||
$row_page['employment_status'] == 'Reject' ){ ?>
<tr>
<td colspan="1" style="width:120px;"><?= $lang['Tier'] ?>:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;">
<select name="employment_tier[]" id="user_tier" multiple class="chosen-select select2-basic-single form-control group_2" style="border:0px; padding:0px; margin: 0px;">
<?php foreach( $tier_list as $k => $v ){ $tier_id = '|'.$v['tier_id'].'|' ; ?>
<option value="<?= $tier_id ?>" <?= ( strpos($row_page['employment_tier'], $tier_id) !== false ? 'selected' : '' ) ?> ><?= $v['title'] ?></option>
<?php } ?>
</select>
</td>
<td width="200px">&nbsp;</td>
</tr>
<?php } ?>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="1" style="width:120px;">Manager:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;">
<select name="employment_incharge_staff_id" class="employment_incharge_staff_id" required="required" style="border:0px; padding:0px; margin: 0px;">
<option value=""><?= $lang['select'] ?></option>
<?php
$mysqli_inchargestaff = $mysqli->query( "SELECT staff_id, staff_idno, staff_name FROM staff
WHERE deleted_at IS NULL AND ( staff_date_resigned IS NULL || staff_date_resigned = '0000-00-00' || staff_date_resigned >= '".TODAYDATE."' ) AND staff_settings LIKE '%\"checkrecruitment\":\"yes\"%'" . $user_branch_permission_sql ) ;
if ( $mysqli_inchargestaff->num_rows > 0 ){
while ( $row_inchargestaff = $mysqli_inchargestaff->fetch_array() ){
echo '<option value="'.$row_inchargestaff['staff_id'].'" '.( $row_page['employment_incharge_staff_id'] == $row_inchargestaff['staff_id'] ? 'selected' : '' ).' >'.$row_inchargestaff['staff_name'].' ( '.$row_inchargestaff['staff_idno'].' )</option>' ;
}
}
?>
</select>
</td>
<td width="200px">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr class="interview_content">
<td colspan="1" style="width:120px;">Interview Date:</td>
<td colspan="2"><input name="employment_interview_date" type="text" class="datetimepicker_with_time_employ" style="border:1px solid black" value="<?= (($row_page['employment_interview_date'] != '' && $row_page['employment_interview_date'] != '0000-00-00 00:00:00') ? date('Y-m-d H:i', strtotime($row_page['employment_interview_date'])) : '') ?>"/></td>
<td width="200px">&nbsp;</td>
</tr>
<tr class="interview_content"><td colspan="4">&nbsp;</td></tr>
<tr class="interview_content">
<td colspan="3">
<label style="width:100%;">
<input type="checkbox" name="email_to_cand_adm" value="1" /> Send Emails to Candidate and Admin <?= ($row_page['employment_interview_email'] == '1' ? '<span style="color:red">(Interview emails had sent before)</span>' : '') ?>
</label>
</td>
</tr>
<tr class="interview_content"><td colspan="4">&nbsp;</td></tr>
<tr class="interview_content">
<td colspan="3" style="width:120px;">
<label>
<input type="checkbox" name="email_itv_hod" value="1" /> Send Email To Others: <br>
<input type="text" name="email_itv_to_hod" placeholder="Enter Emails Here: ( 1@email.com, 2@email.com )" />
</label>
</td>
</tr>
<tr class="interview_content"><td colspan="4">&nbsp;</td></tr>
<tr class="interview_content">
<td colspan="3" style="width:120px;">
<label><input type="checkbox" name="email_itv_attach" value="1" /> Attached Candidate's Resume</label>
</td>
</tr>
<tr class="interview_content"><td colspan="4">&nbsp;</td></tr>
<tr class="reschedule_content">
<td colspan="1" style="width:120px;">Original Interview Date:</td>
<td colspan="2" style="border:1px solid black; padding:5px; text-transform: uppercase;"><?= (($row_page['employment_interview_date'] != '' && $row_page['employment_interview_date'] != '0000-00-00 00:00:00') ? date('Y-m-d H:i', strtotime($row_page['employment_interview_date'])) : '') ?></td>
<td width="200px">&nbsp;</td>
</tr>
<tr class="reschedule_content"><td colspan="4">&nbsp;</td></tr>
<tr class="reschedule_content">
<td colspan="1" style="width:120px;">Rescheduled Interview Date:</td>
<td colspan="2"><input name="employment_r_interview_date" type="text" class="datetimepicker_with_time_employ" style="border:1px solid black" value="<?= (($row_page['employment_r_interview_date'] != '' && $row_page['employment_r_interview_date'] != '0000-00-00 00:00:00') ? date('Y-m-d H:i', strtotime($row_page['employment_r_interview_date'])) : '') ?>" /></td>
<td width="200px">&nbsp;</td>
</tr>
<tr class="reschedule_content"><td colspan="4">&nbsp;</td></tr>
<tr class="reschedule_content">
<td colspan="3" style="width:120px;"><input type="checkbox" name="r_email_to_cand_adm" value="1"/> Send Rescheduled Emails to Candidate and Admin <?= ($row_page['employment_r_interview_email'] == '1' ? '<span style="color:red">(Reschedule emails had sent before)</span>' : '') ?></td>
</tr>
<tr class="reschedule_content"><td colspan="4">&nbsp;</td></tr>
<tr class="reschedule_content">
<td colspan="3" style="width:120px;"><input type="checkbox" name="email_rsd_hod" value="1"/> Send Email To Others: <br><input type="text" name="email_rsd_to_hod" placeholder="Enter Emails Here: (1@email.com, 2@email.com)"/></td>
</tr>
<tr class="reschedule_content"><td colspan="4">&nbsp;</td></tr>
<tr class="reschedule_content">
<td colspan="3" style="width:120px;"><input type="checkbox" name="email_rsd_attach" value="1"/> Attached Candidate\'s Resume</td>
</tr>
<tr class="reschedule_content"><td colspan="4">&nbsp;</td></tr>
<tr class="reschedule_content">
<td colspan="3" style="width:120px;"><input type="checkbox" name="r_update_interview" value="1"/> Confirm and update status back to Interview</td>
</tr>
<tr class="reschedule_content"><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4" style="border-bottom:1px solid #000;">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td colspan="4">
<?php
if($row_page['employment_status'] != 'Terminate'){
echo '
<button type="submit" class="btn" style="color:white;background-color: #5e5bd0;float:right; margin-top: 5px;width: 100px;">'.$lang['submit'].'</button>
<input type="hidden" name="page_status" value="edit" />
<input type="hidden" name="hide" value="1">
<input type="hidden" name="hide_select_worker" value="Local">
';
}
?>
</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td colspan="4">&nbsp;</td></tr>
</table>
</form>
<table border="0" cellpadding="0" cellspacing="0" class="employment_table" style="max-width:960px; width:100%;padding:0; margin:0 auto;">
<tr><td colspan="3"><strong>Log<strong><td></tr>
<tr><td colspan="3">&nbsp;</td></tr>
<tr>
<td width="30px" style="border:1px solid black; padding:2px 5px;">No.</td>
<td style="border:1px solid black; padding:2px 5px;">Action</td>
<td width="150px" style="border:1px solid black; padding:2px 5px;">Date</td>
</tr>
<?php
$mysqli_query = "SELECT * FROM system_log_employment WHERE log_page_name = 'AF-".$page."' ORDER BY log_date DESC LIMIT 100" ;
$mysqli_log = $mysqli->query($mysqli_query) ;
if ($mysqli_log->num_rows > 0){
$count_row_log = $mysqli_log->num_rows ;
while( $row_log = $mysqli_log->fetch_array(MYSQLI_ASSOC) ){
echo '
<tr>
<td style="border:1px solid black; padding:2px 5px;">'.$count_row_log.'</td>
<td style="border:1px solid black; padding:2px 5px;">'.$row_log['log_description'].'</td>
<td style="border:1px solid black; padding:2px 5px;">'.$row_log['log_date'].'</td>
</tr>' ;
$count_row_log-- ;
}
}
?>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
var ori_status = $(".employment_status_change").val();
if (ori_status == 'Processing Interview Slot' || ori_status == 'Interview') {
$(".interview_content").show();
$(".reschedule_content").hide();
}else if(ori_status == 'Reschedule'){
$(".interview_content").hide();
$(".reschedule_content").show();
}else{
$(".interview_content").hide();
$(".reschedule_content").hide();
}
$(".employment_status_change").change(function(){
var status = $(this).val();
if (status == 'Processing Interview Slot' || status == 'Interview') {
$(".interview_content").show();
$(".reschedule_content").hide();
}else if(status == 'Reschedule'){
$(".interview_content").hide();
$(".reschedule_content").show();
}else{
$(".interview_content").hide();
$(".reschedule_content").hide();
}
});
// alert("asdas");
});
</script>

2357
HR/hr-local-edit.php Normal file

File diff suppressed because it is too large Load Diff

290
HR/hr-local-list.php Normal file
View File

@ -0,0 +1,290 @@
<?php
$boolean_terminate = ($type == 'terminate' ? true : false) ;
$boolean_reject = ($type == 'reject' ? true : false) ;
?>
<div class="warper container-fluid">
<div class='container' style="background-color: white; border-radius: 10px;">
<div class="page-header" style="margin: 30px 0px 0px 0px;padding: 0px;">
<h1><?= $lang[$select_worker] ?><?= $lang['Employment']?> (<?= $lang[$employment_status] ?>) <small><?= $lang['list']?></small></h1>
<?php
if ($_SESSION['system_result'] != ''){
switch($_SESSION['system_result']){
case 'failed-exists' :
echo '<div class="result_error">Sorry, email exists</div>' ;
break ;
}
unset($_SESSION['system_result']) ;
}
?>
</div>
<div class="panel panel-default" id="basic-table-title">
<div class="panel-heading">
<?=$lang['search']?>
</div>
<div class="panel-body">
<form method="get" class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['Name'] ?></label>
<div class="col-sm-9">
<input type="text" name="search_name" value="<?= $search_name ?>" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['IC'] ?></label>
<div class="col-sm-9">
<input type="text" name="search_ic" value="<?= $search_ic ?>" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">POSITION</label>
<div class="col-sm-9">
<?php
// page query
$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 name="search_designation" class="form-control">
<option value="">'.$lang['select'].'</option>' ;
while($row_position = $mysqli_position->fetch_array(MYSQLI_ASSOC)){
echo '
<option value="'.$row_position['job_position_id'].'" '.($search_designation == $row_position['job_position_id'] ? 'selected' : '').'>'.dataFilter($row_position['job_position_desc']).'</option>' ;
}
echo '
</select>' ;
}
?>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Qualification</label>
<div class="col-sm-9">
<select name="search_qualification" class="form-control">
<option value=""><?= $lang['select'] ?></option>
<option value="qua_below_pmr" <?= ($search_qualification == 'qua_below_pmr' ? 'selected' : '') ?>>Below PMR</option>
<option value="qua_pmr_pt3" <?= ($search_qualification == 'qua_pmr_pt3' ? 'selected' : '') ?>>PMR / PT3</option>
<option value="qua_spm" <?= ($search_qualification == 'qua_spm' ? 'selected' : '') ?>>SPM</option>
<option value="qua_certificate_skm_svm" <?= ($search_qualification == 'qua_certificate_skm_svm' ? 'selected' : '') ?>>Certificate/ SKM / SVM</option>
<option value="qua_alevel_uec" <?= ($search_qualification == 'qua_alevel_uec' ? 'selected' : '') ?>>A-Level / UEC</option>
<option value="qua_diploma" <?= ($search_qualification == 'qua_diploma' ? 'selected' : '') ?>>Diploma</option>
<option value="qua_degree" <?= ($search_qualification == 'qua_degree' ? 'selected' : '') ?>>Degree</option>
<option value="qua_master_degree" <?= ($search_qualification == 'qua_master_degree' ? 'selected' : '') ?>>Master Degree</option>
<option value="qua_phd" <?= ($search_qualification == 'qua_phd' ? 'selected' : '') ?>>PHD</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Spoken EN</label>
<div class="col-sm-9">
<select name="search_spoke_en" class="form-control">
<option value=""><?= $lang['select'] ?></option>
<option value="lsen_not_applicable" <?= ($search_spoke_en == 'lsen_not_applicable' ? 'selected' : '') ?>>Not Applicable</option>
<option value="lsen_good" <?= ($search_spoke_en == 'lsen_good' ? 'selected' : '') ?>>Good</option>
<option value="lsen_excellent" <?= ($search_spoke_en == 'lsen_excellent' ? 'selected' : '') ?>>Excellent</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Spoken BM</label>
<div class="col-sm-9">
<select name="search_spoke_bm" class="form-control">
<option value=""><?= $lang['select'] ?></option>
<option value="lsbm_not_applicable" <?= ($search_spoke_bm == 'lsbm_not_applicable' ? 'selected' : '') ?>>Not Applicable</option>
<option value="lsbm_good" <?= ($search_spoke_bm == 'lsbm_good' ? 'selected' : '') ?>>Good</option>
<option value="lsbm_excellent" <?= ($search_spoke_bm == 'lsbm_excellent' ? 'selected' : '') ?>>Excellent</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Spoken CN</label>
<div class="col-sm-9">
<select name="search_spoke_cn" class="form-control">
<option value=""><?= $lang['select'] ?></option>
<option value="lscn_not_applicable" <?= ($search_spoke_cn == 'lscn_not_applicable' ? 'selected' : '') ?>>Not Applicable</option>
<option value="lscn_good" <?= ($search_spoke_cn == 'lscn_good' ? 'selected' : '') ?>>Good</option>
<option value="lscn_excellent" <?= ($search_spoke_cn == 'lscn_excellent' ? 'selected' : '') ?>>Excellent</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['Mobile'] ?></label>
<div class="col-sm-9">
<input type="text" name="search_mobile" value="<?= $search_mobile ?>" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['email'] ?></label>
<div class="col-sm-9">
<input type="text" name="search_mail" value="<?= $search_mail ?>" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['date'] ?></label>
<div class="col-sm-9">
<input class="form-control" name="search_date" type="date" value="<?= $search_date ?>" placeholder="Date Resigned">
</div>
</div>
<div class="form-group">
<div class="col-sm-11">
<input type="hidden" name="page_mode" value="<?= $page_mode ?>" />
<input type="hidden" name="select_worker" value="<?= $select_worker ?>" />
<input type="hidden" name="type" value="<?= $type ?>" />
<input type="hidden" name="search" value="<?= $search ?>" />
<button type="submit" class="btn" style="color:white;background-color: #5e5bd0;float:right; margin-top: 5px;width: 100px;"><?= $lang['submit'] ?></button>
</div>
</div>
</form>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><?=$lang['listing']?></div>
<div class="panel-body">
<table cellpadding="0" cellspacing="0" border="0" class="listing-table responsive table table-striped table-bordered" id="basic-datatable">
<thead>
<tr>
<th><?= $lang['Name']?></th>
<th>NRIC</th>
<th>POSITION</th>
<th><?= $lang['Sex']?></th>
<th><?= $lang['Nationality']?></th>
<th><?= $lang['Mobile']?></th>
<th><?= $lang['status']?></th>
<?= ($boolean_terminate ? '' : '<th>'.$lang['Update Profile'].'</th>') ?>
<?php
if ( $type == 'processing' || $type == 'interview' || $type == 'offer' ) {
echo'<th>'.$lang['Update'].'<br>'.$lang['Interview'].'</th>';
}
?>
<th><?= $lang['Print']?> <?= $lang['Profile']?></th>
<?php
if ( $type == 'pending' || $type == 'processing' || $type == 'interview' || $type == 'reschedule' ){}else{
echo '
'.($boolean_terminate ? '' : '<th>'.$lang['Update'].'<br />'.$lang['status'].'</th>').'
<th>'.$lang['Print'].'<br />'.$lang['Letter'].'</th>' ;
}
?>
</tr>
</thead>
<tbody>
<?php
// get the position
$position = [] ;
$mysqli_ic = $mysqli->query("SELECT employment_nric FROM staff_employment GROUP BY employment_nric");
$all_ic = $mysqli_ic->fetch_all(MYSQLI_ASSOC);
$mysqli_position = $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'") ;
if ( $mysqli_position->num_rows > 0 ){
while ( $row_position = $mysqli_position->fetch_assoc() ){
$position[$row_position['job_position_id']] = dataFilter($row_position['job_position_desc']) ;
}
}
if ($mysqli_page->num_rows > 0){
while ($row_page = $mysqli_page->fetch_assoc()){
$employment_id = $row_page['employment_id'] ;
// check page type
$array_update_status = array() ;
switch($type){
case 'pending' :
$array_update_status = array('Pending', 'Offer', 'Reject') ;
$link_update = 'hr-employment.php?page_mode=edit&page='.$employment_id ;
break ;
case 'offer' :
$array_update_status = array('Offer', 'Confirmation', 'Terminate') ;
$link_update = 'hr-employment.php?page_mode=offer&page='.$employment_id ;
break ;
case 'confirmation' :
$array_update_status = array('Confirmation', 'Terminate') ;
break ;
case 'terminate' :
$array_update_status = array('Terminate') ;
break ;
}
$link_print_jpeg = 'hr-employment-pdf.php?page='.$employment_id.'&type=changeType&page_type=jpeg' ;
$link_print_pdf = 'hr-employment-pdf.php?page='.$employment_id.'&type=changeType&page_type=pdf' ;
echo '
<tr class="odd gradeX">
<td>'.dataFilter($row_page['employment_name']).'</a></td>
<td>' . dataFilter($row_page['employment_nric']) .'<br/>'.
(in_array($row_page['employment_nric'], $ic_list) ? ' ic duplicated' : ' ic unique') .
'</td>
<td class="text_center">'.$position[$row_page['employment_position']].'</td>
<td class="text_center">'.dataFilter($row_page['employment_sex']).'</td>
<td class="text_center">'.dataFilter($row_page['employment_nationality']).'</td>
<td class="text_center">'.dataFilter($row_page['employment_mobile']).'</td>
'.($boolean_terminate ? '<td class="text_center">'.$row_page['employment_status'].'</td>' : '<td class="text_center">'.$row_page['employment_status'].' | '.(!permissionCheck($row_user, 'application-list-edit') ? '' : ''.($row_page['employment_status'] == 'Reschedule' ? '<a href="hr-employment.php?page_mode=edit_status&page='.$employment_id.'&select_worker='.$select_worker.'"><i class="fa fa-warning" style="color:orange;"></i></a>' : '<a href="hr-employment.php?page_mode=edit_status&page='.$employment_id.'&select_worker='.$select_worker.'"><i class="fa fa-edit"></i></a>').'').'</td>').' ' ;
echo
($boolean_terminate ? '' : '<td class="text_center">'.(!permissionCheck($row_user, 'application-list-edit') ? '' : '<a href="hr-employment.php?page_mode=edit&page='.$employment_id.'&select_worker='.$select_worker.'"><i class="fa fa-edit"></i></a>').'</td>');
if ( $type == 'processing' || $type == 'interview' || $type == 'offer' ){
echo'
<td class="align_center">
<a href="hr-employment.php?page_mode=edit_interview_det&page='.$employment_id.'&select_worker='.$select_worker.'" target="_blank" style="color:#9D9EA5"><i class="fa fa-edit"></i></a>
</td>
';
}
echo'
<td class="align_center">
<a href="'.str_replace('changeType', 'pending', $link_print_jpeg).'" target="_blank" style="color:#9D9EA5"><i class="fa fa-file-image-o"></i></a>
<span class="order_print_span">|</span>
<a href="'.str_replace('changeType', 'pending', $link_print_pdf).'" target="_blank" style="color:#9D9EA5"><i class="fa fa-print"></i></a>
</td>' ;
if ( $type == 'pending' || $type == 'processing' || $type == 'interview' || $type == 'reschedule' ){}else{
echo '
'.($boolean_terminate ? '' : '<td class="text_center">'.(!permissionCheck($row_user, 'application-list-update') ? '' : '<a href="hr-employment.php?page_mode=offer&page='.$employment_id.'"><i class="fa fa-edit"></i></a>').'</td>').'
<td class="align_center">
'.($boolean_offer ? 'Offer Letter : ' : '').'
<a href="'.str_replace('changeType', $type, $link_print_jpeg).'" target="_blank" style="color:#9D9EA5"><i class="fa fa-file-image-o"></i></a>
<span class="order_print_span">|</span>
<a href="'.str_replace('changeType', $type, $link_print_pdf).'" target="_blank" style="color:#9D9EA5"><i class="fa fa-print"></i></a>' ;
if ($boolean_offer){
echo '
<br />
I.E.A Letter :
<a href="'.str_replace('changeType', 'iea', $link_print_jpeg).'" target="_blank" style="color:#9D9EA5"><i class="fa fa-file-image-o"></i></a>
<span class="order_print_span">|</span>
<a href="'.str_replace('changeType', 'iea', $link_print_pdf).'" target="_blank" style="color:#9D9EA5"><i class="fa fa-print"></i></a>' ;
}
echo '
</td>' ;
}
echo '
</tr>' ;
}
}else{
echo '
<tr class="odd gradeX">
<td class="border_none">'.$lang['no_data'].'</td>
<td class="border_none"></td>
<td class="border_none"></td>
<td class="border_none"></td>
<td class="border_none"></td>
<td class="border_none"></td>
<td class="border_none"></td>
<td class="border_none"></td>
<td class="border_none"></td>
'.($boolean_terminate ? '' : '<td class="border_none"></td>').'
'.($boolean_terminate ? '' : '<td class="border_none"></td>').'
'.($type == 'pending' ? '' : ($boolean_terminate ? '' : '<td class="border_none"></td>').'<td class="border_none"></td>').'
</tr>' ;
}
?>
</tbody>
</table>
<?= $page_pagination['page_pagination'] ?>
</div>
</div>
</div>
</div>
<span class="display_none" id="click_warning_message"><?= $lang['Confirm to change this employment status to'] ?></span>

169
HR/hr-local-mail.php Normal file
View File

@ -0,0 +1,169 @@
<?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_id = '".$row_page['employment_position']."'
LIMIT 1" ;
$mysqli_position = $mysqli->query($mysqli_query) ;
$job_position_desc = '' ;
if ( $mysqli_position->num_rows > 0 ){
$row_position = $mysqli_position->fetch_assoc() ;
$job_position_desc = $row_position['job_position_desc'] ;
}
$mysqli_query = "SELECT * FROM branch
WHERE deleted_at IS NULL AND branch_id = '".$row_page['employment_branch']."'
LIMIT 1" ;
$mysqli_branch = $mysqli->query($mysqli_query) ;
$branch_name = '' ;
$branch_hr_email = '' ;
$branch_hr_cc = [] ;
$branch_email_footer = '' ;
if ( $mysqli_branch->num_rows > 0 ){
$row_branch = $mysqli_branch->fetch_assoc() ;
$branch_name = dataFilter( $row_branch['branch_name'] ) ;
$branch_hr_email = dataFilter( $row_branch['branch_hr_email'] ) ;
$branch_hr_cc = explodeToArray( $row_branch['branch_hr_cc'] ) ;
$branch_email_footer = entityDecode( dataFilter( $row_branch['branch_email_footer'] ) ) ;
}
$mail_type = escapeString( $_GET['mail_type'] ) ;
$hod = base64_decode(escapeString( $_GET['hod'])) ;
$attach = base64_decode(escapeString( $_GET['attach']));
if ( $hod != '' ) {
$temp_emailcc = explode(",", str_replace(" ","",$hod));
foreach ($temp_emailcc as $key => $value) {
if ( filter_var($value, FILTER_VALIDATE_EMAIL) ) {
array_push($branch_hr_cc, $value);
}
}
}
if ( $attach != '' ) {
$link_attach_resume = '<a href="'.PATH.'uploads/Employment_Resume/'.$attach.'">Candidate\'s Resume</a>' ;
}
$link = PATH.'hr-employment-schedule-interview-date.php?page='.$page.'&branch='.$row_page['branch'].'&sign='.md5( $page.$row_page['branch'].APIKEY) ;
$link_reschedule = '<a href="'.$link.'">'.$link.'</a>' ;
switch ( $mail_type ){
case 'interview' :
$title = "Invitation For Interview" ;
$content = "
<table>
<tr><td>Dear ".strtoupper($row_page['employment_name']).",</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>Thank you for your application regarding the position of <span style='border-bottom:1px solid black; font-weight:bold;'>".$job_position_desc."</span> at <span style='border-bottom:1px solid black; font-weight:bold;'>".$branch_name."</span>.</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>We are impressed with your qualifications and would like to meet with you to have a round of discussion. You are advised to attend for the interview on <span style='border-bottom:1px solid black; font-weight:bold;'>".date('Y-m-d H:i', strtotime($row_page['employment_interview_date']))."</span> at our office.</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>If you have any queries, please feel free to contact the office. We look forward to meet you soon at our office.</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>Please Note That:</td></tr>
<tr><td style='height:20px;'>1) This is an interview call for the job applied and does not guarantee employment with us.</td></tr>
<tr><td style='height:20px;'>2) No TA / DA will be provided to candidates appearing for the interview.</td></tr>
<tr><td style='height:20px;'>3) Bring this letter with you on the above-mentioned date and time of the interview.</td></tr>
<tr><td style='height:20px;'>4) Bring photocopies and originals of your academic & other credentials along with a recent snap.</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>Reschedule Interview Date (If you are inconvenience with the date provided): </td></tr>
<tr><td>".$link_reschedule."</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>*Please revert back to this email to confirm for your interview attendance.</td></tr>
</table>" . $branch_email_footer ;
break ;
case 'reschedule' :
$title = "Reschedule for Interview Date" ;
$content = "
<table>
<tr><td>Dear ".strtoupper($row_page['employment_name']).",</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>After discussion and consideration, we would like to inform you that your interview was rescheduled and will be held on <span style='border-bottom:1px solid black; font-weight:bold;'>".($row_page['employment_r_interview_date'] == '0000-00-00 00:00:00' ? date('Y-m-d H:i', strtotime($row_page['employment_interview_date'])) : date('Y-m-d H:i', strtotime($row_page['employment_r_interview_date'])) )."</span> at our office.</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>If you have any queries, please feel free to contact the office. We look forward to meet you soon at our office.</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>Please Note That:</td></tr>
<tr><td style='height:20px;'>1) This is an interview call for the job applied and does not guarantee employment with us.</td></tr>
<tr><td style='height:20px;'>2) No TA / DA will be provided to candidates appearing for the interview.</td></tr>
<tr><td style='height:20px;'>3) Bring this letter with you on the above-mentioned date and time of the interview.</td></tr>
<tr><td style='height:20px;'>4) Bring photocopies and originals of your academic & other credentials along with a recent snap.</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>Reschedule Interview Date (If you are inconvenience with the date provided): </td></tr>
<tr><td>".$link_reschedule."</td></tr>
<tr><td style='height:20px;'> </td></tr>";
if ( $attach != '' ) {
$content.="
<tr><td>Attachment:</td></tr>
<tr><td>".$link_attach_resume."</td></tr>
<tr><td style='height:20px;'> </td></tr>";
}
$content.="
<tr><td>*This is a system generated email. Please do not reply to it.</td></tr>
</table>" . $branch_email_footer ;
break ;
case 'offer_letter' :
$title = "Offer Letter" ;
$link_offer_letter = '<a href="'.PATH.'employment_document.php?id='.$page.'&doctype=offer_letter&branch='.$_SESSION['url_get_branch_admin'].'">'.PATH.'employment_document.php?id='.$page.'&doctype=offer_letter&branch='.$_SESSION['url_get_branch_admin'].'</a>' ;
$link_agreement = '<a href="'.PATH.'employment_document.php?id='.$page.'&doctype=ieagreement&branch='.$_SESSION['url_get_branch_admin'].'">'.PATH.'employment_document.php?id='.$page.'&doctype=ieagreement&branch='.$_SESSION['url_get_branch_admin'].'</a>' ;
$link_sign_form = '<a href="'.PATH.'employment_document.php?id='.$page.'&doctype=sign_form&branch='.$_SESSION['url_get_branch_admin'].'">'.PATH.'employment_document.php?id='.$page.'&doctype=sign_form&branch='.$_SESSION['url_get_branch_admin'].'</a>' ;
$content = "
<table>
<tr><td>Dear ".strtoupper($row_page['employment_name']).",</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>Congratulations! We would like to inform you that your application of <span style='border-bottom:1px solid black; font-weight:bold;'>".$job_position_desc."</span> at <span style='border-bottom:1px solid black; font-weight:bold;'>".$branch_name."</span> had been approved. Please read the offer letter provided and sign the form provided below to confirm the offer.</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>If you have any queries, please feel free to contact the office. We look forward to meet you soon at our office.</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>Attachment:</td></tr>
<tr><td style='height:20px;'>Official Offer Letter:</td></tr>
<tr><td style='height:20px;'>".$link_offer_letter."</td></tr>";
if ( $offer_status['sent_ol_date'] != '' && $offer_status['sent_ol'] == 'OLA' ){
$content.="
<tr><td style='height:20px;'> </td></tr>
<tr><td style='height:20px;'>Individual Employment Agreement</td></tr>
<tr><td style='height:20px;'>".$link_agreement."</td></tr>" ;
}
$content.= "
<tr><td style='height:20px;'> </td></tr>
<tr><td>Offer Letter Form (Signed for Confirmation):</td></tr>
<tr><td>".$link_sign_form."</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>*This is a system generated email. Please do not reply to it.</td></tr>
</table>" . $branch_email_footer ;
break ;
case 'reject' :
$title = "Reject Applicant Interview" ;
$content = "
<table>
<tr><td>Dear ".ucwords($row_page['employment_name']).",</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>Thank you for applying to the job opening at ".$branch_name.". After carefully reviewing your qualifications, we have decided to pursue other candidates whom we feel more closely meeting our needs at this time.</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>We appreciate your interest in our company and the time it took to apply with us. Please feel free to apply for open positions with us in the future.</td></tr>
<tr><td style='height:20px;'> </td></tr>
<tr><td>Again, thank you for considering us as a potential employer. We wish you success in your career pursuit.</td></tr>
<tr><td style='height:20px;'> </td></tr>
</table>" . $branch_email_footer ;
break ;
}
$mailer = new Mailer() ;
$mailer->from = $branch_hr_email ;
$mailer->fromname = COMPANY ;
$mailer->to = [ $row_page['employment_email'] ] ;
if ( count($branch_hr_cc) > 0 ){
$mailer->cc = $branch_hr_cc ;
}
$mailer->subject = $title ;
$mailer->body = $content ;
$mailer->send() ;
echo '<script>alert("'.ucfirst($mail_type).' Letter is Sent!")</script>' ;
echo '<script>window.open("?page_mode=edit_status&page='.$page.'&success=1&select_worker=Local", "_self");</script>' ;
?>

2225
HR/hr-local-new.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,90 @@
<div class="warper container-fluid">
<div class="page-header"><h1><?= $lang['Employment Offer Letter']?> <small><?= $lang['Update']?></small></h1></div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"></div>
<div class="panel-body">
<form method="post" class="form-horizontal" id="quotationForm" action="hr-employment.php?page_mode=<?= $page_mode ?>&page=<?= $page ?>&type=edit" novalidate="novalidate">
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['Date to offer']?></label>
<div class="col-sm-7">
<input type="text" name="date_to_offer" class="form-control ui-search-input datetimepicker" readonly="readonly" required="required" value="<?= $offer_status['date_to_offer'] ?>" placeholder="<?= $lang['Date to offer']?>" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['Starting Date']?></label>
<div class="col-sm-7">
<input type="text" name="starting_date" class="form-control ui-search-input datetimepicker" readonly="readonly" required="required" value="<?= $offer_status['starting_date'] ?>" placeholder="<?= $lang['Starting Date']?>" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['salary']?></label>
<div class="col-sm-7">
<input type="text" name="salary" class="form-control ui-search-input" required="required" value="<?= $offer_status['salary'] ?>" placeholder="<?= $lang['salary']?>" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['Allowance']?></label>
<div class="col-sm-7">
<input type="text" name="allowance" class="form-control ui-search-input" required="required" value="<?= $offer_status['allowance'] ?>" placeholder="<?= $lang['Allowance']?>" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['Comission']?></label>
<div class="col-sm-7">
<input type="text" name="comission" class="form-control ui-search-input" required="required" value="<?= $offer_status['comission'] ?>" placeholder="<?= $lang['Comission']?>" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['Date to return']?></label>
<div class="col-sm-7">
<input type="text" name="return_date" class="form-control ui-search-input datetimepicker" readonly="readonly" required="required" value="<?= $offer_status['return_date'] ?>" placeholder="<?= $lang['Date to return']?>" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><?= $lang['Assign By']?></label>
<div class="col-sm-7">
<?php
$mysqli_query = "SELECT * FROM system_user
WHERE user_is_interview_by = 'yes' AND user_trash = '0' ORDER BY user_name" ;
$mysqli_user = $mysqli->query($mysqli_query) ;
if ($mysqli_user->num_rows > 0){
echo '
<select name="assign_by" class="form-control ui-search-input" required="required">
<option value="">'.$lang['select'].'</option>' ;
while ($row_user = $mysqli_user->fetch_array(MYSQLI_ASSOC)){
echo '
<option value="'.$row_user['user_id'].'" '.($row_user['user_id'] == $row_page['employment_assign_by'] ? 'selected' : '').'>'.dataFilter($row_user['user_fullname']).'</option>' ;
}
echo '
</select>' ;
}
?>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">&nbsp;</label>
<div class="col-sm-7">
<label><input type="radio" value='OLNO' name="sent_offer_letter"/> Sent offer letter to candidate (without agreement) <?= ($offer_status['sent_ol_date'] != '' ? '<span style="color:red">(Offer Letter had sent before)</span>' : '') ?></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">&nbsp;</label>
<div class="col-sm-7">
<label><input type="radio" value="OLA" name="sent_offer_letter"/> Sent offer letter to candidate (with agreement) <?= ($offer_status['sent_ol_date'] != '' ? '<span style="color:red">(Offer Letter had sent before)</span>' : '') ?></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-7">
<input type="hidden" name="hide" value="1" />
<button type="submit" class="btn btn-purple" style="float:right"><?= $lang['submit']?></button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,53 @@
<?php
$html .= '
<tr>
<td colspan="4" style="font-size:18px;">
<br />&nbsp;<br />
<span style="text-decoration:underline">'.$new_worker.'</span>
<br />&nbsp;<br />
<span style="text-decoration:underline">'.$employment_confirmation_date.'</span>
<br />&nbsp;<br />
<br />&nbsp;<br />
<span style="text-decoration:underline; font-weight:bold;">Subject: CONFIRMATION OF EMPLOYMENT</span>
<br />&nbsp;<br />
Dear <span style="text-decoration:underline">'.$new_worker.'</span>
<br />&nbsp;<br />
After careful evaluation of your performance this is to inform you that with effect from <span style="text-decoration:underline">'.$employment_confirmation_date.'</span> you have been moved to Confirmation with our organization.
<br />&nbsp;<br />
You will now be <span style="text-decoration:underline">'.$position.'</span> and will report into <span style="text-decoration:underline">'.$incharge_by.'</span>.
<br />&nbsp;<br />
The terms and conditions of you employment will remain the same except for the notice period of Termination of employment. There will be a 1 month notice period from either side with effect from the date that this confirmation.
<br />&nbsp;<br />
We thank you for your initiatives and hope that you will perform with equal enthusiasm as time goes by. We wish you all the best in all your endeavors.
<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />
Best regards,
<br /><br /><br /><br /><br /><br /><br /><br />
<table border="0" cellpadding="0" cellpadding="0" style="width:250px;font-size:18px;">
<tr>
<td style="border-bottom:1px solid #000;"></td>
</tr>
<tr><td style="text-transform:uppercase; padding:5px 0 1px;">'.$assign_by_position.'</td></tr>
<tr><td style="text-transform:uppercase; padding:1px 0;">'.$assign_by.'</td></tr>
</table>
</td>
</tr>' ;
?>

644
HR/letter-iea-temp.php Normal file
View File

@ -0,0 +1,644 @@
<?php
$mysqli_letterhead = $mysqli->query( "SELECT letterhead_content FROM setting_letterhead
WHERE letterhead_type = 'iea' AND deleted_at IS NULL
LIMIT 1") ;
$html_content = '' ;
if ( $mysqli_letterhead->num_rows > 0 ){
$row_letterhead = $mysqli_letterhead->fetch_assoc() ;
$html_content = dataFilter( $row_letterhead['letterhead_content'] ) ;
$html_content = str_replace( '[COMPANY]', COMPANY, $html_content ) ;
$html_content = str_replace( '[IEAASSIGNEDBY]', $assign_by, $html_content ) ;
$html_content = str_replace( '[IEAWORKERNAME]', $new_worker, $html_content ) ;
$html_content = str_replace( '[IEAWORKERIC]', dataFilter($row_page['employment_nric']), $html_content ) ;
$html_content = str_replace( '[IEAPOSITION]', $position, $html_content ) ;
$html_content = str_replace( '[IEAINCHARGEBY]', $incharge_by, $html_content ) ;
$html_content = str_replace( '[IEASALARY]', numberFormat($offer_status['salary']), $html_content ) ;
$html_content = str_replace( '[IEAALLOWANCE]', numberFormat($offer_status['allowance']), $html_content ) ;
$html_content = str_replace( '[IEACOMISSION]', numberFormat($offer_status['comission']), $html_content ) ;
}
$html2 .= $html_content ;
/*
$html .= '
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="font-size:18px;">
<tr><td colspan="2"><strong>1 The Parties</strong></td></tr>
<tr>
<td width="35">&nbsp;</td>
<td>
<br />
The parties to this employment agreement are:<br />
1. <strong>'.$assign_by.'</strong>, the "Employer"; and<br />
2. <strong>'.$new_worker.' (NIRC: '.dataFilter($row_page['employment_nric']).')</strong> the "Employee".
<br />&nbsp;<br />
</td>
</tr>
<tr><td colspan="2"><strong>2 The Position and the Duties</strong></td></tr>
<tr>
<td>&nbsp;</td>
<td>
<br />
<strong>2.1 Position</strong>
<br />&nbsp;<br />
The Employee is being employed a <span style="text-decoration:underline;">'.$position.'</span> <strong>(POSITION)</strong>.
<br />&nbsp;<br />
<strong>2.2 Duties as set out in the job description which may be modified from time to time by the Employer</strong>
<br />&nbsp;<br />
The Employee shall perform the duties set out in the Job Description attached to this agreement. These duties may be modified and updated by the Employer from time to time following agreement with the Employee. The Employee also agrees to perform all other reasonable duties and comply with reasonable instructions issued by the Employer.
<br />&nbsp;<br />
<strong>2.3 Reporting</strong>
<br />&nbsp;<br />
The Employee shall report to <span style="text-decoration:underline;">'.$incharge_by.'</span> <strong>(head of department)</strong> or to any other representative of the Employer designated from time to time by the Employer.
<br />&nbsp;<br />
<strong>2.4 Performance Objectives</strong>
<br />&nbsp;<br />
The Employer shall, in consultation with the Employee, set the Employee objectives at least on an annual basis. These objectives shall be taken into account by the Employer when assessing the Employee\'s performance.
<br />&nbsp;<br />
<strong>2.5 Performance reviews</strong>
<br />&nbsp;<br />
The Employer shall conduct a performance review of the Employee on at least an annual basis. This review shall be taken into account in any salary reviews.
<br />&nbsp;<br />
<strong>2.6 Secondment</strong>
<br />&nbsp;<br />
In the event the Employer considers that a secondment (such as to a client or customer or project) would be in the best interests of the Employer, the Employee shall comply with all reasonable requests to carry out that secondment.
<br />&nbsp;<br />
</td>
</tr>
<tr><td colspan="2"><strong>3 Natures and Term of the Agreement </strong></td></tr>
<tr>
<td>&nbsp;</td>
<td>
<br />
<strong>3.1 Individual Agreement of Ongoing and Indefinite Duration</strong>
<br />&nbsp;<br />
This Employment Agreement is an individual employment agreement entered into under the Employment Relations Act. The employment shall commence on <strong>1st April 2010</strong> and shall continue until either party terminates the agreement in accordance with the terms of this agreement. The clauses in this agreement may be varied or updated by agreement between the parties at any time.
<br />&nbsp;<br />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="font-size:18px;">
<tr>
<td>&nbsp;</td>
<td>
<strong>3.2 Probation </strong>
<br />&nbsp;<br />
A probation period will apply for the first <strong>3 months</strong> of employment to assess and confirm suitability for the position. The employer will provide guidance, feedback and any necessary support to the employee. Both parties will promptly discuss any difficulties that arise, and the employer will appropriately warn the employee if he or she is contemplating termination. Any termination must comply with the termination clause in this agreement. This probation period does not limit the legal rights and obligations of the employer or the employee, and both parties must deal with each other in good faith.
<br />&nbsp;<br />
</td>
</tr>
<tr><td colspan="2"><strong>4 The Place of Work </strong></td></tr>
<tr>
<td width="50">&nbsp;</td>
<td>
<br />
<strong>4.1 Flexible Location</strong>
<br />&nbsp;<br />
The parties agree that the Employee shall perform their duties at <strong>'.COMPANY.'</strong> '.ADDRESS.' and at any other reasonable location to which they may be directed from time to time by the Employer.
<br />&nbsp;<br />
</td>
</tr>
<tr><td colspan="2"><strong>5 Hours of Work </strong></td></tr>
<tr>
<td width="50">&nbsp;</td>
<td>
<br />
<strong>5.1 Full Time Hours of Work</strong>
<br />&nbsp;<br />
The Employee\'s hours of work shall be <strong>44</strong> hours per week<br />
<table border="0" cellpadding="0" cellspacing="0" style="font-weight:bold; font-size:18px">
<tr>
<td width="160">Monday till Friday</td>
<td width="20" style="text-align:center;">=</td>
<td>9.00 am to 6.00 pm</td>
</tr>
<tr>
<td>Saturday</td>
<td style="text-align:center;">=</td>
<td>9.00 am to 01.00 pm</td>
</tr>
</table><br />
<strong>5.2 Lunch Breaks</strong>
<br />&nbsp;<br />
The Employee shall be entitled to a lunch break on each working day of employment, of <strong>1 hour</strong>, to be taken at <strong>12.00 pm</strong> such other time as the parties agree from time to time.
<br />&nbsp;<br />
<strong>5.3 Weekly Rest Day:</strong>
<br />&nbsp;<br />
Sunday
<br />&nbsp;<br />
<strong>5.4 Pray Time:</strong>
<br />&nbsp;<br />
The Employee shall be entitled to pray on every Friday, of 2 hours, to be pray at 12.30pm till 2.30pm.
<br />&nbsp;<br />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="font-size:18px;">
<tr><td colspan="2"><strong>6 Wages / Salary / Allowances </strong></td></tr>
<tr>
<td width="50">&nbsp;</td>
<td>
<br />
<strong>6.1 Salary</strong>
<br />&nbsp;<br />
The Employee\'s salary shall be as follow details
<br />&nbsp;<br />
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="font-size:18px">
<tr>
<td width="60">6.1.1)</td>
<td colspan="2">Basic Salary : RM <span style="text-decoration:underline;">'.numberFormat($offer_status['salary']).'</span> / month</td>
</tr>
<!--<tr>
<td>6.1.2)</td>
<td colspan="2">Allowance : '.($offer_status['allowance'] != '' ? numberFormat($offer_status['allowance']) : 'NIL').'</td>
</tr>-->
<tr>
<td>6.1.2)</td>
<td colspan="2">Commission : '.($offer_status['comission'] != '' ? numberFormat($offer_status['comission']).'% Commission For Every Completed And Succeed Payment Project' : 'NIL').'</td>
</tr>
<tr>
<td>6.1.3)&nbsp;</td>
<td colspan="2">Duration Of Wage Period : Monthly</td>
</tr>
<tr>
<td>6.1.4)</td>
<td colspan="2">Salary / Pay Day : Before 6th Of Each Month</td>
</tr>
<tr>
<td>6.1.5)</td>
<td colspan="2">Payment By : Cheque / Cash / Bank Transfer</td>
</tr>
<tr>
<td>6.1.6)</td>
<td colspan="2">Phone Service : NIL</td>
</tr>
<tr>
<td>6.1.7)</td>
<td colspan="2">Petrol, Toll & Parking : NIL</td>
</tr>
<tr>
<td>6.1.8)</td>
<td colspan="2">Outstation Allowance : NIL</td>
</tr>
<tr>
<td>6.1.9)</td>
<td colspan="2">Overtime Wage Rate Per Hour : NIL</td>
</tr>
<tr>
<td>6.1.10)</td>
<td colspan="2">Paid Public Holidays & Total Days In A Calendar Year : 14 Days</td>
</tr>
<tr>
<td>6.1.11)</td>
<td colspan="2">E.P.F & Socso : Yes</td>
</tr>
</table>
<br />
<table border="0" cellpadding="0" cellspacing="0" style="font-size:18px">
<tr>
<td width="30">&nbsp;</td>
<td width="20">a.</td>
<td width="280">Chinese New Year</td>
<td width="20">--</td>
<td>8 Days</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>b.</td>
<td>Sultan\'s Johor Birthday</td>
<td>--</td>
<td>1 Day</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>c.</td>
<td>Labour Day</td>
<td>--</td>
<td>1 Day</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>d.</td>
<td>Agongs\'s Birthday</td>
<td>--</td>
<td>1 Day</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>e.</td>
<td>National Day</td>
<td>--</td>
<td>1 Day</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>f.</td>
<td>Malaysia Day</td>
<td>--</td>
<td>1 Day</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>g.</td>
<td>Merry Christmas</td>
<td>--</td>
<td>1 Day</td>
</tr>
</table>
<br />
<strong>6.2 Review </strong>
<br />&nbsp;<br />
The Employer agrees to review the Employee\'s salary/wages on the 12 month anniversary of this employment agreement and every 12 month anniversary thereafter. The parties agree that the Employee shall not have any necessary entitlement to an increase, but, the Employer agrees to conduct this review in good faith and to consult with the Employee during the review.
<br />&nbsp;<br />
<strong>6.3 Allowance Clause (1) </strong>
<br />&nbsp;<br />
NIL
<br />&nbsp;<br />
<strong>6.4 Overtime </strong>
<br />&nbsp;<br />
NIL
<br />&nbsp;<br />
<strong>6.2 Review </strong>
<br />&nbsp;<br />
Entitled
<br />&nbsp;<br />
NIL
<br />&nbsp;<br />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="font-size:18px;">
<tr>
<td>&nbsp;</td>
<td>
<strong>6.5 Reimbursement of Expenses </strong>
<br />&nbsp;<br />
The Employee shall be entitled to reimbursement by the Employer of all expenses reasonably and properly incurred by the Employee in the performance of their duties, provided the Employee produces appropriate receipts to the Employer when requesting reimbursement.
<br />&nbsp;<br />
<strong>6.6 Reimbursement of Travel and Accommodation Expenses </strong>
<br />&nbsp;<br />
NIL
<br />&nbsp;<br />
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<strong>6.6 Reimbursement of Travel and Accommodation Expenses </strong>
<br />&nbsp;<br />
NIL
<br />&nbsp;<br />
</td>
</tr>
<tr><td colspan="2"><strong>7 Holidays and Leave Entitlements </strong></td></tr>
<tr>
<td width="50">&nbsp;</td>
<td>
<br />
<strong>7.1 Annual Leave entitlements in the Holidays Act</strong>
<br />&nbsp;<br />
The Employee shall be entitled to paid annual leave after 1 year of Emplyment on the following basis:
<br />&nbsp;<br />
a) Paid Annual Leave:<br />
<table border="0" cellpadding="0" cellspacing="0" style="font-size:18px">
<tr>
<td width="60">&nbsp;</td>
<td width="20" style="text-align:left;">a.</td>
<td width="160">Within 2 Years</td>
<td width="10" style="text-align:right;">:</td>
<td>&nbsp;&nbsp;8 Days</td>
</tr>
<tr>
<td>&nbsp;</td>
<td style="text-align:left;">b.</td>
<td>2 ~ 5 Years</td>
<td style="text-align:right;">:</td>
<td>12 Days</td>
</tr>
<tr>
<td>&nbsp;</td>
<td style="text-align:left;">c.</td>
<td>5 Years Above</td>
<td style="text-align:right;">:</td>
<td>16 Days</td>
</tr>
</table><br />
b) Annual leave may, with the agreement of the Employer, be taken in advance.
<br />&nbsp;<br />
c) The time for taking annual leave may be agreed between the Employer and Employee, but failing agreement the Employer may, after consultation with the Employee, and having taken into account work requirements and the opportunities for rest and recreation available to the Employee, provide at least 3 days notice to the Employee directing them to take annual leave commencing on a particular date.
<br />&nbsp;<br />
<strong>7.2 Sick Leave </strong>
<br />&nbsp;<br />
a) Sick Leave (Medical Certificate Required):<br />
<table border="0" cellpadding="0" cellspacing="0" style="font-size:18px">
<tr>
<td width="60">&nbsp;</td>
<td width="20" style="text-align:left;">a.</td>
<td width="160">Within 2 Years</td>
<td width="10" style="text-align:right;">:</td>
<td>14 Days</td>
</tr>
<tr>
<td>&nbsp;</td>
<td style="text-align:left;">b.</td>
<td>2 ~ 5 Years</td>
<td style="text-align:right;">:</td>
<td>18 Days</td>
</tr>
<tr>
<td>&nbsp;</td>
<td style="text-align:left;">c.</td>
<td>More Than 5 Years</td>
<td style="text-align:right;">:</td>
<td>22 Days</td>
</tr>
</table>
<br />
Where the Employee has taken sick leave and has been absent from work for at least three consecutive calendar days, the Employer shall be entitled to require the employee to provide proof of entitlement to sick leave, at the employee\'s cost.
<br />&nbsp;<br />
Where the Employee takes sick leave, and the Employer has reasonable cause to suspect that the leave is not genuine, the Employer shall be entitled to require the employee to provide proof of entitlement to sick leave within the three consecutive calendar days, at the employee\'s cost. The employer will inform the employee as early as possible that such proof will be required.
<br />&nbsp;<br />
<strong>7.3 Unpaid Leave</strong>
<br />&nbsp;<br />
Applications for unpaid leave will be given reasonable consideration by the Employer, but shall be granted only at the Employer\'s sole discretion having regard to the requirements of the Employer\'s business and operations. Applications for unpaid leave will be considered in situations such as for compassionate reasons; to undertake a course of work-related study; or to gain additional work-related experience.
<br />&nbsp;<br />
<strong>7.4 Annual Closedown</strong>
<br />&nbsp;<br />
The Employer may closedown all or part of its operations regularly once a year and require the Employee to take leave during the period of the close down, even where this requires the Employee to take leave for which they are not fully reimbursed. The Employer shall provide the Employee with at least 14 days advance notice of the closedown.
<br />&nbsp;<br />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="font-size:18px;">
<tr><td colspan="2"><strong>8 Other Employment Obligations </strong></td></tr>
<tr>
<td width="50">&nbsp;</td>
<td>
<br />
<strong>8.1 Confidential Information</strong>
<br />&nbsp;<br />
The Employee shall not, whether during the currency of this agreement or after its termination for whatever reason, use, disclose or distribute to any person or entity, otherwise than as necessary for the proper performance of their duties and responsibilities under this agreement, or as required by law, any confidential information, messages, data or trade secrets acquired by the Employee in the course of performing their services under this agreement. This includes, but is not limited to, information about the Employer\'s business.
<br />&nbsp;<br />
<strong>8.2 Copyright and other Intellectual Property</strong>
<br />&nbsp;<br />
All work produced for the Employer by the Employee under this agreement or otherwise and the right to the copyright and all other intellectual property in all such work is to be the sole property of the Employer.
<br />&nbsp;<br />
<strong>8.3 Conflicts of Interest</strong>
<br />&nbsp;<br />
The Employee agrees that there are no contracts, restrictions or other matters which would interfere with their ability to discharge their obligations under this agreement. If, while performing their duties and responsibilities under this agreement, the Employee becomes aware of any potential or actual conflict between their interests and those of the Employer, then the Employee shall immediately inform the Employer. Where the Employer forms the view that such a conflict does or could exist, it may direct the Employee to take action(s) to resolve that conflict, and the Employee shall comply with that instruction. When acting in their capacity as Employee, the Employee shall not, either directly or indirectly, receive or accept for their own benefit or the benefit of any person or entity other than the Employer any gratuity, emolument, or payment of any kind from any person having or intending to have any business with the Employer.
<br />&nbsp;<br />
<strong>8.4 Use of Internet and Email</strong>
<br />&nbsp;<br />
The Employee will not have the right to access to email and the Internet in the course of their employment.
<br />&nbsp;<br />
<strong>8.5 Privacy Obligations</strong>
<br />&nbsp;<br />
The Employer and the Employee shall comply with the obligations set out in the Privacy Act 1993. The Employee must not breach the privacy of any customer or client in the course of their employment.
<br />&nbsp;<br />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="font-size:18px;">
<tr><td colspan="2"><strong>9 Termination of Employment </strong></td></tr>
<tr>
<td width="50">&nbsp;</td>
<td>
<br />
<strong>Within Probation Period</strong>
<br />&nbsp;<br />
The Employer may terminate this agreement for cause without notice within <strong>24hours.</strong>
<br />&nbsp;<br />
<strong>After Confirmation of Employment</strong>
<br />&nbsp;<br />
The Employer may terminate this agreement for cause, by providing <strong>1 Months</strong> notice in writing to the Employee. Likewise the Employee is required to give <strong>1 Months</strong> notice of resignation. The Employer may, at its discretion, pay remuneration in lieu of some or all of this notice period.
<br />&nbsp;<br />
<strong>9.2 Termination for Serious Misconduct</strong>
<br />&nbsp;<br />
Notwithstanding any other provision in this agreement, the Employer may terminate this agreement summarily and without notice for serious misconduct on the part of the Employee. Serious misconduct includes, but is not limited to:
<table border="0" cellpadding="0" cellspacing="0" style="font-size:18px">
<tr>
<td width="80">(i)</td>
<td>theft;</td>
</tr>
<tr>
<td>(ii)</td>
<td>dishonesty;</td>
</tr>
<tr>
<td>(iii)</td>
<td>harassment of a work colleague or customer;</td>
</tr>
<tr>
<td>(iv)</td>
<td>serious or repeated failure to follow a reasonable instruction;</td>
</tr>
<tr>
<td>(v)</td>
<td>deliberate destruction of any property belonging to the Employer;</td>
</tr>
<tr>
<td>(vi)</td>
<td>actions which seriously damage the Employer\'s reputation;</td>
</tr>
<tr>
<td>(vii)</td>
<td>has a self project related in our company technique.</td>
</tr>
</table>
<br />&nbsp;<br />
<strong>9.3 Abandonment of Employment</strong>
<br />&nbsp;<br />
In the event the Employee has been absent from work for three consecutive working days without any notification to the Employer, and the Employer has made reasonable efforts to contact the Employee, this agreement shall automatically terminate on the expiry of the third day without the need for notice of termination of employment.
<br />&nbsp;<br />
<strong>9.4 Obligations of Employee on Termination</strong>
<br />&nbsp;<br />
Upon the termination of this agreement for whatever reason, or at any other time if so requested by the Employer, the Employee shall immediately return to the Employer all information, material or property (including but not limited to computer disks, printouts, manuals, reports, letters, memos, plans, diagrams, security cards, keys, and laptop computers) either belonging to or the responsibility of the Employer and all copies of that material, which are in the Employee\'s possession or under their control.
<br />&nbsp;<br /><br />&nbsp;<br />
</td>
</tr>
<tr><td colspan="2"><strong>10 Acknowledgement of the Agreement </strong></td></tr>
<tr>
<td width="50">&nbsp;</td>
<td>
<br />
<strong>10.1 Variation of Agreement</strong>
<br />&nbsp;<br />
The parties may vary this agreement, provided that no variation shall be effective or binding on either party unless it is in writing and signed by both parties.
<br />&nbsp;<br />
<strong>10.2 Non Assignment by Employee</strong>
<br />&nbsp;<br />
The Employee must personally perform the duties and responsibilities under this agreement and no subcontracting or assignment by the Employee is permissible.
<br />&nbsp;<br />
<strong>10.3 Entire Agreement</strong>
<br />&nbsp;<br />
Each party acknowledges that this agreement contains the whole and entire agreement between the parties as to the subject matter of this agreement.
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="font-size:18px;">
<tr>
<td width="50">&nbsp;</td>
<td>
<strong>10.4 Deductions from Salary/Wages</strong>
<br />&nbsp;<br />
Where requested by the Employee, the Employer shall deduct from their salary/wages any agreed amount for matters such as Unpaid Leave. The Employer shall also be entitled to deduct from any salary payment payable upon termination of employment any overpayment made to the Employee for leave taken in advance.
<br />&nbsp;<br />
<strong>10.5 Employee Acknowledgment</strong>
<br />&nbsp;<br />
The Employee acknowledges that:
<table border="0" cellpadding="0" cellspacing="0" style="font-size:18px">
<tr>
<td width="40">(i)</td>
<td>they have been advised of their right to take independent advice on the terms of this agreement,</td>
</tr>
<tr>
<td>(ii)</td>
<td>dishonesty;</td>
</tr>
<tr>
<td>(ii)</td>
<td>that they have been provided with a reasonable opportunity to take that advice;</td>
</tr>
<tr>
<td>(iii)</td>
<td>that they have read these terms of employment and understand these terms and their implications; and</td>
</tr>
<tr>
<td>(iv)</td>
<td>that they agree to be bound by these terms of employment and the Employer\'s policies and procedures as implemented by the Employer from time to time.</td>
</tr>
</table>
&nbsp;<br />
</td>
</tr>
<tr><td colspan="2"><strong>11 Declaration </strong></td></tr>
<tr>
<td width="50">&nbsp;</td>
<td>
<br />
<strong>11.1 Declaration</strong>
<br />&nbsp;<br />
I, <strong>'.$assign_by.'</strong>, offer this employment agreement to <strong>'.$new_worker.'</strong>
<br />&nbsp;<br />
<br />&nbsp;<br />
<br />&nbsp;<br />
<br />&nbsp;<br />
<br />&nbsp;<br />
<br />&nbsp;<br />
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="font-weight:bold;">
<tr>
<td>Signed by</td>
<td>:</td>
<td style="border-bottom:1px solid #000" width="300"></td>
<td>&nbsp;Date</td>
<td>:</td>
<td style="border-bottom:1px solid #000" width="300"></td>
</tr>
</table>
<br />&nbsp;<br />
<br />&nbsp;<br />
I, <strong>'.$new_worker.' (NIRC: '.dataFilter($row_page['employment_nric']).')</strong> declare that I have read and understand the conditions of employment detailed above and accept them fully. I have been advised of the right to seek independent advice in relation to this agreement, and have been allowed reasonable time to do so.
<br />&nbsp;<br />
<br />&nbsp;<br />
<br />&nbsp;<br />
<br />&nbsp;<br />
<br />&nbsp;<br />
<br />&nbsp;<br />
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="font-weight:bold;">
<tr>
<td>Signed by</td>
<td>:</td>
<td style="border-bottom:1px solid #000" width="300"></td>
<td>&nbsp;Date</td>
<td>:</td>
<td style="border-bottom:1px solid #000" width="300"></td>
</tr>
</table>
<br />&nbsp;<br />
</td>
</tr>
</table>
</td>
</tr>' ;
*/
?>

58
HR/letter-offer.php Normal file
View File

@ -0,0 +1,58 @@
<?php
$mysqli_data = $mysqli->query( "SELECT * FROM setting_letterhead
WHERE letterhead_type = '".$type."' AND deleted_at IS NULL
LIMIT 1") ;
if( $mysqli_data->num_rows > 0 ){
$row = $mysqli_data->fetch_assoc() ;
$html_offer .= dataFilter( $row['letterhead_content'] ) ;
}
$mysqli_position = $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_id = '".$row_page['employment_position']."'" ) ;
if( $mysqli_position->num_rows > 0 ){
$row_position = $mysqli_position->fetch_assoc() ;
$position_id = $row_position['job_position_id'] ;
$position_title = $row_position['job_position_desc'] ;
}
$html .= '
<!--
<tr>
<td colspan="4">
RujKami : LTF/HR/'.str_pad( $row_page['employment_id'], 3, '0', STR_PAD_LEFT ).'-'.date( 'm/Y', strtotime( $row_page['employment_date'] ) ).'/'.$position_id.' '.$position_title.'<br/>
Tarikh : '.date( 'd M Y', strtotime( TODAYDAY ) ).'<br/><br/>
'.$new_worker.'<br/>
No.KPPN : '.$row_page['employment_nric'].',<br/>
'.dataFilter( $row_page['employment_address'] ).'
</td>
</tr>
-->
<tr>
<td colspan="4" style="font-size:18px;">
<br />
<span>'.str_replace('/', '.', $offer_status['date_to_offer']).'</span><br /><br />
Dear '.$new_worker.'<br /><br />
<span style="font-weight:bold;text-decoration: underline;">Re: Offer of Employment</span><br /><br /><br />
I am pleased to confirm you the position of <span style="font-weight:bold;text-decoration: underline;">'.$position_title.'</span> '.$letter_head['name'].' starting on <span style="font-weight:bold;text-decoration: underline;">'.str_replace('/', '.', $offer_status['starting_date']).'</span> salary RM <span style="font-weight:bold;text-decoration: underline;">'.numberFormat($offer_status['salary'], 2, ',').'</span> per month. I propose that the terms of employment will be those in the attached Individual Employment Agreement.<br /><br /><br />
If you accept this position, please sign the duplicate copy of this letter and return it to me by <span style="font-weight:bold;text-decoration: underline;">'.str_replace('/', '.', $offer_status['return_date']).'</span>. A copy of that agreement will be provided to you<br /><br /><br />
In the event I have not heard from you by that date, this offer will be automatically withdrawn on that date. If there is anything you are unclear about, disagree with or wish to discuss, please contact me.<br /><br /><br />
I look forward to working with you.<br /><br /><br />
Yours faithfully,
<br /><br /><br /><br /><br /><br /><br /><br />
<table border="0" cellpadding="0" cellpadding="0" style="width:250px;font-size:18px;">
<tr>
<td style="border-bottom:1px solid #000;"></td>
</tr>
<tr><td style="text-transform:uppercase; padding:5px 0 1px;">'.$assign_by_position.'</td></tr>
<tr><td style="text-transform:uppercase; padding:1px 0;">'.$assign_by.'</td></tr>
</table>
</td>
</tr>' ;
?>

1216
HR/letter-pending.php Normal file

File diff suppressed because it is too large Load Diff

49
HR/letter-terminate.php Normal file
View File

@ -0,0 +1,49 @@
<?php
$html .= '
<tr>
<td colspan="4" style="font-size:18px;">
<br />&nbsp;<br />
<span>'.$employment_terminate_date.'</span>
<br />&nbsp;<br />
<span style="text-decoration:underline">Dear '.$new_worker.'</span>
<br />&nbsp;<br />
<br />&nbsp;<br />
<span style="text-decoration:underline; font-weight:bold;">Re: Termination Letter</span>
<br />&nbsp;<br />
This letter confirms our discussion today that your employment with '.$letter_head['name'].' is terminated on <strong>'.$employment_terminate_date.'</strong>.
<br />&nbsp;<br />
We regret to say that you have not come up to our expectations and that your performance has been unsatisfactory. The management has therefore decided to relieve you of your services with immediate effect.
<br />&nbsp;<br />
A meeting was conducted on (specify the date) and we discussed (give reasons of termination). Based on the reviews of the comments and the unsatisfactory performance you are requested to please hand over charge on (date).
<br />&nbsp;<br />
Thank you for your time at '.$letter_head['name'].' and wish you luck in finding new employment.
<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />
Yours faithfully,
<br /><br /><br /><br /><br /><br /><br /><br />
<table border="0" cellpadding="0" cellpadding="0" style="width:250px;font-size:18px;">
<tr>
<td style="border-bottom:1px solid #000;"></td>
</tr>
<tr><td style="text-transform:uppercase; padding:5px 0 1px;">'.$assign_by_position.'</td></tr>
<tr><td style="text-transform:uppercase; padding:1px 0;">'.$assign_by.'</td></tr>
</table>
</td>
</tr>' ;
?>

357
HR/salary-data.php Normal file
View File

@ -0,0 +1,357 @@
<?php
$page = escapeString($_GET['page']) ;
$search_name = escapeString($_GET['search_name']) ;
$search_idno = escapeString($_GET['search_idno']) ;
$search_branch = escapeString($_GET['search_branch']) ;
$sort_by = escapeString($_GET['sort_by']) ;
$sort_by = ( $sort_by != '' ? $sort_by : 'a.created_at' ) ;
$sort_by_type = escapeString($_GET['sort_by_type']) ;
$date_time = escapeString($_GET['date_time']) ;
$date_current = TODAYDAY ;
$date_time = ( $date_time != '' ? $date_time : date('Y-m', strtotime($date_current)) ) ;
$date_time_month = date('Y-m-1', strtotime($date_time));
$day_of_month = date("t", strtotime($date_time)) ;
$start_day = 1;
$limit = LIMIT;
$export = escapeString($_GET['export']) ;
$export = ( $export == 'yes' ? 'yes' : 'no' ) ;
// pagination
if (isset($page) && !empty($page)) { $product_page = $page ; } else { $product_page = 1 ; } // next and prev page (5 thing need to change)
$start_from = ($product_page - 1) * $limit ; //end next and prev page
$search_query = '' ;
if ( $search_name != '' ){
$search_query .= " AND ( b.staff_name LIKE '%".$search_name."%' )" ;
}
if ( $search_idno != '' ){
$search_query .= " AND ( b.staff_idno LIKE '%".$search_idno."%' )" ;
}
if ( $search_branch != '' ){
$search_query .= " AND b.branch_id = '".$search_branch."'" ;
}
// page query
if($export != 'yes'){
$mysqli_query = "SELECT a.*, b.staff_idno, b.staff_name FROM salary_slip a
JOIN staff b ON (a.staff_id = b.staff_id)
WHERE a.month = '$date_time_month' AND " ;
$mysqli_query = $mysqli_query . " a.deleted_at IS NULL " . $search_query . $user_branch_permission_sql_b ;
$mysqli_page = $mysqli->query($mysqli_query." ORDER BY " . $sort_by . ' ' . $sort_by_type . " LIMIT $start_from, " . $limit ) ;
// print_r($mysqli_query." ORDER BY " . $sort_by . ' ' . $sort_by_type . " LIMIT $start_from, " . LIMIT);exit;
// set search url
$search_url = 'page='.$page.'&page_mode='.$_GET['page_mode'].'&edit='.$_GET['edit'].'&date_time='.$_GET['date_time'].'&search_name='.$_GET['search_name'].'&search_idno='.$_GET['search_idno'].'&search_branch='.$_GET['search_branch'].'&sort_by='.$_GET['sort_by'].'&sort_by_type='.$_GET['sort_by_type'] ;
// load pagination
$page_pagination = nextPrevious($product_page, $limit, $search_url, $mysqli_query) ;
}else{
$mysqli_query = "SELECT a.*, b.staff_idno, b.staff_name FROM salary_slip a
JOIN staff b ON (a.staff_id = b.staff_id)
WHERE a.month = '$date_time_month' AND a.deleted_at IS NULL ". $search_query. $user_branch_permission_sql_b ;
$mysqli_page = $mysqli->query($mysqli_query." ORDER BY a.staff_id") ;
}
$salary_slip = [];
if(mysqli_num_rows($mysqli_page) > 0){
while($row = mysqli_fetch_assoc($mysqli_page)){
$salary_slip[$row['slip_id']] = $row;
}
}
//export excel
if($export == 'yes'){
include 'PhpExcel/PHPExcel.php' ;
// set excel content
$page_filename = 'Staff Salary - '.date( 'Ymd', time() ) ;
$objPHPExcel = new PHPExcel() ;
$objPHPExcel->getProperties()
->setCreator(COMPANY)
->setTitle(COMPANY)
->setSubject(COMPANY)
->setDescription(COMPANY)
->setKeywords(COMPANY)
->setCategory(COMPANY) ;
$objPHPExcel->getActiveSheet()->setTitle( $page_filename ) ;
$objPHPExcel->setActiveSheetIndex(0);
$objWriter = PHPExcel_IOFactory::createWriter( $objPHPExcel, 'Excel5' ) ;
$styleArrayTitle = array(
'font' => array(
'bold' => true ,
'color' => array( 'rgb' => '000000' ) ,
'size' => 15
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
)
);
$styleArrayTitle2 = array(
'font' => array(
'bold' => true ,
'color' => array( 'rgb' => '000000' ) ,
),
'borders' => array(
'outline' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN
)
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
)
);
$styleArrayBg1 = array(
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'AFABAB')
),
'borders' => array(
'outline' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN
)
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
)
) ;
$styleArrayBg2 = array(
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'FFDA65')
),
'borders' => array(
'outline' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN
)
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
)
) ;
$styleArray = array(
'borders' => array(
'outline' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN
)
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
)
) ;
$styleArrayLeft = array(
'borders' => array(
'outline' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN
)
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT,
)
) ;
$styleArrayRed = array(
'font' => array(
'bold' => true ,
'color' => array( 'rgb' => '000000' ) ,
),
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'FFC0CB')
),
'borders' => array(
'outline' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN
)
),
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
)
);
$styleArrayYellow = array(
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'FFFFB1')
),
);
$styleArrayPink = array(
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'FFD8F1')
),
);
$styleArraySmoke = array(
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'F9F1F0')
),
);
$styleArrayGreen = array(
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'ddf7e3')
),
);
$styleArrayYellowGreen = array(
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'FAFBF4')
),
);
$count = 1 ;
$firstChar = 'A' ;
$lastChar = "Q";
// title name
$objPHPExcel->getActiveSheet()->mergeCells( $firstChar.$count.':'.$lastChar.$count ) ;
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count.':'.$lastChar.$count )->applyFromArray( $styleArrayTitle ) ;
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar.$count, 'Staff Salary '.$date_time ) ;
$count++ ;
$count++ ;
$array_title = array( 'No.', 'ID', 'Staff Name', "Basic Salary\r(RM)", "Commission\r(RM)", "Allowance\r(RM)", "Deduction\r- (RM)", "Subtotal\r(RM)", "EPF\r- (RM)", "SOCSO\r- (RM)", "EIS\r- (RM)", "MZF\r- (RM)", "PCB\r- (RM)", "Total\r(RM)", "Employer EPF\r(RM)", "Employer SOCSO\r(RM)", "Employer EIS\r(RM)") ;
foreach($array_title as $k => $v){
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar.$count, $v ) ;
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArrayTitle2 ) ;
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->getAlignment()->setWrapText(true);
if($firstChar >= 'D' && $firstChar <= 'G'){
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArrayYellow ) ;
}else if($firstChar == 'H'){
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArrayPink ) ;
}else if($firstChar >= 'I' && $firstChar <= 'M'){
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArraySmoke ) ;
}else if($firstChar == 'N'){
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArrayGreen ) ;
}else if($firstChar >= 'O'){
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArrayYellowGreen ) ;
}
$firstChar++;
}
if(count($salary_slip) > 0){
$counter = 0;
$total_salary = $total_em_epf = $total_em_socso = $total_em_eis = 0;
foreach($salary_slip as $key => $value){
$firstChar = 'A';
$counter ++ ;
$count ++ ;
$array_content = array($counter, $value['staff_idno'], $value['staff_name'], $value['basic_salary'], $value['commission'], $value['allowance'], $value['deduction'], $value['sub_total'], $value['staff_epf'], $value['staff_socso'], $value['staff_eis'], $value['staff_zakat'], $value['staff_pcb'], $value['total'], $value['employer_epf'], $value['employer_socso'], $value['employer_eis']);
$total_salary += $value['total'];
$total_em_epf += $value['employer_epf'];
$total_em_socso += $value['employer_socso'];
$total_em_eis += $value['employer_eis'];
foreach($array_content as $key2 => $value2){
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar.$count, $value2 ) ;
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArray ) ;
if($firstChar >= 'D' && $firstChar <= 'G'){
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArrayYellow ) ;
}else if($firstChar == 'H'){
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArrayPink ) ;
}else if($firstChar >= 'I' && $firstChar <= 'M'){
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArraySmoke ) ;
}else if($firstChar == 'N'){
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArrayGreen ) ;
}else if($firstChar >= 'O'){
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArrayYellowGreen ) ;
}
$firstChar++;
}
}
$count++;
$count++;
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( 'N'.$count, 'Total Salary' ) ;
$objPHPExcel->getActiveSheet()->getStyle( 'N'.$count )->applyFromArray( $styleArrayRed ) ;
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( 'O'.$count, "Total\rEmployer EPF" ) ;
$objPHPExcel->getActiveSheet()->getStyle( 'O'.$count )->applyFromArray( $styleArrayRed ) ;
$objPHPExcel->getActiveSheet()->getStyle( 'O'.$count )->getAlignment()->setWrapText(true);
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( 'P'.$count, "Total\rEmployer SOCSO" ) ;
$objPHPExcel->getActiveSheet()->getStyle( 'P'.$count )->applyFromArray( $styleArrayRed ) ;
$objPHPExcel->getActiveSheet()->getStyle( 'P'.$count )->getAlignment()->setWrapText(true);
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( 'Q'.$count, "Total\rEmployer EIS" ) ;
$objPHPExcel->getActiveSheet()->getStyle( 'Q'.$count )->applyFromArray( $styleArrayRed ) ;
$objPHPExcel->getActiveSheet()->getStyle( 'Q'.$count )->getAlignment()->setWrapText(true);
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( 'R'.$count, 'GRAND TOTAL' ) ;
$objPHPExcel->getActiveSheet()->getStyle( 'R'.$count )->applyFromArray( $styleArrayRed ) ;
$grand_total = $total_salary + $total_em_epf + $total_em_socso + $total_em_eis;
$count++;
$firstChar = 'A';
$array_footer = array('', '', '', '', '', '', '', '', '', '', '', '', '', $total_salary, $total_em_epf, $total_em_socso, $total_em_eis, $grand_total);
foreach($array_footer as $kk => $vv){
$objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar.$count, $vv ) ;
if($firstChar >= 'N'){
$objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count )->applyFromArray( $styleArrayRed ) ;
}
$firstChar++;
}
}
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(4);
$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(7);
$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(20);
$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(12);
$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(12);
$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(10);
$objPHPExcel->getActiveSheet()->getColumnDimension('G')->setWidth(10);
$objPHPExcel->getActiveSheet()->getColumnDimension('H')->setWidth(12);
$objPHPExcel->getActiveSheet()->getColumnDimension('I')->setWidth(10);
$objPHPExcel->getActiveSheet()->getColumnDimension('J')->setWidth(8);
$objPHPExcel->getActiveSheet()->getColumnDimension('K')->setWidth(8);
$objPHPExcel->getActiveSheet()->getColumnDimension('L')->setWidth(9);
$objPHPExcel->getActiveSheet()->getColumnDimension('M')->setWidth(11);
$objPHPExcel->getActiveSheet()->getColumnDimension('N')->setWidth(12);
$objPHPExcel->getActiveSheet()->getColumnDimension('O')->setWidth(15);
$objPHPExcel->getActiveSheet()->getColumnDimension('P')->setWidth(15);
$objPHPExcel->getActiveSheet()->getColumnDimension('Q')->setWidth(15);
$objPHPExcel->getActiveSheet()->getColumnDimension('R')->setWidth(15);
// Submission from
header( 'Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ) ;
header( 'Content-Disposition: attachment;filename="'.$page_filename.'.xls"' ) ;
header( 'Cache-Control: max-age=0' ) ;
// save to pc
$objWriter->save('php://output') ;
header( "Refresh: 0" ) ;
exit ;
}
?>

BIN
__MACOSX/._MPDF Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
__MACOSX/MPDF/._CREDITS.txt Normal file

Binary file not shown.

Binary file not shown.

BIN
__MACOSX/MPDF/._LICENSE.txt Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._README.txt Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._classes Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._collations Normal file

Binary file not shown.

Binary file not shown.

BIN
__MACOSX/MPDF/._config.php Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
__MACOSX/MPDF/._examples Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._font Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._graph.php Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._graph_cache Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._iccprofiles Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._includes Normal file

Binary file not shown.

Binary file not shown.

BIN
__MACOSX/MPDF/._mpdf.css Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._mpdf.php Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._mpdfi Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._patterns Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._progbar.css Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._qrcode Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._tmp Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._ttfontdata Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._ttfonts Normal file

Binary file not shown.

BIN
__MACOSX/MPDF/._utils Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More