<?php  
if($this->session->userdata('customer')){
   $customer = $this->db->where('c_id', $this->session->userdata('customer'))->get('customer')->result_array();
   $name_cus=explode(" ", $customer[0]['name']);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
    <title>Top Turf Arena</title>

    <!-- Meta Tags -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta name="description" content="">
    <meta name="keywords" content="">

    <link rel="shortcut icon" type="image/x-icon" href="<?php echo base_url(); ?>assets/img/favicon.png">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/bootstrap.min.css">

    <!-- Owl Carousel CSS -->
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/plugins/owl-carousel/owl.carousel.min.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/plugins/owl-carousel/owl.theme.default.min.css">

    <!-- Aos CSS -->
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/plugins/aos/aos.css">

    <!-- Fontawesome CSS -->
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/plugins/fontawesome/css/fontawesome.min.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/plugins/fontawesome/css/all.min.css">

    <!-- Select CSS -->
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/plugins/select2/css/select2.min.css">
    <!-- Fancybox CSS -->
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/jquery.fancybox.min.css">

    <!-- Feathericon CSS -->
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/feather.css">

    <!-- Main CSS -->
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/style.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/site-demos.css">

     <link rel="stylesheet" href="https://code.jquery.com/ui/1.14.1/themes/base/jquery-ui.css">

</head>

<body>
    <!-- Main Wrapper -->
    <div class="main-wrapper">

        <!-- Header -->
        <header class="header header-trans">
            <div class="container">
                <nav class="navbar navbar-expand-lg header-nav">
                    <div class="navbar-header">
                        <a href="<?php echo base_url(); ?>" class="navbar-brand logo">
                            <img src="<?php echo base_url(); ?>assets/img/logo.png" class="img-fluid" alt="Logo">
                        </a>
                    </div>
                    <ul class="nav header-navbar-rht">
                        <li class="nav-item">
                            <?php  
                            if (!$this->session->userdata('user_id')) {
                            ?>
                            <div class="nav-link btn btn-white log-register">
                                <a href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#upcoming-court"><span><i class="feather-users"></i></span>Login</a> / <a href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#cancel-court">Register</a>
                            </div>
                            <?php } else{ 
                            $name=explode(' ', $this->session->userdata('name'));
                            ?>


                    <ul class="nav header-navbar-rht logged-in">
                            <li class="nav-item dropdown has-arrow logged-item">
                                <a href="#" class="dropdown-toggle nav-link" data-bs-toggle="dropdown">
                                    Hi, <?php echo $name['0']; ?>
                                </a>
                                <div class="dropdown-menu dropdown-menu-end">
                                    <p><a href="<?php echo base_url(); ?>profile/">Account</a></p>
                                    <p><a href="<?php echo base_url(); ?>booking/history">Booking History</a></p>
                                    <p><a href="<?php echo base_url(); ?>user/logout/">Logout</a></p>
                                </div>
                            </li>
                        </ul>

                         <?php } ?>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link btn btn-secondary" href="<?php echo base_url(); ?>booking/"><span><i class="feather-check-circle"></i></span>Book Your Game</a>
                        </li>
                    </ul>
                </nav>
            </div>
        </header>
        <!-- /Header -->