<?php
// function activate_menu($controller) {
//   $CI = get_instance();
//   $last = $CI->uri->total_segments();
//   $seg = $CI->uri->segment($last);
//   if(is_numeric($seg)) {
//     $seg = $CI->uri->segment($last-1);
//   }
//   if (in_array($controller, array($seg))) {
//       return 'active';
//   } else {
//       return '';   
//   } 
// }
if (!isset($this->session->userdata['session_data'])) {
  $url = base_url() . 'login';
  header("location: $url");
}
?>

<!doctype html>
<html lang="en" data-bs-theme="light">


<!-- Mirrored from codervent.com/matoxi/demo/vertical-menu/index2.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 09 Jan 2024 16:36:45 GMT -->

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Coach</title>
    <!--favicon-->


    <link href="<?php echo base_url(); ?>assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!--plugins-->
    <link href="<?php echo base_url(); ?>assets/plugins/perfect-scrollbar/css/perfect-scrollbar.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/plugins/metismenu/metisMenu.min.css" rel="stylesheet" type="text/css">
    <link href="<?php echo base_url(); ?>assets/plugins/metismenu/mm-vertical.css" rel="stylesheet" type="text/css">
    <link href="<?php echo base_url(); ?>assets/plugins/simplebar/css/simplebar.css" rel="stylesheet">

    <!--bootstrap css-->

    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;600&amp;display=swap"
        rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Material+Icons+Outlined" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/css/bootstrap.min.css" rel="stylesheet">
    <!-- main css -->
    <link href="<?php echo base_url(); ?>assets/css/bootstrap-extended.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/sass/main.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/sass/dark-theme.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/sass/semi-dark.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/sass/bordered-theme.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/sass/responsive.css" rel="stylesheet">
    <!-- fontawesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" />





</head>

<body>

    <!--start header-->
    <header class="top-header">
        <nav class="navbar navbar-expand align-items-center gap-4">
            <div class="p-3  logoDIV LogoR">
                <img src="<?php echo base_url(); ?>assets/images/dplogo.png" alt="" width="150px">
            </div>
            <div class="btn-toggle">
                <a href="javascript:;"><i class="material-icons-outlined">menu</i></a>
            </div>
            <div class="search-bar flex-grow-1">
                <div class="position-relative">



                    <div class="search-popup p-3">
                        <div class="card rounded-4 overflow-hidden">

                            <div class="card-body search-content">








                            </div>

                        </div>
                    </div>
                </div>
            </div>
            <ul class="navbar-nav gap-1 nav-right-links align-items-center">
                <li class="nav-item dropdown d-none">

                    </a>
                    <div class="dropdown-menu dropdown-notify dropdown-menu-end shadow">
                        <div class="notify-list">

                        </div>
                    </div>
                </li>

                <li class="nav-item dropdown">
                    <a href="javascrpt:;" class="dropdown-toggle dropdown-toggle-nocaret" data-bs-toggle="dropdown">
                        <div class="d-flex align-items-center">
                            <div class="me-1">
                                <p class="mb-0 fs2"> <?php if (isset($this->session->userdata['session_data']['name']) && !empty($this->session->userdata['session_data']['name'])): ?>
                                  <?php echo $this->session->userdata['session_data']['name']; ?>
                                    <?php else: ?>
                                    Guest
                                    <?php endif; ?></p>
                                <!-- <p class="text-muted mt-0 fmon text-end mb-0 "> Admin</p> -->
                            </div>
                            <img src="<?php echo isset($this->session->userdata['session_data']['u_image']) ? $this->session->userdata['session_data']['u_image'] : base_url('assets/images/avatars/01.png'); ?>"
                                class="p-1 borderCustom" width="45" height="45" style="border-radius: 50%;" />


                        </div>
                    </a>
                    <div class="dropdown-menu dropdown-user dropdown-menu-end shadow">
                        <a class="dropdown-item gap-2 py-2" href="javascript:;">
                            <div class="text-center">
                                <img src="<?php echo isset($this->session->userdata['session_data']['u_image']) ? $this->session->userdata['session_data']['u_image'] : base_url('assets/images/avatars/01.png'); ?>"
                                    class="p-1 shadow mb-3" width="90" height="90"
                                    alt="<?php echo isset($this->session->userdata['session_data']['name']) ? htmlspecialchars($this->session->userdata['session_data']['name']) : 'Default Avatar'; ?>" />
                                <?php //echo !empty($user->image) ? $user->image : base_url('assets/images/profimage.svg'); 
                                ?>
                                <h5 class="user-name mb-0 fw-bold">
                                    <?php if (isset($this->session->userdata['session_data']['name']) && !empty($this->session->userdata['session_data']['name'])): ?>
                                    <?php echo htmlspecialchars($this->session->userdata['session_data']['name']); ?>
                                    <?php else: ?>
                                    Guest
                                    <?php endif; ?>
                                </h5>
                                <!-- <small class="text-muted mt-0 fmon"> Pharmacy:25dsaf84</small> -->
                            </div>
                        </a>
                        <hr class="dropdown-divider" />
                        <a class="dropdown-item d-flex align-items-center gap-2 py-2"
                            href="<?php echo base_url(); ?>Users/profile"><i
                                class="material-icons-outlined">person_outline</i>Profile</a>

                        <hr class="dropdown-divider" />
                        <a class="dropdown-item d-flex align-items-center gap-2 py-2"
                            href="<?php echo base_url(); ?>login/logout"><i
                                class="material-icons-outlined">power_settings_new</i>Logout</a>
                    </div>
                </li>
            </ul>


        </nav>
    </header>