<?php 
$userinfo=array();

$sessiondata=$this->session->userdata['session_data'];

$userdata=$this->common->readdatadocument("Users",$sessiondata['userId']);
echo "<pre>";
print_r($userdata);
echo "</pre>";
?>

<header class="top-header">
        <nav class="navbar navbar-expand align-items-center gap-4">
            <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">
                    <input class="form-control rounded-0 px-5 search-control d-lg-block  searchInput" type="text"
                        placeholder="Search">
                    <span
                        class="material-icons-outlined position-absolute d-lg-block d-none ms-3 translate-middle-y start-0 top-50">search</span>
                    <span
                        class="material-icons-outlined position-absolute me-3 translate-middle-y end-0 top-50 search-close">close</span>
                    <div class="search-popup p-3">
                        <div class="card rounded-4 overflow-hidden">
                            <div class="card-header d-lg-none">
                                <div class="position-relative">
                                    <input id="searchInput" class="searchInput form-control rounded-5 px-5 mobile-search-control" type="text"
                                        placeholder="Search">
                                    <span
                                        class="material-icons-outlined position-absolute ms-3 translate-middle-y start-0 top-50">search</span>
                                    <span
                                        class="material-icons-outlined position-absolute me-3 translate-middle-y end-0 top-50 mobile-search-close">close</span>
                                </div>
                            </div>
                            <div class="card-body search-content">
                               
                                <p class="search-title">Members</p>

                                <div class="search-list d-flex flex-column gap-2" id="searchResults">
                                 <!--
                                   <div class="search-list-item d-flex align-items-center gap-3">
                                        <div class="memmber-img">
                                            <img src="assets/images/avatars/01.png" width="32" height="32"
                                                class="rounded-circle" alt="">
                                        </div>
                                        <div class="">
                                            <h5 class="mb-0 search-list-title ">Andrew Stark</h5>
                                        </div>
                                    </div>
-->

                                </div>

                            </div>
                            <div class="card-footer text-center bg-transparent" style="display:none;">
                                <a href="javascript:;" class="btn w-100">See All Search Results</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <ul class="navbar-nav gap-1 nav-right-links align-items-center">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle dropdown-toggle-nocaret position-relative"
                        data-bs-auto-close="outside" data-bs-toggle="dropdown" href="javascript:;"><i
                            class="material-icons-outlined">notifications</i>
                        <span class="badge-notify" id="notification_no"></span>
                    </a>
                    <div class="dropdown-menu dropdown-notify dropdown-menu-end shadow">
                        <div class="px-3 py-1 d-flex align-items-center justify-content-between border-bottom">
                            <h5 class="notiy-title mb-0">Notifications</h5>
                          
                        </div>
                        <div class="notify-list">
                        
                       
                           
                            <div id="notificationsDiv">
                                <a class="dropdown-item border-bottom py-2" href="javascript:;">
                                    <div class="d-flex align-items-center gap-3">
                                        <div class="">
                                            <img src="<?php echo base_url('assets/images/apps/14.png'); ?>"
                                                class="rounded-circle" width="45" height="45" alt="" />

                                        </div>
                                        <div class="">
                                            <h5 class="notify-title">New Order Recived</h5>
                                            <p class="mb-0 notify-desc">
                                                Recived new order from michle
                                            </p>
                                            <p class="mb-0 notify-time">2:15 AM</p>
                                        </div>
                                        <div style="display:none;" class="notify-close position-absolute end-0 me-3">
                                            <i class="material-icons-outlined fs-6">close</i>
                                        </div>
                                    </div>
                                </a>
                            </div>
                     
                           
                        </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">
                        <?php if($userdata['image']==""){ ?>
                            <img src="<?php echo base_url('assets/images/avatars/01.png'); ?>" class="p-1 borderCustom"
                                width="45" height="45" />
                                <?php }else{ ?>

                                <img src="<?php echo $userdata['image']; ?>" class="p-1 borderCustom"
                                width="45" height="45" />
                                <?php } ?> 

                            <div class="ms-1">
                                <p class="mb-0 fs2"><?php echo $userdata['firstName']." ".$userdata['lastName'] ?></p>
                                <small class="text-muted mt-0 fmon">Doctor</small>
                            </div>
                            
                            <img class="mx-4" src="<?php echo base_url('assets/images/megaIcons/select.png'); ?>" alt=""
                                width="10" height="10">
                            
                        </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">
                            <?php if($userdata['image']==""){ ?>
                                <img src="<?php echo base_url('assets/images/avatars/01.png'); ?>"
                                    class="p-1 shadow mb-3" width="90" height="90" alt="" />
                                    <?php }else{ ?>
                                        <img src="<?php echo $userdata['image']; ?>"
                                    class="p-1 shadow mb-3" width="90" height="90" alt="" />
                         
                                        <?php } ?>  

                                <h5 class="user-name mb-0 fw-bold"><?php echo $userdata['firstName']." ".$userdata['lastName'] ?></h5>
                                <small class="text-muted mt-0 fmon"> Doctor</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().'dashboard/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>
            <!-- <ul class="navbar-nav gap-1 nav-right-links align-items-center">
        
      
       
        
     
        <li class="nav-item dropdown">
          <a href="javascrpt:;" class="dropdown-toggle dropdown-toggle-nocaret" data-bs-toggle="dropdown">
           <div class="d-flex items-center">
            <img src="assets/images/avatars/01.png" class=" p-1 border" width="45" height="45">
            <div class="ms-1">
              <p class="mb-0 fs2">Eleanor Pena </p>
              <small class="text-muted mt-0 fmon"> Pharmacy:25dsaf84</small>
            </div>
           </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="assets/images/avatars/01.png" class=" p-1 shadow mb-3" width="90" height="90"
                  alt="">
                <h5 class="user-name mb-0 fw-bold">Hello, Jhon</h5>
              </div>
            </a>
            <hr class="dropdown-divider">
            <a class="dropdown-item d-flex align-items-center gap-2 py-2" href="javascript:;"><i
              class="material-icons-outlined">person_outline</i>Profile</a>
            <a class="dropdown-item d-flex align-items-center gap-2 py-2" href="javascript:;"><i
              class="material-icons-outlined">local_bar</i>Setting</a>
            <a class="dropdown-item d-flex align-items-center gap-2 py-2" href="javascript:;"><i
              class="material-icons-outlined">dashboard</i>Dashboard</a>
            <a class="dropdown-item d-flex align-items-center gap-2 py-2" href="javascript:;"><i
              class="material-icons-outlined">account_balance</i>Earning</a>
              <a class="dropdown-item d-flex align-items-center gap-2 py-2" href="javascript:;"><i
                class="material-icons-outlined">cloud_download</i>Downloads</a>
            <hr class="dropdown-divider">
            <a class="dropdown-item d-flex align-items-center gap-2 py-2" href="javascript:;"><i
            class="material-icons-outlined">power_settings_new</i>Logout</a>
          </div>
        </li>
      </ul> -->

        </nav>
    </header>
