<?php include 'header.php'; ?>

<div class="content-wrapper">

  <section class="content-header">
    <h1>
      Dashboard
      <!-- <small>Control panel</small> -->
    </h1>
    <!-- <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
      <li class="active">Dashboard</li>
    </ol> -->
  </section>


  <section class="content">

    <div class="row">

      <div class="col-lg-3 col-xs-6">
        <div class="small-box bg-green">
          <div class="inner">
            <?php 
            $siswa = mysqli_query($koneksi,"SELECT * FROM siswa");
            ?>
            <h3><?php echo mysqli_num_rows($siswa); ?></h3>
            <p>Siswa</p>
          </div>
          <div class="icon">
            <i class="ion ion-stats-bars"></i>
          </div>
        </div>
      </div>

      <div class="col-lg-3 col-xs-6">
        <div class="small-box bg-yellow">
          <div class="inner">
            <?php 
            $user = mysqli_query($koneksi,"SELECT * FROM user");
            ?>
            <h3><?php echo mysqli_num_rows($user); ?></h3>
            <p>Admin</p>
          </div>
          <div class="icon">
            <i class="ion ion-person-add"></i>
          </div>
        </div>
      </div>

      <div class="col-lg-3 col-xs-6">
        <div class="small-box bg-red">
          <div class="inner">
            <?php 
            $jurusan = mysqli_query($koneksi,"SELECT * FROM jurusan");
            ?>
            <h3><?php echo mysqli_num_rows($jurusan); ?></h3>
            <p>Kelas</p>
          </div>
          <div class="icon">
            <i class="ion ion-pie-graph"></i>
          </div>
        </div>
      </div>

      <div class="col-lg-3 col-xs-6">
        <div class="small-box bg-red">
          <div class="inner">
            <?php 
            $kelas = mysqli_query($koneksi,"SELECT * FROM kelas");
            ?>
            <h3><?php echo mysqli_num_rows($kelas); ?></h3>
            <p>Total Guru</p>
          </div>
          <div class="icon">
            <i class="ion ion-pie-graph"></i>
          </div>
        </div>
      </div>

      <div class="col-lg-3 col-xs-6">
        <div class="small-box bg-red">
          <div class="inner">
            <?php 
            $pelanggaran = mysqli_query($koneksi,"SELECT * FROM pelanggaran");
            ?>
            <h3><?php echo mysqli_num_rows($pelanggaran); ?></h3>
            <p>Jenis Pelanggaran</p>
          </div>
          <div class="icon">
            <i class="ion ion-android-list"></i>
          </div>
        </div>
      </div>


      <div class="col-lg-3 col-xs-6">
        <div class="small-box bg-green">
          <div class="inner">
            <?php 
            $prestasi = mysqli_query($koneksi,"SELECT * FROM prestasi");
            ?>
            <h3><?php echo mysqli_num_rows($prestasi); ?></h3>
            <p>Jenis Ketertiban</p>
          </div>
          <div class="icon">
            <i class="ion ion-android-list"></i>
          </div>
        </div>
      </div>

      <div class="col-lg-3 col-xs-6">
        <div class="small-box bg-red">
          <div class="inner">
            <?php 
            $input_pelanggaran = mysqli_query($koneksi,"SELECT * FROM input_pelanggaran");
            ?>
            <h3><?php echo mysqli_num_rows($input_pelanggaran); ?></h3>
            <p>Transaksi Pelanggaran</p>
          </div>
          <div class="icon">
            <i class="ion ion-android-list"></i>
          </div>
        </div>
      </div>

      <div class="col-lg-3 col-xs-6">
        <div class="small-box bg-green">
          <div class="inner">
            <?php 
            $input_prestasi = mysqli_query($koneksi,"SELECT * FROM input_prestasi");
            ?>
            <h3><?php echo mysqli_num_rows($input_prestasi); ?></h3>
            <p>Transaksi Ketertiban</p>
          </div>
          <div class="icon">
            <i class="ion ion-android-list"></i>
          </div>
        </div>
      </div>



      

    </div>

    <div class="row">    
      <section class="col-lg-12">

        <div class="box box-primary">
          <div class="box-body text-center">
            <br>
            <br>
            <h3 class="text-bold">Selamat Datang Di Sistem Informasi E-Point Siswa SMP Muhammadiyah 2 Godean</h3>
            <br>
            <br>
          </div>
        </div>
      </section>
    </div>

  </section>

</div>
<?php include 'footer.php'; ?>