  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1>Member</h1>            
          </div>          
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item active">List Member</li>
            </ol>
            <h3 class="card-title"></h3>
                
                    
          </div>
        </div>               
      </div><!-- /.container-fluid -->
      
    </section>

    <!-- Main content -->
     
    <section class="content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-12">
            
              <div class="card">
                <div class="card-header">
                  <button type="button" class="btn btn-success" data-toggle="modal" data-target="#modal-default">
                  Tambah Data
                  
                </div>
                <!-- /.card-header -->
                <div class="card-body">
                  <table id="example1" class="table table-bordered table-striped">
                    <thead>
                      <tr>
                        <th>No</th>
                        <th>ID</th>
                        <th>user name</th>
                        <th>Nama</th>
                        <th>role</th>
                        <th>aksi</th>
                      </tr>
                      </thead>
                      <tbody>
             <?php
            include 'config/koneksi.php'; 
$no = 1;
$query = mysqli_query($conn, "SELECT * FROM users");
while ($data = mysqli_fetch_array($query)) {
        ?>
          <tr>
             <td><?= $no++ ?></td>
            <td><?= $data['user_id'] ?></td>
            <td><?= $data['username'] ?></td>
            <td><?= $data['nama_lengkap'] ?></td>
            <td><?= $data['role_id'] ?></td>

            <td>
              <a href="edit.php?ID=<?= $data['user_id'] ?>" class="btn btn-warning btn-sm">Edit</a>
              <a href="hapus.php?ID=<?= $data['user_id'] ?>" class="btn btn-danger btn-sm" onclick="return confirm('Yakin ingin menghapus data ini?')">Hapus</a>
            </td>
          </tr>
        <?php } ?>


                      </tbody>

                  </table>
                  
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->
        </div>
        <!-- /.row -->
      </div>
      <!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->


                  </table>
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->
        </div>
        <!-- /.row -->
      </div>
      <!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
   </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->
        </div>
        <!-- /.row -->
      </div>
      <!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

      <div class="modal fade" id="modal-default">
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <h4 class="modal-title">Tambah Data</h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <?php include('formadmin.php'); ?>

            </div>

          </div>
          <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
      </div>
      <!-- /.modal -->

