$vv ){ $mysqli->query( "UPDATE association_gallery SET status = '".$update_status."' WHERE gallery_id = '".$kk."'" ) ; if ( $update_status == 'rejected' ){ pushToUserCron( 'association_gallery', $kk, $vv, 'Association Gallery', 'Association gallery has been reject.' ) ; }else{ pushToUserCron( 'association_gallery', $kk, $vv, 'Association Gallery', 'Association gallery has been update.' ) ; } } header( "Refresh: 0;" ) ; exit ; } //query $search_query = '' ; $search_name = escapeString($_GET['search_name']) ; $search_idno = escapeString($_GET['search_idno']) ; $search_status = escapeString($_GET['search_status']) ; $search_date = ( $_GET['search_date'] != '' ? date('Y-m-d', strtotime($_GET['search_date'])) : '' ) ; $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_status != ''){ $search_query .= " AND a.status = '".$search_status."'" ; } if ( $search_date != '' ){ $search_query .= " AND a.created_at LIKE '%".$search_date."%'" ; } // related staff // 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 // set search url $search_url = 'search_name='.$search_name.'&search_idno='.$search_idno.'&search_status='.$search_status.'&search_date='.$search_date ; // page query $mysqli_query = "SELECT a.gallery_id, a.title, a.file, a.status, a.created_at, a.updated_at, b.staff_id, b.staff_idno, b.staff_name FROM association_gallery a LEFT JOIN staff b ON ( a.staff_id = b.staff_id ) WHERE a.deleted_at IS NULL " . $search_query . $user_branch_permission_sql_b ; $mysqli_list = $mysqli->query( $mysqli_query." ORDER BY a.gallery_id DESC LIMIT $start_from, " . LIMIT ) ; // load pagination $page_pagination = nextPrevious( $product_page, LIMIT, $search_url, $mysqli_query ) ; // start header here include 'requires/page_header.php'; include 'requires/page_top.php'; ?>
Join Staff
num_rows > 0 ){ while ( $row_list = $mysqli_list->fetch_assoc() ){ $image = ( $row_list['file'] != '' ? PATH.'uploads/AssociationGallery/'.dataFilter($row_list['file']) : '' ) ; echo ' '; } }else{ echo ''; } ?>
Action Image Staff ID Title Status Created At Updated At
' ; if ( $row_list['status'] == 'pending' ){ echo '
' ; } echo '
'.( $image != '' ? '' : '' ).' '.dataFilter($row_list['staff_name']).' ( '.dataFilter($row_list['staff_idno']).' ) '.dataFilter($row_list['title']).' '.resetStatus($row_list['status']).' '.resetDateFormat($row_list['created_at']).' '.resetDateFormat($row_list['updated_at']).'
No data.