31 lines
848 B
PHP
31 lines
848 B
PHP
<?php
|
|
$must_login = true ;
|
|
$require_path = '../../../' ;
|
|
$require_sub = '../../' ;
|
|
require( $require_sub.'header.php' ) ;
|
|
|
|
if ( $boolean_login ){
|
|
$status = '201' ;
|
|
|
|
$query = "SELECT branch_id, branch_name, branch_hq FROM branch
|
|
WHERE deleted_at IS NULL " ;
|
|
$mysqli_query = $mysqli->query( $query ) ;
|
|
|
|
if ( $mysqli_query->num_rows > 0 ){
|
|
|
|
$status = '200' ;
|
|
|
|
$list = [] ;
|
|
while ( $row = $mysqli_query->fetch_assoc() ){
|
|
$row['branch_name'] = dataFilter( $row['branch_name'] ) ;
|
|
$row['branch_hq'] = ( $row['branch_hq'] != '' ? $row['branch_hq'] : '0' ) ;
|
|
$list[] = $row ;
|
|
}
|
|
|
|
$data['list'] = $list ;
|
|
|
|
}
|
|
}
|
|
|
|
require( $require_sub.'footer.php' ) ;
|
|
?>
|