<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Broiler Medic</title>

    <!-- Custom fonts for this template-->
    <link href="<?php echo base_url(); ?>assets/vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">

    <!-- Custom styles for this template-->
    <link href="<?php echo base_url(); ?>assets/css/sb-admin-2.min.css" rel="stylesheet">
    <style>
        .c-active {
            /* background: #4067a8; */
            color: #fff !important;
        }

        .sidebar .nav-item .collapse .collapse-inner .collapse-item,
        .sidebar .nav-item .collapsing .collapse-inner .collapse-item {
            /* color: #fff !important; */
        }

        /* .sidebar .nav-item .collapse .collapse-inner .collapse-item:hover,
        .sidebar .nav-item .collapsing .collapse-inner .collapse-item:hover {
            background: #4067a8 !important;
        }

        .sidebar-light .nav-item.active .nav-link {
            color: #fff !important;
            border-radius: 10px;
            background: #4067a8;
        }

        .sidebar .nav-item .collapse .collapse-inner .collapse-item:hover,
        .sidebar .nav-item .collapsing .collapse-inner .collapse-item:hover {
            color: #fff !important;
        }

        .sidebar .nav-item .nav-link .img-profile,
        .topbar .nav-item .nav-link .img-profile {
            width: 3rem;
            height: 3rem;
        }

        .text-primary {
            color: #4067a8 !important;
        }

        .bg-primary {
            background-color: #4067a8 !important;
        }

        .btn-primary {
            background-color: #4067a8 !important;
        } */

        .table-responsive .table th {
            background-color: #4e73df;
            color: #ffffff;
            cursor: pointer;
            border: 1px solid #ffffff;
        }
    </style>

</head>

<body id="page-top">

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

        <!-- Sidebar -->
        <ul class="navbar-nav sidebar sidebar-dark accordion" id="accordionSidebar" style="background-color:#8B4513;">

            <!-- Sidebar - Brand -->
            <a class="sidebar-brand d-flex align-items-center justify-content-center" href="<?php echo base_url(); ?>dashboard">
                <!-- <div class="sidebar-brand-icon">
                    <i class="fas fa-file"></i>
                </div> -->
                <div class="sidebar-brand-text mx-3" style="font-size: 13px;">Broiler Medic</div>
            </a>

            <!-- Divider -->
            <hr class="sidebar-divider my-0">

            <!-- Nav Item - Dashboard -->
            <li class="nav-item">
                <a class="nav-link" href="<?php echo base_url(); ?>dashboard">
                    <i class="fas fa-fw fa-tachometer-alt"></i>
                    <span>Dashboard</span></a>
            </li>

            <?php if ($_SESSION['role'] == 'admin') { ?>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo base_url(); ?>dashboard/daftar_pengguna">
                        <i class="fas fa-fw fa-users"></i>
                        <span>Data Pengguna</span></a>
                </li>

                <li class="nav-item">
                    <a class="nav-link" href="<?php echo base_url(); ?>dashboard/daftar_penyakit">
                        <i class="fas fa-fw fa-bug"></i>
                        <span>Data Penyakit</span></a>
                </li>

                <li class="nav-item">
                    <a class="nav-link" href="<?php echo base_url(); ?>dashboard/daftar_gejala">
                        <i class="fas fa-fw fa-file"></i>
                        <span>Data Gejala</span></a>
                </li>

                <li class="nav-item">
                    <a class="nav-link" href="<?php echo base_url(); ?>dashboard/daftar_pengetahuan">
                        <i class="fas fa-fw fa-search"></i>
                        <span>Data Pengetahuan</span></a>
                </li>

                <li class="nav-item">
                    <a class="nav-link" href="<?php echo base_url(); ?>dashboard/daftar_perawatan">
                        <i class="fas fa-fw fa-list"></i>
                        <span>Data Perawatan</span></a>
                </li>
            <?php } else { ?>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo base_url(); ?>dashboard/diagnosa">
                        <i class="fas fa-fw fa-pen"></i>
                        <span>Diagnosa</span></a>
                </li>

                <li class="nav-item">
                    <a class="nav-link" href="<?php echo base_url(); ?>dashboard/history_diagnosa">
                        <i class="fas fa-fw fa-file"></i>
                        <span>Riwayat Diagnosa</span></a>
                </li>
            <?php } ?>

            <li class="nav-item">
                <a class="nav-link" href="<?php echo base_url(); ?>dashboard/profil_saya">
                    <i class="fa fa-fw fa-user"></i>
                    <span>Profil Saya</span></a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="#" data-toggle="modal" data-target="#logoutModal">
                    <i class="fas fa-fw fa-arrow-left"></i>
                    <span>Keluar</span></a>
            </li>

            <!-- Divider -->
            <hr class="sidebar-divider">

            <!-- Sidebar Toggler (Sidebar) -->
            <div class="text-center d-none d-md-inline">
                <button class="rounded-circle border-0" id="sidebarToggle"></button>
            </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 Navbar -->
                    <ul class="navbar-nav ml-auto">

                        <!-- Nav Item - Search Dropdown (Visible Only XS) -->
                        <li class="nav-item dropdown no-arrow d-sm-none">
                            <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <i class="fas fa-search fa-fw"></i>
                            </a>
                            <!-- Dropdown - Messages -->
                            <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in" aria-labelledby="searchDropdown">
                                <form class="form-inline mr-auto w-100 navbar-search">
                                    <div class="input-group">
                                        <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
                                        <div class="input-group-append">
                                            <button class="btn btn-primary" type="button">
                                                <i class="fas fa-search fa-sm"></i>
                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </li>

                        <div class="topbar-divider d-none d-sm-block"></div>

                        <!-- Nav Item - User Information -->
                        <li class="nav-item dropdown no-arrow">
                            <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <span class="d-none d-lg-inline text-gray-600 small mr-4" style="color: #000 !important;"><strong>Halo, <?php echo $_SESSION['nama_lengkap']; ?>!
                                    </strong><br />Anda masuk sebagai <?php echo $_SESSION['role']; ?>
                                </span>
                                <img class="img-profile rounded-circle" style="object-fit: cover;" src="<?php echo base_url() . 'assets/upload/avatar/' . ($_SESSION['foto'] ? $_SESSION['foto'] : "default.jpg"); ?>">
                            </a>

                            <!-- Dropdown - User Information -->
                            <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
                                <a class="dropdown-item" href="<?php echo base_url(); ?>dashboard/profil_saya">
                                    <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
                                    Profil Saya
                                </a>
                                <a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
                                    <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                                    Keluar
                                </a>
                            </div>
                        </li>

                    </ul>

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