<?php

$sessiondata = isset($this->session->userdata['session_data']) ? $this->session->userdata['session_data'] : array();
$userid = isset($sessiondata['userId']) ? $sessiondata['userId'] : '';
$admin = array();
if ($userid !== '') {
	$doc = $this->common->readdatadocument("users", $userid);
	if (!is_array($doc) || empty($doc)) {
		$doc = $this->common->readdatadocument("user", $userid);
	}
	if (is_array($doc)) {
		$admin = $doc;
	}
}
$adminName = '';
if (!empty($admin['name'])) {
	$adminName = $admin['name'];
} elseif (!empty($admin['userName'])) {
	$adminName = $admin['userName'];
} elseif (!empty($sessiondata['name'])) {
	$adminName = $sessiondata['name'];
} else {
	$adminName = 'Admin';
}
$adminImage = !empty($admin['image']) ? $admin['image'] : '';

?>
<!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><?php echo isset($page_title) ? 'Staff Checkin · ' . htmlspecialchars($page_title) : 'Staff Checkin'; ?></title>
    <!--favicon-->`

    <!-- fontwsomw -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.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">
    <link href="<?php echo base_url('assets/plugins/metismenu/mm-vertical.css'); ?>" rel="stylesheet">
    <link href="<?php echo base_url('assets/plugins/simplebar/css/simplebar.css'); ?>" rel="stylesheet">
    <!--bootstrap css-->
    <link href="<?php echo base_url('assets/css/bootstrap.min.css'); ?>" rel="stylesheet">

    <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/css2?family=Outfit:wght@400;500;600;700&amp;display=swap" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Material+Icons+Outlined" 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/css/care-theme.css'); ?>?v=20260826b" 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">

    <!-- date range picker -->
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
    <!-- fontwsomw -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" />

</head>

<body class="harmony-app">

    <!--start header-->
    <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">
                    <!-- <div class="input-group ">
                        <span class="input-group-text ipt" id="basic-addon1"><img
                                src="<?php echo base_url('assets/images/seIcon.png'); ?>" alt="" width="14px" />
                        </span>
                        <input class="form-control pe-5 search-control d-lg-block d-none " type="text"
                            placeholder="Search Something">
                    </div> -->

                    <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 class="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">Recent Searches</p>
                                <div class="d-flex align-items-start flex-wrap gap-2 kewords-wrapper">
                                    <a href="javascript:;" class="kewords"><span>Angular Template</span><i
                                            class="material-icons-outlined fs-6">search</i></a>
                                    <a href="javascript:;" class="kewords"><span>Dashboard</span><i
                                            class="material-icons-outlined fs-6">search</i></a>
                                    <a href="javascript:;" class="kewords"><span>Admin Template</span><i
                                            class="material-icons-outlined fs-6">search</i></a>
                                    <a href="javascript:;" class="kewords"><span>Bootstrap 5 Admin</span><i
                                            class="material-icons-outlined fs-6">search</i></a>
                                    <a href="javascript:;" class="kewords"><span>Html eCommerce</span><i
                                            class="material-icons-outlined fs-6">search</i></a>
                                    <a href="javascript:;" class="kewords"><span>Sass</span><i
                                            class="material-icons-outlined fs-6">search</i></a>
                                    <a href="javascript:;" class="kewords"><span>laravel 9</span><i
                                            class="material-icons-outlined fs-6">search</i></a>
                                </div>
                                <hr>
                                <p class="search-title">Tutorials</p>
                                <div class="search-list d-flex flex-column gap-2">
                                    <div class="search-list-item d-flex align-items-center gap-3">
                                        <div class="list-icon">
                                            <i class="material-icons-outlined fs-5">play_circle</i>
                                        </div>
                                        <div class="">
                                            <h5 class="mb-0 search-list-title ">Wordpress Tutorials</h5>
                                        </div>
                                    </div>
                                    <div class="search-list-item d-flex align-items-center gap-3">
                                        <div class="list-icon">
                                            <i class="material-icons-outlined fs-5">shopping_basket</i>
                                        </div>
                                        <div class="">
                                            <h5 class="mb-0 search-list-title">eCommerce Website Tutorials</h5>
                                        </div>
                                    </div>

                                    <div class="search-list-item d-flex align-items-center gap-3">
                                        <div class="list-icon">
                                            <i class="material-icons-outlined fs-5">laptop</i>
                                        </div>
                                        <div class="">
                                            <h5 class="mb-0 search-list-title">Responsive Design</h5>
                                        </div>
                                    </div>
                                </div>

                                <hr>
                                <p class="search-title">Members</p>

                                <div class="search-list d-flex flex-column gap-2">
                                    <div class="search-list-item d-flex align-items-center gap-3">
                                        <div class="memmber-img">
                                            <img src="<?php echo base_url('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 class="search-list-item d-flex align-items-center gap-3">
                                        <div class="memmber-img">
                                            <img src="<?php echo base_url('assets/images/avatars/02.png'); ?>"
                                                width="32" height="32" class="rounded-circle" alt="">

                                        </div>
                                        <div class="">
                                            <h5 class="mb-0 search-list-title ">Snetro Jhonia</h5>
                                        </div>
                                    </div>

                                    <div class="search-list-item d-flex align-items-center gap-3">
                                        <div class="memmber-img">
                                            <img src="assets/images/avatars/03.png" width="32" height="32"
                                                class="rounded-circle" alt="">
                                        </div>
                                        <div class="">
                                            <h5 class="mb-0 search-list-title">Michle Clark</h5>
                                        </div>
                                    </div>

                                </div>
                            </div>
                            <div class="card-footer text-center bg-transparent">
                                <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 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 echo htmlspecialchars($adminName); ?></p>
                                <p class="text-muted mt-0 fmon text-end mb-0 "> Admin</p>
                            </div>
                            <?php if (!empty($adminImage)): ?>
                            <img src="<?php echo $adminImage; ?>" class="p-1 borderCustom" width="45" height="45"
                                style="border-radius: 50%;" alt="Admin Image" />
                            <?php else: ?>
                            <img src="<?php echo base_url('assets/images/dummy-man.png'); ?>" class="p-1 borderCustom"
                                width="45" height="45" style="border-radius: 50%;" alt="Dummy Image" />
                            <?php endif; ?>




                        </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 (!empty($adminImage)): ?>
                                <img src="<?php echo $adminImage; ?>" class="p-1 shadow mb-3" width="90" height="90"
                                    alt="Admin Image" />
                                <?php else: ?>
                                <img src="<?php echo base_url('assets/images/dummy-man.png'); ?>"
                                    class="p-1 shadow mb-3" width="90" height="90" alt="Dummy Image" />
                                <?php endif; ?>
                                <h5 class="user-name mb-0 fw-bold"><?php echo htmlspecialchars($adminName); ?></h5>
                                <small class="text-muted mt-0 fmon"> Admin</small>
                            </div>
                        </a>
                        <hr class="dropdown-divider" />
                        <!-- <a class="dropdown-item d-flex align-items-center gap-2 py-2" href="#"><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('Customer/editprofile'); ?>">
                            <i class="material-icons-outlined">person</i>Profile
                        </a>


                        <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>