<body id="page-top">

    <!-- Page Wrapper -->
    <div id="wrapper">

        <!-- Sidebar -->
        <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">

            <!-- Sidebar - Brand -->
            <a class="sidebar-brand d-flex align-items-center justify-content-center" href=" <?php echo base_url('admin/dashboard_admin') ?>">
                <div class="sidebar-brand-icon">
                    <img src="<?=base_url('assets/img/logo_toko.png')?>" style="width: 100px;"/>                  
                </div>
                <div class="sidebar-brand-text mr-3">ADMIN</div>
            </a>

            <!-- Nav Item - Dashboard -->
            <li class="nav-item <?= $str == 'dashboard'? 'active' : '' ?>">
                <a class="nav-link" href="<?php echo base_url('admin/dashboard_admin') ?>">
                    <i class="fas fa-fw fa-tachometer-alt"></i>
                    <span>Cek Transaksi</span></a>
            </li>

            <!-- Nav Item - Tables -->
            <li class="nav-item <?= $str == 'barang'? 'active' : '' ?>">
                <a class="nav-link" href="<?php echo base_url('admin/data_barang') ?>">
                    <i class="fas fa-fw fa-database"></i>
                    <span>Data Barang</span></a>
            </li>
            <li class="nav-item <?= $str == 'invoice'? 'active' : '' ?>">
                <a class="nav-link" href="<?php echo base_url('admin/Invoice') ?>">
                    <i class="fas fa-fw fa-file-invoice"></i>
                    <span>Invoices</span></a>
            </li>
        
            <!-- Sidebar Toggler (Sidebar) -->
            <!-- <div class="text-center d-none d-md-inline">
                <button class="rounded-circle border-0" id="sidebarToggle"></button>
            </div> -->

            <!-- Sidebar Message -->
            <!--<div class="sidebar-card">
                <img class="sidebar-card-illustration mb-2" src="img/undraw_rocket.svg" alt="">
                <p class="text-center mb-2"><strong>SB Admin Pro</strong> is packed with premium features, components, and more!</p>
                <a class="btn btn-success btn-sm" href="https://startbootstrap.com/theme/sb-admin-pro">Upgrade to Pro!</a>
            </div> -->

        </ul>
        <!-- End of Sidebar -->

        <!-- Content Wrapper -->
        <div id="content-wrapper" class="d-flex flex-column">

            <!-- Main Content -->
            <div id="content">

                <!-- Topbar -->
                <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

                    <!-- Sidebar Toggle (Topbar) -->
                    <!-- <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
                        <i class="fa fa-bars"></i>
                    </button> -->

                    <!-- Topbar Search -->
                    <form method="post" action="<?= base_url('admin/data_barang') ?>"
                        class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
                        <div class="input-group">
                            <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..."
                                name="search" aria-describedby="basic-addon2">
                            <input type="hidden" class="form-control bg-light border-0 small" placeholder="Search for..."
                                name="uri" value="<?= $this->uri->segment(2,0) ?>" aria-describedby="basic-addon2">
                            <div class="input-group-append">
                                <button class="btn btn-primary" type="submit">
                                    <i class="fas fa-search fa-sm"></i>
                                </button>
                            </div>
                        </div>
                    </form>

                    <!-- Topbar Navbar -->
                    <div class="navbar">
                                <ul class="na navbar-nav navbar-right">
                                    <?php if($this->session->userdata('username')){ ?>
                                        <li><div> <b>Halo,</b> <?php echo $this->session->userdata('username') ?></div></li> 
                                        <li class="ml-2"> <?php echo anchor('auth/logout', 'logout') ?></li>
                                    <?php }else { ?>
                                        <li> <?php echo anchor('auth/login', 'login') ?></li>
                                    <?php } ?>
                                </ul>       
                            </div>
                        </div>
                    </ul>

                </nav>
                <!-- End of Topbar -->