Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="row justify-content-md-center">
- <div class="col-12 mb-4">
- <div class="card shadow-sm">
- <div class="card-header d-flex flex-row align-items-center flex-0">
- <div class="col col-md-6 text-left">
- <a href="index.php?page=tambah_akses" class="btn btn-sm btn-soft-green">
- <i class="fa fa-plus"></i> Tambah Akses
- </a>
- </div>
- <div class="col col-md-6 text-right">
- <?php
- //Apabila menangkap notifikasi dengan GET
- if(!empty($_GET['notifikasi'])){
- $notifikasi=$_GET['notifikasi'];
- //Apabila tambah akses berhasil
- if($notifikasi=="tambah_akses_berhasil"){
- echo "<b>NOTIFIKASI:</b> Tambah Akses Berhasil";
- }
- //Apabila hapus akses berhasil
- if($notifikasi=="hapus_akses_berhasil"){
- echo "<b>NOTIFIKASI:</b> Hapus Data Akses Berhasil";
- }
- //Apabila edit akses berhasil
- if($notifikasi=="edit_akses_berhasil"){
- echo "<b>NOTIFIKASI:</b> Edit Data Akses Berhasil";
- }
- //Apabila tambah akses gagal
- if($notifikasi=="hapus_akses_gagal"){
- echo "<b>NOTIFIKASI:</b> Hapus Data Akses Gagal";
- }
- //Apabila id_akses kosong
- if($notifikasi=="id_akses_kosong"){
- echo "<b>NOTIFIKASI:</b> ID Akses Tidak Bisa Ditangkap";
- }
- }
- ?>
- </div>
- </div>
- <div class="card-body">
- <div class="row">
- <div class="col col-md-12 table-responsive">
- <table class="table table-bordered">
- <tr class="bg-gradient-primary text-white">
- <td class="text-center"><b>NO</b></td>
- <td class="text-center"><b>NAMA</b></td>
- <td class="text-center"><b>USERNAME</b></td>
- <td class="text-center"><b>PASSWORD</b></td>
- <td class="text-center"><b>LEVEL</b></td>
- <td class="text-center"><b>OPTION</b></td>
- </tr>
- <?php
- include "Config/Connection.php";
- //Hitung Jumlah Data
- $JumlahAksesibilitas = mysqli_num_rows(mysqli_query($conn, "SELECT*FROM akses"));
- if(empty($JumlahAksesibilitas)){
- echo "<tr>";
- echo " <td class='text-center' colspan='6'>Belum Ada Data</td>";
- echo "</tr>";
- }else{
- //Mulai nomor dari 1
- $no = 1;
- //Menampilkan data
- $query = mysqli_query($conn, "SELECT*FROM akses ORDER BY id_akses DESC");
- while ($data = mysqli_fetch_array($query)) {
- $id_akses = $data['id_akses'];
- $nama_lengkap = $data['nama_lengkap'];
- $email = $data['email'];
- $no_kontak = $data['no_kontak'];
- $username = $data['username'];
- $password = $data['password'];
- $level = $data['level'];
- echo "<tr>";
- echo " <td class='text-center'>$no</td>";
- echo " <td class='text-left'>$nama_lengkap</td>";
- echo " <td class='text-left'>$username</td>";
- echo " <td class='text-left'>$password</td>";
- echo " <td class='text-left'>$level</td>";
- echo " <td class='text-center'>";
- echo " <a href='index.php?page=edit_akses&id_akses=$id_akses' title='Edit' class='btn btn-sm btn-primary'>";
- echo " <i class='fa fa-pencil-alt'></i>";
- echo " </a>";
- echo " <a href='Proses/Akses/hapus_akses.php?id_akses=$id_akses' title='Delete' class='btn btn-sm btn-danger'>";
- echo " <i class='fa fa-trash'></i>";
- echo " </a>";
- echo " </td>";
- echo "</tr>";
- $no++;
- }
- }
- ?>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
Add Comment
Please, Sign In to add comment