<?php
    session_start();
    include '../koneksi.php';
    if(! isset($_SESSION['status_login'])) {
        echo "<script>window.location = '../login.php?msg=Harap Login Terlebih Dahulu!'</script>";
    }
    date_default_timezone_set("Asia/Jakarta"); 

    $identitas = mysqli_query($conn, "SELECT * FROM pengaturan ORDER BY id DESC LIMIT 1");
	$d = mysqli_fetch_object($identitas);
?>

<!DOCTYPE html>
<html>
    <head>
        <link rel="icon" href="../uploads/identitas/<?= $d->favicon ?>">
        <title>Panel Admin - <?= $d->nama ?></title>
        <link rel="stylesheet" type="text/css" href="../style.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" integrity="sha512-5A8nwdMOWrSz20fDsjczgUidUBR8liPYU+WymTZP1lmY9G6Oc7HlZv156XqnsgNUzTyMefFTcsFH/tnJE/+xBg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
        <script src="https://cdn.tiny.cloud/1/vvciuuvumjewx49fq95v5zxz7pdwu54e72zi2z1xpr9cmq3i/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
		<script>
	      tinymce.init({
	        selector: '#keterangan'
	      });
	    </script>
	</head>

</head>

<body class="bg-light">

    <!-- navbar -->
     <div class="navbar">
        <div class="container">

            <!-- navbar brand -->
             <h2 class="nav-brand float-left"><a href="index.php"><?= $d->nama ?></a></h2>

             <!-- navbar menu -->
              <ul class="nav-menu float-left">
                <li><a href="index.php">Dashbord</a></li>

                <?php if ($_SESSION['elevel'] == 'super admin'){ ?>

                <li><a href="pengguna.php">Pengguna</a></li>

                <?php }elseif($_SESSION['elevel'] == 'admin'){ ?>

                <li><a href="jurusan.php">Jurusan</a></li>
                <li><a href="dokumentasi.php">Dokumentasi</a></li>
                <li><a href="informasi.php">Infromasi</a></li> 

                <li>
                    <a href="#">Pengaturan<i class="fa fa-caret-down"></i></a>

                    <!-- sub menu -->
                     <ul class="dropdown">
                        <li><a href="identitas-sekolah.php">Identitas Sekolah</a></li>
                        <li><a href="tentang-sekolah.php">Tentang Sekolah</a></li>
                        <li><a href="kepala-sekolah.php">Kepala Sekolah</a></li>
</ul>
</li>
                <?php } ?>

                <li>
                    <a href="#">Akun<i class="fa fa-caret-down"></i></a>

                     <!-- sub menu
                      Tambah notif yakinkah? Setelah mengganti password, diharapkan untuk login ulang
                      Auto log out -->
                     <ul class="dropdown">
                        <li><a href="ubah-password.php">Ubah Password</a></li>
                        <li><a href="logout.php">Keluar</a></li>
</ul>
                </li>
</ul>

    <div class="clearfix"></div>
</div>
</div>
