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

<div class="content-wrapper">

  <section class="content-header">
    <h1>
      Guru
      <!-- <small>Data Guru</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">
      <section class="col-lg-12">
        <div class="box box-primary">

          <div class="box-header">
            <h3 class="box-title">Guru</h3>           
          </div>
          <div class="box-body">
            <div class="table-responsive">
              <table class="table table-bordered table-striped" id="table-datatable">
                <thead>
                  <tr>
                    <th width="1%">NO</th>
                    <th>NAMA</th>
                    <th>NBM</th>
                    <th>USERNAME</th>
                    <th width="15%">FOTO</th>
                  </tr>
                </thead>
                <tbody>
                  <?php 
                  $no=1;
                  $data = mysqli_query($koneksi,"SELECT * FROM guru");
                  while($d = mysqli_fetch_array($data)){
                    ?>
                    <tr>
                      <td><?php echo $no++; ?></td>
                      <td><?php echo $d['guru_nama']; ?></td>
                      <td><?php echo $d['guru_nip']; ?></td>
                      <td><?php echo $d['guru_username']; ?></td>
                      <td>
                        <center>
                          <?php if($d['guru_foto'] == ""){ ?>
                            <img src="../gambar/sistem/user.png" style="width: 30px;height: auto">
                          <?php }else{ ?>
                            <img src="../gambar/guru/<?php echo $d['guru_foto'] ?>" style="width: 30px;height: auto">
                          <?php } ?>
                        </center>
                      </td>
                    </tr>
                    <?php 
                  }
                  ?>
                </tbody>
              </table>
            </div>
          </div>

        </div>
      </section>
    </div>
  </section>

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