query("SELECT * FROM formheadcount WHERE formheadcount_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 ){ // update database $mysqli->query( "UPDATE formheadcount SET comment = '".escapeString($_POST['comment'])."', status = '".escapeString($_POST['status'])."' WHERE formheadcount_id = '".$page."'" ) ; if ( $row_page['status'] != $_POST['status'] ){ pushToUserCron( 'formheadcount', $page, $row_page['staff_id'], 'Headcount Requisition', 'Headcount Requisition has been update.' ) ; } // refresh page header("Location:app-form-headcount.php?page_mode=edit&page=".$page."&success=1") ; $_SESSION['system_result'] = 'success-updated' ; exit ; } if ( ( $page_mode == 'new' && !permissionCheck($row_user, 'form-headcount-new') ) || ( $page_mode == 'edit' && !permissionCheck($row_user, 'form-headcount-edit') ) ){ header('Location: app-form-headcount.php') ; exit ; } // get all media $media_list = [] ; $mysqli_media = $mysqli->query( "SELECT file, filetype FROM formheadcount_media WHERE deleted_at IS NULL AND formheadcount_id = '".$page."'" ) ; if ( $mysqli_media->num_rows > 0 ){ while ( $row_media = $mysqli_media->fetch_assoc() ){ $media_list[] = $row_media ; } } // get all staff $staff_list = [] ; $mysqli_staff = $mysqli->query( "SELECT staff_id, staff_name, staff_idno FROM staff WHERE deleted_at IS NULL ".$user_branch_permission_sql) ; if ( $mysqli_staff->num_rows > 0 ){ while ( $row_staff = $mysqli_staff->fetch_assoc() ){ $staff_list[$row_staff['staff_id']] = dataFilter($row_staff['staff_name']) . ' ( ' . dataFilter($row_staff['staff_idno']) . ' )' ; } } // start header here include 'requires/page_header.php'; include 'requires/page_top.php'; ?>
'.$lang['Thank you details has been updated'].'
' ; break ; } unset($_SESSION['system_result']) ; } ?>
Staff
Title
Content
$row_image ){ ?> ' ; break ; default : echo ' ' ; } ?>

Status
Comment
query( $mysqli_query." ORDER BY a.formheadcount_id DESC LIMIT $start_from, " . LIMIT ) ; // load pagination $page_pagination = nextPrevious($product_page, LIMIT, $search_url, $mysqli_query) ; if ( $export_excel == 'export_eae' ){ $page_export_file_name = 'Headcount Requisition Report-'; $array_header_excel = array( 'No.', 'ID', 'Name', 'Subject', 'Status', 'Created Date', 'Updated Date' ) ; $mysqli_export = $mysqli->query( $mysqli_query ) ; if ( $mysqli_export->num_rows > 0 ){ $count_mysqli_export_page = 0; while ( $mysqli_export_page = $mysqli_export->fetch_assoc() ){ $count_mysqli_export_page ++; $array_body_excel[] = array( $count_mysqli_export_page, $mysqli_export_page['staff_idno'], $mysqli_export_page['staff_name'], $mysqli_export_page['title'], $mysqli_export_page['status'], date('Y-m-d', strtotime($mysqli_export_page['created_at'])), date('Y-m-d', strtotime($mysqli_export_page['updated_at'])) ) ; } $count_mysqli_export_page = 0; } include 'export_excel_default.php'; } // start header here include 'requires/page_header.php' ; include 'requires/page_top.php' ; ?>
num_rows > 0){ while ( $row_page = $mysqli_page->fetch_array(MYSQLI_ASSOC) ){ // default variable $id = $row_page['formheadcount_id'] ; echo ' '; } }else{ echo ' ' ; } ?>
' ; if ( permissionCheck($row_user, 'form-formheadcount-edit') ){ echo ' ' ; }else{ echo '-' ; } echo ' '.dataFilter($row_page['staff_name']).' ( '.dataFilter($row_page['staff_idno']).' ) '.dataFilter($row_page['title']).' '.resetDateFormat($row_page['created_at']).' '.resetDateFormat($row_page['updated_at']).' '.resetStatus($row_page['status']).'
'.$lang['no_data'].'