<?php
$must_login            = true ;
$require_path          = '../../' ;
$require_sub           = '../' ;
require( $require_sub.'header.php' ) ;

if ( $boolean_login ){
	$status   		   = '200' ;

	$menus       	   = [] ;

	$select            = $mysqli->query( "SELECT a.menu_id, b.title FROM app_menu a
								   		  LEFT JOIN app_menu_translation b ON ( a.menu_id = b.menu_id )
						                  WHERE a.deleted_at IS NULL AND b.lang = '".$array['lang']."' ORDER BY a.sortable" ) ;
	if ( $select->num_rows > 0 ){
		while ( $row   = $select->fetch_assoc() ){
			$row['id']       = dataFilter( $row['menu_id'] ) ;
			$row['title']    = dataFilter( $row['title'] ) ;
			$menus[]         = $row ;
		}
	}


	$data			   = [
		'menus'        => $menus
	] ;
}

require( $require_sub.'footer.php' ) ;
?>