<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Guru - Sistem Informasi E-Point Siswa SMP Muhago</title>
  
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="shortcut icon" type="image/png/jpg/ico" href="../gambar/sistem/favicon1.ico">
  <link rel="stylesheet" href="../assets/bower_components/bootstrap/dist/css/bootstrap.min.css">
  <link rel="stylesheet" href="../assets/bower_components/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="../assets/bower_components/Ionicons/css/ionicons.min.css">
  <link rel="stylesheet" href="../assets/dist/css/AdminLTE.min.css">

  <link rel="stylesheet" href="../assets/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">

  <link rel="stylesheet" href="../assets/dist/css/skins/_all-skins.min.css">
  <link rel="stylesheet" href="../assets/bower_components/morris.js/morris.css">
  <link rel="stylesheet" href="../assets/bower_components/jvectormap/jquery-jvectormap.css">
  <link rel="stylesheet" href="../assets/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
  <link rel="stylesheet" href="../assets/bower_components/bootstrap-daterangepicker/daterangepicker.css">
  <link rel="stylesheet" href="../assets/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">


  <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />

  <?php 
  include '../koneksi.php';
  session_start();
  if($_SESSION['level'] != "guru"){
    header("location:../guru.php?alert=belum_login");
  }
  ?>

</head>
<body class="hold-transition skin-red sidebar-mini">

   <style type="text/css">
    .select2-selection__choice__display{
      color: black;
    }
    .tempat_minus .select2-container{
      display: none;
    }
    .tempat_plus .select2-container{
      display: none;
    }
  </style>
  
  <div class="wrapper">

    <header class="main-header">
      <a href="index.php" class="logo">
        <span class="logo-mini"><i class="fa fa-trophy"></i></span>
        <span class="logo-lg">E-<b>Point Muhago</b></span>
      </a>
      <nav class="navbar navbar-static-top">
        <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
          <span class="sr-only">Toggle navigation</span>
        </a>

        <div class="navbar-custom-menu">
          <ul class="nav navbar-nav">

            <li class="dropdown user user-menu">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                <?php 
                $id_guru = $_SESSION['id'];
                $profil = mysqli_query($koneksi,"select * from guru where guru_id='$id_guru'");
                $profil = mysqli_fetch_assoc($profil);
                if($profil['guru_foto'] == ""){ 
                  ?>
                  <img src="../gambar/sistem/user.png" class="user-image">
                <?php }else{ ?>
                  <img src="../gambar/guru/<?php echo $profil['guru_foto'] ?>" class="user-image">
                <?php } ?>
                <span class="hidden-xs"><?php echo $profil['guru_nama'] ?> - <?php echo $_SESSION['level']; ?></span>
              </a>
            </li>
            <li>
              <a href="logout.php"><i class="fa fa-sign-out"></i> LOGOUT</a>
            </li>
          </ul>
        </div>
      </nav>
    </header>

    <aside class="main-sidebar">
      <section class="sidebar">
        <div class="user-panel">
          <div class="pull-left image">
            <?php 
            $id_guru = $_SESSION['id'];
            $profil = mysqli_query($koneksi,"select * from guru where guru_id='$id_guru'");
            $profil = mysqli_fetch_assoc($profil);
            if($profil['guru_foto'] == ""){ 
              ?>
              <img src="../gambar/sistem/user.png" class="img-circle" style="height:45px; width: 45px;">
            <?php }else{ ?>
              <img src="../gambar/guru/<?php echo $profil['guru_foto'] ?>" class="img-circle" style="height:45px; width: 45px;" style="max-height:45px">
            <?php } ?>
          </div>
          <div class="pull-left info">
            <p><?php echo $profil['guru_nama'] ?></p>
            <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
          </div>
        </div>

        <ul class="sidebar-menu" data-widget="tree">
          <li class="header">MAIN NAVIGATION</li>
          <li><a href="index.php"><i class="fa fa-dashboard"></i> <span>DASHBOARD</span></a></li>
          <li><a href="siswa.php"><i class="fa fa-users"></i> <span>DATA SISWA</span></a></li>
          <li><a href="guru.php"><i class="fa fa-users"></i> <span>DATA GURU</span></a></li>
          <li><a href="prestasi.php"><i class="fa fa-trophy"></i> <span>DATA KETERTIBAN</span></a></li>
          <li><a href="pelanggaran.php"><i class="fa fa-warning"></i> <span>DATA PELANGGARAN</span></a></li>
          <li><a href="kelas.php"><i class="fa fa-book"></i> <span>KELAS AJAR SAYA</span></a></li>
        <!--   <li><a href="input_prestasi.php"><i class="fa fa-trophy"></i> <span>INPUT PRESTASI</span></a></li>
          <li><a href="input_pelanggaran.php"><i class="fa fa-warning"></i> <span>INPUT PELANGGARAN</span></a></li>
          <li><a href="laporan.php"><i class="fa fa-file"></i> <span>LAPORAN</span></a></li> -->
          <li><a href="gantipassword.php"><i class="fa fa-lock"></i> <span>GANTI PASSWORD</span></a></li>
          <li><a href="logout.php"><i class="fa fa-sign-out"></i> <span>LOGOUT</span></a></li>
        </ul>
      </section>
      <!-- /.sidebar -->
    </aside>
