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
+25
View File
@@ -0,0 +1,25 @@
<?php
$must_login = true ;
$require_path = '../../../' ;
$require_sub = '../../' ;
require( $require_sub.'header.php' ) ;
if ( $boolean_login ){
$status = '258' ;
$query = "SELECT request_id, is_main, type, title, description, quantity, date_from, date_to, reason, content, comment, status, status, created_at, updated_at FROM request
WHERE deleted_at IS NULL AND request_id = '".$array['request_id']."' AND date_from >= '".TODAYDATE."'" ;
$mysqli_query = $mysqli->query( $query . " LIMIT 1" ) ;
if ( $mysqli_query->num_rows > 0 ){
$status = '200' ;
$mysqli->query( "UPDATE request SET
status = 'cancelled'
WHERE request_id = '".$array['request_id']."'" ) ;
}
}
require( $require_sub.'footer.php' ) ;
?>
+32
View File
@@ -0,0 +1,32 @@
<?php
$must_login = true ;
$require_path = '../../../' ;
$require_sub = '../../' ;
require( $require_sub.'header.php' ) ;
if ( $boolean_login ){
$status = '201' ;
$search_query = '' ;
$search_query .= " AND request_id = '".$array['id']."'" ;
$query = "SELECT request_id, title, content, status, created_at FROM request
WHERE deleted_at IS NULL " . $search_query ;
$mysqli_query = $mysqli->query( $query . " ORDER BY created_at DESC LIMIT " . getLimit( $current ) ) ;
if ( $mysqli_query->num_rows > 0 ){
$status = '200' ;
$row = $mysqli_query->fetch_assoc() ;
$row['id'] = dataFilter( $row['request_id'] ) ;
$row['title'] = dataFilter( $row['title'] ) ;
$row['content'] = dataFilter( $row['content'] ) ;
$row['created_at'] = dataFilter( $row['created_at'] ) ;
$data['list'] = $row ;
}
}
require( $require_sub.'footer.php' ) ;
?>
+46
View File
@@ -0,0 +1,46 @@
<?php
$must_login = true ;
$require_path = '../../../' ;
$require_sub = '../../' ;
require( $require_sub.'header.php' ) ;
if ( $boolean_login ){
$status = '201' ;
$join_filter = '' ;
$join_query = '' ;
$query_sortable = 'ORDER BY created_at DESC' ;
$search_query = '' ;
switch ( $array['filter'] ){
case 'myself' :
$search_query .= " AND staff_id = '".$staff_info['staff_id']."'" ;
break ;
case 'group' :
$search_query .= " AND branch_id = '".$array['branch_id']."' AND status = 'confirmed'" ;
break ;
}
$query = "SELECT title, file, filetype, status, created_at FROM request_gallery
WHERE deleted_at IS NULL AND branch_id = '".$array['branch_id']."' " . $search_query ;
$mysqli_query = $mysqli->query( $query . " ".$query_sortable." LIMIT " . getLimit( $current ) ) ;
if ( $mysqli_query->num_rows > 0 ){
$status = '200' ;
$list = [] ;
while ( $row = $mysqli_query->fetch_assoc() ){
$row['date'] = resetDateFormat( $row['created_at'] ) ;
$row['time'] = resetTimeFormat( $row['created_at'] ) ;
$row['file'] = ( $row['file'] != '' ? PATH.'uploads/RequestGallery/b/'.$row['file'] : '' ) ;
$list[] = $row ;
}
$data['list'] = $list ;
}
}
require( $require_sub.'footer.php' ) ;
?>
@@ -0,0 +1,35 @@
<?php
$must_login = true ;
$require_path = '../../../' ;
$require_sub = '../../' ;
require( $require_sub.'header.php' ) ;
if ( $boolean_login ){
$status = '300' ;
$title = $array['title'] ;
$photos = $array['photos'] ;
if ( $title != '' && $array['photos'] != '' && count( $photos ) > 0 ){
if ( checkExists($photos) ){
foreach ( $photos as $k => $v ){
if ( $v['type'] == 'local' ){
$file_upload = ( $v['file'] ) ;
$upload = uploadImage( 'RequestGallery', time(), $file_upload ) ;
if ( $upload['status'] != '200' ){
$count_upload++ ;
}else{
$mysqli->query( "INSERT INTO request_gallery
( branch_id, staff_id, title, file, filetype ) VALUES
( '".$array['branch_id']."', '".$staff_info['staff_id']."', '".$title."', '".$upload['data']['file_name']."', '".$upload['data']['file_type']."' )" ) ;
$status = '200' ;
}
}
}
}
}
}
require( $require_sub.'footer.php' ) ;
?>
+87
View File
@@ -0,0 +1,87 @@
<?php
$must_login = true ;
$require_path = '../../../' ;
$require_sub = '../../' ;
require( $require_sub.'header.php' ) ;
if ( $boolean_login ){
$status = '201' ;
// select all department
$department_list = [] ;
$select = $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 = '".$array['lang']."'" ) ;
if ( $select->num_rows > 0 ){
while ( $row = $select->fetch_assoc() ){
$department_list[$row['department_id']] = $row['department_desc'] ;
}
}
$search_query = "" ;
if ( $array['search'] != '' ){
$search_query .= " AND title LIKE '%".$array['search']."%'" ;
}
$query = "SELECT request_id, staff_id, is_main, main_id, sub_id, type, title, description, reason, date_from, date_to, status, created_at FROM request
WHERE deleted_at IS NULL AND branch_id = '".$array['branch_id']."' AND staff_id = '".$staff_info['staff_id']."' " . $search_query ;
$mysqli_query = $mysqli->query( $query . " ORDER BY created_at DESC LIMIT " . getLimit( $current ) ) ;
if ( $mysqli_query->num_rows > 0 ){
$status = '200' ;
$list = [] ;
$staff_list = [] ;
$request_id = [] ;
while ( $row = $mysqli_query->fetch_assoc() ){
$row['id'] = dataFilter( $row['request_id'] ) ;
$row['title'] = dataFilter( $row['title'] ) ;
$row['description'] = dataFilter( $row['description'] ) ;
$row['request_date'] = ( $row['date_from'] != '' ? date( "Y-m-d", strtotime( $row['date_from'] ) ) : '' ) ;
$row['time_from'] = date( 'H:ia', strtotime( $row['date_from'] ) ) ;
$row['time_to'] = date( 'H:ia', strtotime( $row['date_to'] ) ) ;
$row['departments'] = '' ;
$row['created_at'] = resetDateFormat( $row['created_at'] ) ;
$list[] = $row ;
$staff_list[$row['staff_id']] = $row['staff_id'] ;
$request_id[$row['request_id']] = $row['request_id'] ;
}
// select related request media
$media_list = [] ;
$select_media = $mysqli->query( "SELECT request_id, file FROM request_media a
WHERE a.deleted_at IS NULL AND request_id IN ( ".implode( ',', $request_id )." )" ) ;
if ( $select_media->num_rows > 0 ){
while ( $row_media = $select_media->fetch_assoc() ){
$media_list[$row_media['request_id']][] = ( $row_media['file'] != '' ? PATH.'uploads/Request/b/'.$row_media['file'] : '' ) ;
}
}
// select all staff related deparment
$related_list = [] ;
$select_related = $mysqli->query( "SELECT staff_id, department_id FROM staff_department a
WHERE a.deleted_at IS NULL AND staff_id IN ( ".implode( ',', $staff_list )." )" ) ;
if ( $select_related->num_rows > 0 ){
while ( $row_related = $select_related->fetch_assoc() ){
if ( checkExists( $department_list[$row_related['department_id']] ) ){
$related_list[$row_related['staff_id']][] = $department_list[$row_related['department_id']] ;
}
}
}
foreach ( $list as $k => $v ){
$list[$k]['departments'] = ( checkExists( $related_list[$v['staff_id']] ) ? implode( ', ', $related_list[$v['staff_id']] ) : '' ) ;
$list[$k]['files'] = ( checkExists( $media_list[$v['request_id']] ) ? $media_list[$v['request_id']] : [] ) ;
}
$data['list'] = $list ;
}
}
require( $require_sub.'footer.php' ) ;
?>
+39
View File
@@ -0,0 +1,39 @@
<?php
$must_login = true ;
$require_path = '../../../' ;
$require_sub = '../../' ;
require( $require_sub.'header.php' ) ;
if ( $boolean_login ){
$status = '201' ;
$search_query = '' ;
if ( $array['search'] != '' ){
$search_query .= " AND b.title LIKE '%".$array['search']."%'" ;
}
$query = "SELECT a.main_id, a.is_main, a.type, a.file, a.created_at, b.title, b.description FROM setting_request a
LEFT JOIN setting_request_translation b ON ( a.main_id = b.main_id )
WHERE a.deleted_at IS NULL AND b.lang = '".$array['lang']."' AND a.branch LIKE '%/".$array['branch_id']."/%' " . $search_query ;
$mysqli_query = $mysqli->query( $query . " ORDER BY a.sortable ASC, a.created_at ASC LIMIT " . getLimit( $current ) ) ;
if ( $mysqli_query->num_rows > 0 ){
$status = '200' ;
$list = [] ;
while ( $row = $mysqli_query->fetch_assoc() ){
$row['main_id'] = dataFilter( $row['main_id'] ) ;
$row['title'] = dataFilter( $row['title'] ) ;
$row['description'] = dataFilter( $row['description'] ) ;
$row['file'] = ( $row['file'] != '' ? PATH.'uploads/Request/b/'.$row['file'] : '' ) ;
$list[] = $row ;
}
$data['list'] = $list ;
}
}
require( $require_sub.'footer.php' ) ;
?>
+67
View File
@@ -0,0 +1,67 @@
<?php
$must_login = true ;
$require_path = '../../../' ;
$require_sub = '../../' ;
require( $require_sub.'header.php' ) ;
if ( $boolean_login ){
$status = '201' ;
$search_query = '' ;
$search_query .= " AND a.request_id = '".$array['request_id']."' AND a.staff_id = '".$staff_info['staff_id']."'" ;
$query = "SELECT * FROM request a
WHERE a.deleted_at IS NULL " . $search_query ;
$mysqli_query = $mysqli->query( $query ) ;
if ( $mysqli_query->num_rows > 0 ){
$status = '299' ;
$row = $mysqli_query->fetch_assoc() ;
if ( $row['status'] == 'awaiting-collection' ){
$status = '200' ;
$mysqli->query( "UPDATE request SET
status = 'confirmed'
WHERE request_id = '".$array['request_id']."'" ) ;
// get last movment
$updateremark = 'Stock deduct from so number ' . $row['request_so'] ;
$updatequantity = -($row['quantity']) ;
if ( ( $updatequantity < 0 || $updatequantity > 0) && $updatequantity != '' ){
$before = 0 ;
$main_id = $row['main_id'] ;
$sub_id = $row['sub_id'] ;
if ( $sub_id > 0 ){
$main_id = 0 ;
}
// get last movment
$mysqli_select = $mysqli->query( "SELECT balance FROM setting_request_movement
WHERE deleted_at IS NULL AND main_id = '".$main_id."' AND sub_id = '".$sub_id."'
ORDER BY movement_id DESC
LIMIT 1" ) ;
if ( $mysqli_select->num_rows > 0 ){
$row_select = $mysqli_select->fetch_assoc() ;
$before = $row_select['balance'] ;
}
$quantity = $updatequantity ;
$balance = ( $before + $quantity ) ;
$mysqli->query( "INSERT INTO setting_request_movement
( main_id, sub_id, before_quantity, quantity, balance, remark ) VALUES
( '".$main_id."', '".$sub_id."', '".$before."', '".$quantity."', '".$balance."', '".$updateremark."' )" ) ;
}
}
}
}
require( $require_sub.'footer.php' ) ;
?>
@@ -0,0 +1,80 @@
<?php
$must_login = true ;
$require_path = '../../../' ;
$require_sub = '../../' ;
require( $require_sub.'header.php' ) ;
if ( $boolean_login ){
$status = '201' ;
$main_id = $array['main_id'] ;
$sub_id = $array['sub_id'] ;
$searchyearmonth = $array['searchyearmonth'] ;
$searchday = $array['searchday'] ;
$searchday = ( $searchday != '' ? $searchday : date( 'd', time() ) ) ;
$searchyearmonthday = $searchyearmonth . '-' . $searchday ;
$list = [] ;
$selected = [] ;
$marked = [] ;
$search_query = '' ;
$search_query .= " AND ( a.date_from LIKE '%".$searchyearmonth."%' OR a.date_to LIKE '%".$searchyearmonth."%' )" ;
$query = "SELECT a.request_id, a.staff_id, a.is_main, a.main_id, a.sub_id, a.type, a.title, a.description, a.reason, a.date_from, a.date_to, a.status, a.created_at, b.staff_idno, b.staff_name, b.staff_shortname FROM request a
LEFT JOIN staff b ON ( a.staff_id = b.staff_id )
WHERE a.deleted_at IS NULL AND a.branch_id = '".$array['branch_id']."' AND a.main_id = '".$main_id."' AND a.sub_id = '".$sub_id."' AND a.type = 'reservation' AND a.status IN ( 'confirmed' ) " . $search_query ;
$mysqli_query = $mysqli->query( $query . " ORDER BY a.date_from" ) ;
if ( $mysqli_query->num_rows > 0 ){
$status = '200' ;
while ( $row = $mysqli_query->fetch_assoc() ){
$boolean_loop = true ;
$date_from = date( 'Y-m-d', strtotime( $row['date_from'] ) ) ;
$date_to = date( 'Y-m-d', strtotime( $row['date_to'] ) ) ;
$loop_date_from = $date_from ;
$loop_date_to = $date_to ;
while ( $boolean_loop ){
if ( $loop_date_from <= $loop_date_to ){
$selected[$loop_date_from] = $loop_date_from ;
}else{
$boolean_loop = false ;
}
$loop_date_from = date('Y-m-d', strtotime("+1 day", strtotime($loop_date_from))) ;
}
if ( $date_from <= $searchyearmonthday && $date_to >= $searchyearmonthday ){
$row['title'] = dataFilter( $row['title'] ) ;
$row['description'] = dataFilter( $row['description'] ) ;
$row['reason'] = dataFilter( $row['reason'] ) ;
$row['request_date'] = ( $row['date_from'] != '' ? date( "Y-m-d", strtotime( $row['date_from'] ) ) : '' ) ;
$row['time_from'] = date( 'h:ia', strtotime( $row['date_from'] ) ) ;
$row['time_to'] = date( 'h:ia', strtotime( $row['date_to'] ) ) ;
$list[] = $row ;
}
}
}
$first_day_of_month = $searchyearmonth . '-01' ;
$last_day_of_month = $searchyearmonth . '-' . date( 't', strtotime( $first_day_of_month ) ) ;
for ( $a = $first_day_of_month ; $a <= $last_day_of_month ; $a++ ){
if ( $selected[$a] != null ){
$marked[$a] = [ 'marked' => true, 'dotColor' => '#ff9500' ] ;
}
}
$data['yearmonthday'] = $searchyearmonthday ;
$data['list'] = $list ;
$data['marked'] = $marked ;
}
require( $require_sub.'footer.php' ) ;
?>
+55
View File
@@ -0,0 +1,55 @@
<?php
$must_login = true ;
$require_path = '../../../' ;
$require_sub = '../../' ;
require( $require_sub.'header.php' ) ;
if ( $boolean_login ){
$status = '201' ;
$search_query = '' ;
$search_query .= " AND request_id = '".$array['request_id']."'" ;
$query = "SELECT request_id, is_main, type, title, description, quantity, size, date_from, date_to, reason, content, comment, status, status, created_at, updated_at FROM request
WHERE deleted_at IS NULL " . $search_query ;
$mysqli_query = $mysqli->query( $query . " LIMIT 1" ) ;
if ( $mysqli_query->num_rows > 0 ){
$status = '200' ;
$list = [] ;
$row = $mysqli_query->fetch_assoc() ;
$row['title'] = dataFilter( $row['title'] ) ;
$row['description'] = dataFilter( $row['description'] ) ;
$row['date_from'] = dataFilter( $row['date_from'] ) ;
$row['date_to'] = dataFilter( $row['date_to'] ) ;
$row['time_from'] = date( 'H:ia', strtotime( $row['date_from'] ) ) ;
$row['time_to'] = date( 'H:ia', strtotime( $row['date_to'] ) ) ;
$row['reason'] = dataFilter( $row['reason'] ) ;
$row['content'] = dataFilter( $row['content'] ) ;
$row['comment'] = dataFilter( $row['comment'] ) ;
// get all media
$select_media = $mysqli->query( "SELECT media_id, file FROM request_media
WHERE deleted_at IS NULL AND request_id = '".$array['request_id']."'" ) ;
$photos = [] ;
if ( $select_media->num_rows > 0 ){
while ( $row_media = $select_media->fetch_assoc() ){
$photos[] = [
'media_id' => $row_media['media_id'],
'type' => 'online',
'file' => ( $row_media['file'] != '' ? PATH.'uploads/Request/b/'.$row_media['file'] : '' )
] ;
}
}
$row['photos'] = $photos ;
$data = $row ;
}
}
require( $require_sub.'footer.php' ) ;
?>
+40
View File
@@ -0,0 +1,40 @@
<?php
$must_login = true ;
$require_path = '../../../' ;
$require_sub = '../../' ;
require( $require_sub.'header.php' ) ;
if ( $boolean_login ){
$status = '201' ;
$search_query = " AND a.main_id = '".$array['main_id']."'" ;
if ( $array['search'] != '' ){
$search_query .= " AND b.title LIKE '%".$array['search']."%'" ;
}
$query = "SELECT a.sub_id, a.main_id, a.type, a.file, a.created_at, b.title, b.description FROM setting_request_sub a
LEFT JOIN setting_request_sub_translation b ON ( a.sub_id = b.sub_id )
WHERE a.deleted_at IS NULL AND b.lang = '".$array['lang']."' AND a.branch LIKE '%/".$array['branch_id']."/%' " . $search_query ;
$mysqli_query = $mysqli->query( $query . " ORDER BY a.sortable ASC, a.created_at ASC LIMIT " . getLimit( $current ) ) ;
if ( $mysqli_query->num_rows > 0 ){
$status = '200' ;
$list = [] ;
while ( $row = $mysqli_query->fetch_assoc() ){
$row['main_id'] = dataFilter( $row['main_id'] ) ;
$row['sub_id'] = dataFilter( $row['sub_id'] ) ;
$row['title'] = dataFilter( $row['title'] ) ;
$row['description'] = dataFilter( $row['description'] ) ;
$row['file'] = ( $row['file'] != '' ? PATH.'uploads/Request/b/'.$row['file'] : '' ) ;
$list[] = $row ;
}
$data['list'] = $list ;
}
}
require( $require_sub.'footer.php' ) ;
?>
+167
View File
@@ -0,0 +1,167 @@
<?php
$must_login = true ;
$require_path = '../../../' ;
$require_sub = '../../' ;
require( $require_path.'extensions/mailer.php' ) ;
require( $require_sub.'header.php' ) ;
if ( $boolean_login ){
$status = '201' ;
$request_id = $array['request_id'] ;
$photos = $array['photos'] ;
$request_date = $array['request_date'] ;
$time_from = $array['time_from'] ;
$time_to = $array['time_to'] ;
$date_from = $request_date . ' ' . $time_from ;
$date_to = $request_date . ' ' . $time_to ;
$title = $array['title'] ;
switch ( $array['request_type'] ){
case 'item' :
case 'item-size' :
if ( $array['is_main'] == 'no' ){
$title = $array['request_title'] ;
}
break ;
case 'reservation' :
$title = $array['request_title'] ;
break ;
}
// check if main / sub exsits
$boolean_exists = false ;
$descrition = '' ;
if ( $array['sub_id'] != '' && $array['sub_id'] > 0 ){
$select_sub = $mysqli->query( "SELECT b.title, b.description FROM setting_request_sub a
LEFT JOIN setting_request_sub_translation b ON ( a.sub_id = b.sub_id )
WHERE a.deleted_at IS NULL AND a.sub_id = '".$array['sub_id']."' AND b.lang = '".$array['lang']."' " ) ;
if ( $select_sub->num_rows > 0 ){
$boolean_exists = true ;
$row_sub = $select_sub->fetch_assoc() ;
$descrition = $row_sub['description'] ;
}
}else{
$select_main = $mysqli->query( "SELECT b.title, b.description FROM setting_request a
LEFT JOIN setting_request_translation b ON ( a.main_id = b.main_id )
WHERE a.deleted_at IS NULL AND a.main_id = '".$array['main_id']."' AND b.lang = '".$array['lang']."' " ) ;
if ( $select_main->num_rows > 0 ){
$boolean_exists = true ;
$row_main = $select_main->fetch_assoc() ;
$descrition = $row_main['description'] ;
}
}
if ( $boolean_exists ){
$status = '300' ;
$is_upload_photo = false ;
$is_submit = false ;
$is_default_status = '' ;
if ( $array['request_type'] == 'reservation' ){
if ( $title != '' && $array['reason'] != '' && $request_date != '' && $time_from != '' && $time_to != '' ){
$status = '295' ;
if ( $date_to >= $date_from ){
$status = '259' ;
$select_record = $mysqli->query( "SELECT request_id FROM request
WHERE deleted_at IS NULL AND type = 'reservation' AND main_id = '".$array['main_id']."' AND sub_id = '".$array['sub_id']."' AND status = 'confirmed' AND (
( date_from >= '".$date_from."' AND date_from < '".$date_to."' ) OR
( date_to > '".$date_from."' AND date_to < '".$date_to."' ) OR
( '".$date_from."' >= date_from AND '".$date_from."' < date_to ) OR
( '".$date_to."' > date_from AND '".$date_to."' < date_to )
) LIMIT 1" ) ;
if ( $select_record->num_rows == 0 ){
$is_upload_photo = false ;
$is_submit = true ;
$is_default_status = 'confirmed' ;
}
}
}
}else{
if ( $title != '' && $array['reason'] != '' && $array['photos'] != '' && count( $photos ) > 0 ){
$is_upload_photo = true ;
$is_submit = true ;
$is_default_status = 'pending' ;
}
}
if ( $is_submit ){
$status = '203' ;
if ( $mysqli->query( "INSERT INTO request
( `main_id`, `sub_id`, `branch_id`, `staff_id`, `is_main`, `type`, `title`, `description`, `quantity`, `size`, `reason`, `date_from`, `date_to`, `content`, `status` ) VALUES
( '".$array['main_id']."', '".$array['sub_id']."', '".$array['branch_id']."', '".$staff_info['staff_id']."', '".$array['is_main']."', '".$array['request_type']."', '".$title."', '".$descrition."', '".$array['quantity']."', '".$array['size']."', '".$array['reason']."', '".$date_from."', '".$date_to."', '".$array['content']."', '".$is_default_status."' )" ) ){
$status = '200' ;
$boolean_submit = true ;
$request_id = $mysqli->insert_id ;
$request_so = 'RQ'.strPad( 6, $request_id ) ;
$mysqli->query( "UPDATE request SET
request_so = '".$request_so."'
WHERE request_id = '".$request_id."'" ) ;
if ( $is_upload_photo ){
if ( checkExists($photos) ){
foreach ( $photos as $k => $v ){
if ( $v['type'] == 'local' ){
$file_upload = ( $v['file'] ) ;
$upload = uploadImage( 'Request', $request_id.'-'.$request_id, $file_upload ) ;
if ( $upload['status'] != '200' ){
$count_upload++ ;
}else{
$mysqli->query( "INSERT INTO request_media
( request_id, file, filetype ) VALUES
( '".$request_id."', '".$upload['data']['file_name']."', '".$upload['data']['file_type']."' )" ) ;
$status = '200' ;
}
}
}
}
}
// send email to hr
$branch_hr_contact = '' ;
$branch_hr_email = '' ;
$branch_hr_cc = [] ;
$branch_email_footer = '' ;
$mysqli_query = "SELECT branch_hr_email, branch_hr_cc, branch_hr_contact, branch_email_footer FROM branch WHERE
deleted_at IS NULL AND branch_id = '".$array['branch_id']."' LIMIT 1" ;
$mysqli_branch = $mysqli->query($mysqli_query) ;
if ( $mysqli_branch->num_rows > 0 ){
$row_branch = $mysqli_branch->fetch_assoc() ;
$branch_hr_contact = dataFilter( $row_branch['branch_hr_contact'] ) ;
$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'] ) ) ;
}
$mailer = new Mailer() ;
$mailer->from = $branch_hr_email ;
$mailer->fromname = COMPANY ;
$mailer->to = [ $branch_hr_email ] ;
if ( count($branch_hr_cc) > 0 ){
$mailer->cc = $branch_hr_cc ;
}
$mailer->subject = 'Item Request' ;
$mailer->body = 'Dear HR, staff request new item, kindly review and update it. <br /><br />by ' . COMPANY . '!' . $branch_email_footer ; ;
$mailer->send() ;
}
}
}
}
require( $require_sub.'footer.php' ) ;
?>