query("SELECT * FROM setting_job_position WHERE job_position_id = '".$page."' LIMIT 1"); if ($mysqli_page->num_rows > 0){ // keep query value in array $row_page = $mysqli_page->fetch_array(MYSQLI_ASSOC) ; $submit_type = 'edit' ; } // update database if ( isset($type) && ( $type == 'new' || $type == 'edit' ) && $_POST['hide'] == 1 ){ if ( $page == '' ){ $mysqli->query("INSERT INTO setting_job_position (created_at) VALUES ('".TODAYDATE."')") ; $page = $mysqli->insert_id ; } // update database $mysqli->query("UPDATE setting_job_position SET job_position_code = '".escapeString($_POST['code'])."', job_position_show_al = '".escapeString($_POST['show_al'])."', updated_at = '".TODAYDATE."' WHERE job_position_id = '".$page."'") ; foreach ( $LANGS as $klang => $vlang ){ $job_position_desc = escapeString( $_POST['job_position_desc_'.$klang] ) ; checkLangUpdate( 'setting_job_position_translation', 'job_position_id', $page, $klang, [ 'job_position_desc' => [ 'type' => 'input', 'value' => $job_position_desc ] ] ) ; } // refresh page $_SESSION['system_result'] = 'success-updated' ; echo ''; exit ; } if ( ( $page_mode == 'new' && !permissionCheck($row_user, 'hr-position-list-new') ) ){ header('Location: index.php') ; exit ; } // start header here include 'requires/page_header.php'; include 'requires/page_top.php'; ?>
'.$lang['thank_you_your_position_has_been_updated'].'
' ; break ; } unset($_SESSION['system_result']) ; } ?>
[ 'type' => 'input', 'title' => $lang['name'] ] ]) ; ?>
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( //'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER, ) ) ; $count = 1 ; $firstChar = 'A' ; $lastChar = 'E' ; // title name $objPHPExcel->getActiveSheet()->mergeCells( $firstChar.$count.':'.$lastChar.$count ) ; $objPHPExcel->getActiveSheet()->getStyle( $firstChar.$count.':'.$lastChar.$count )->applyFromArray( $styleArrayTitle ) ; $objPHPExcel->setActiveSheetIndex(0)->setCellValue( $firstChar.$count, 'Position List' ) ; $count++ ; $setChar = $firstChar ; $objPHPExcel->getActiveSheet()->getStyle($setChar.$count)->applyFromArray( $styleArray ) ; $objPHPExcel->setActiveSheetIndex(0)->setCellValue( $setChar.$count, 'No' ) ; $setChar++ ; $objPHPExcel->setActiveSheetIndex(0)->setCellValue( $setChar.$count, 'Title' ) ; $setChar++ ; $objPHPExcel->setActiveSheetIndex(0)->setCellValue( $setChar.$count, 'Date' ) ; // loop all attendance record $mysqli_page = $mysqli->query($mysqli_query." ORDER BY job_position_id") ; if ( $mysqli_page->num_rows > 0 ){ $count_no = 0 ; while ( $row_page = $mysqli_page->fetch_assoc() ){ $count++ ; $count_no++ ; $setChar = $firstChar ; $objPHPExcel->getActiveSheet()->getStyle($setChar.$count)->applyFromArray( $styleArray ) ; $objPHPExcel->setActiveSheetIndex(0)->setCellValue( $setChar.$count, $count_no ) ; $setChar++ ; $objPHPExcel->setActiveSheetIndex(0)->setCellValue( $setChar.$count, dataFilter($row_page['job_position_desc']) ) ; $setChar++ ; $objPHPExcel->setActiveSheetIndex(0)->setCellValue( $setChar.$count, dataFilter($row_page['created_at']) ) ; } } // 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' ) ; $objWriter->save('php://output') ; header( "Refresh: 0" ) ; exit ; } // load pagination $mysqli_page = $mysqli->query($mysqli_query." ORDER BY a.job_position_id LIMIT $start_from, " . LIMIT) ; $page_pagination = nextPrevious($product_page, LIMIT, $search_url, $mysqli_query) ; // start header here include 'requires/page_header.php' ; include 'requires/page_top.php' ; ?>
search
num_rows > 0){ while ($row_page = $mysqli_page->fetch_array(MYSQLI_ASSOC)){ echo ' '; } }else{ echo ' ' ; } ?>
'.dataFilter($row_page['job_position_desc']).' '.dataFilter($row_page['job_position_code']).' '.resetDateFormat($row_page['created_at']).'
'.$lang['no_data'].'