<?php
session_start();
// Apabila user belum login
if (empty($_SESSION['namauser']) AND empty($_SESSION['passuser'])){
  echo "<link href=\"css/style_login.css\" rel=\"stylesheet\" type=\"text/css\" />
        <div id=\"login\"><h1 class=\"fail\">Untuk mengakses modul, Anda harus login dulu.</h1>
        <p class=\"fail\"><a href=\"index.php\">LOGIN</a></p></div>";  
}
// Apabila user sudah login dengan benar, maka terbentuklah session
else{
?>
<!DOCTYPE html>
<html>
<head><title>Administrator</title> 
  <!-- style CSS utama -->
  

  <!-- TinyMCE (WYSIYWG Editor) -->
  <script type="text/javascript" src="../tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
  <script type="text/javascript" src="../tinymce/jscripts/tiny_mce/tiny_lokomedia.js"></script>
     <!-- Google Web Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Roboto:wght@500;700&display=swap" rel="stylesheet"> 
    
    <!-- Icon Font Stylesheet -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet">

    <!-- Libraries Stylesheet -->
    <link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
    <link href="lib/tempusdominus/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" />

    <!-- Customized Bootstrap Stylesheet -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Template Stylesheet -->
    <link href="css/style.css" rel="stylesheet">
<script src="https://cdn.ckeditor.com/ckeditor5/39.0.0/classic/ckeditor.js"></script>


  <style>
.table {
  --bs-table-bg: rgba(0,0,0,0);
  --bs-table-striped-color: #fff;
  --bs-table-striped-bg: rgba(0,0,0,0.05);
  --bs-table-active-color: #fff;
  --bs-table-active-bg: rgba(0,0,0,0.1);
  --bs-table-hover-color: #fff;
  --bs-table-hover-bg: rgba(0,0,0,0.075);
  color: #fff;
}
    </style>

 
</head>
  <body style="font-size: 1.5rem;">
<div class="container-fluid position-relative d-flex p-0">
        <!-- Spinner Start -->
        <div id="spinner" class="show bg-dark position-fixed translate-middle w-100 vh-100 top-50 start-50 d-flex align-items-center justify-content-center">
            <div class="spinner-border text-primary" style="width: 3rem; height: 3rem;" role="status">
                <span class="sr-only">Loading...</span>
            </div>
        </div>
        <!-- Spinner End -->

<style>
.content {
  margin-left: 350px;
  

}
.sidebar {
  width: 350px;
}
.form-control {

  background-color: #fff;
    font-size: 25px;
  border: 1px solid #fff;
 
}
.figo {
  background-color: #fff;
 
}
      @media (max-width: 991.98px){
.sidebar {
  margin-left: -100%;
  width: 100%;
  font-size: 4.5rem;
    padding: 70px 50px;
}
          .content {
  margin-left: 0px;
}
      }


</style>
        <!-- Sidebar Start -->
        <div class="sidebar pe-4 pb-3">
            <nav class="navbar bg-secondary navbar-dark">
                <a href="index.html" class="navbar-brand mx-4 mb-3">
                    <h3 class="text-primary"><i class="fa fa-user-edit me-2"></i>Administrator</h3>
                </a>
                <div class="d-flex align-items-center ms-4 mb-4">
                    <div class="position-relative">
                        <img class="rounded-circle" src="img/user.jpg" alt="" style="width: 40px; height: 40px;">
                        <div class="bg-success rounded-circle border border-2 border-white position-absolute end-0 bottom-0 p-1"></div>
                    </div>
                    <div class="ms-3">
                        <h6 class="mb-0"><?php echo"$_SESSION[namalengkap]"?></h6>
                        <span>Admin</span>
                    </div>
                </div>



                <div class="navbar-nav w-100">
                    <a href="?module=beranda" class="nav-item nav-link active"><i class="fa fa-tachometer-alt me-2"></i>Beranda</a>
                   




                    <a href="widget.html" class="nav-item nav-link"><?php include "menu.php"; ?></a>
                 
                    <a href="logout.php" class="nav-item nav-link"><i class="fa fa-chart-bar me-2"></i>Keluar</a>
                    
                </div>
            </nav>
        </div>
        <!-- Sidebar End -->

<style>
     @media (max-width: 991.98px){
.navbar-expand {

  font-size: 7.5rem;

}
.me-4 {
  margin-right: 5.5rem !important;
}
.pt-4 {
  font-size: 2.5rem;
}

.btn-sm, .btn-group-sm > .btn {
  padding: .55rem 1.5rem;
  font-size: 2.5rem;
  border-radius: 1rem;
}

      } 


</style>
        <!-- Content Start -->
        <div class="content">
            <!-- Navbar Start -->
            <nav class="navbar navbar-expand bg-secondary navbar-dark sticky-top px-4 py-0">
                <a href="index.html" class="navbar-brand d-flex d-lg-none me-4">
                    <h2 class="text-primary mb-0"><i class="fa fa-user-edit"></i></h2>
                </a>
                <a href="#" class="sidebar-toggler flex-shrink-0">
                    <i class="fa fa-bars"></i>
                </a>
                




                <div class="navbar-nav align-items-center ms-auto">
                  





                  
                    <div class="nav-item dropdown">
                        <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
                            <img class="rounded-circle me-lg-2" src="img/user.jpg" alt="" style="width: 40px; height: 40px;">
                            <span class="d-none d-lg-inline-flex"><?php echo"$_SESSION[namalengkap]"?></span>
                        </a>
                       
                    </div>
                </div>
            </nav>
            <!-- Navbar End -->


           
<style>
        @media (max-width: 991.98px){

            h2, .h2  {
  font-size: 5.5rem;
}
            
        }

</style>

            


            <!-- Recent Sales Start -->
            <div class="container-fluid pt-4 px-4">
                <div class="bg-secondary text-center rounded p-4">


<?php include "content.php"; ?>


                   





                    




                </div>
            </div>
            <!-- Recent Sales End -->


           


           
        </div>
        <!-- Content End -->


        <!-- Back to Top -->
        <a href="#" class="btn btn-lg btn-primary btn-lg-square back-to-top"><i class="bi bi-arrow-up"></i></a>
    </div>

    <!-- JavaScript Libraries -->
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="lib/chart/chart.min.js"></script>
    <script src="lib/easing/easing.min.js"></script>
    <script src="lib/waypoints/waypoints.min.js"></script>
    <script src="lib/owlcarousel/owl.carousel.min.js"></script>
    <script src="lib/tempusdominus/js/moment.min.js"></script>
    <script src="lib/tempusdominus/js/moment-timezone.min.js"></script>
    <script src="lib/tempusdominus/js/tempusdominus-bootstrap-4.min.js"></script>

    <!-- Template Javascript -->
    <script src="js/main.js"></script>
<script src="js/script.js"></script>

     
  </body>
</html>
<?php } ?>
