Exemplo n.º 1
0
 function tampil()
 {
     $dbase = new koneksi();
     echo "<div class='tampil'>\n            <form action='' name='TampilUser' method='get'>\n            <table class='zebra-table'>\n                <thead>\n                <tr>\n                  <th><h2>No.</th>\n                  <th><h2>NIK</th>\n                  <th><h2>Nama Karyawan</th>\n                  <th><h2>Jenis Kelamin</th>\n                  <th><h2>Status</th>\n                  <th><h2>Jabatan</th>\n                  <th><h2>Email</th>\n                  <th><h2>Action</th>\n                </tr>\n                </thead>\n                <tbody>";
     $no = 1;
     $data = $dbase->TampilUser();
     foreach ($data as $r) {
         echo "<tr>\n                                <td>{$no}</td>\n                                <td>{$r['nik']}</td>\n                                <td>{$r['name']}</td>\n                                <td>{$r['jenis_kelamin']}</td>\n                                <td>{$r['status']}</td>\n                                <td>{$r['jabatan']}</td>\n                                <td>{$r['email']}</td>\n                                <td><a href='hapusUser.php?id={$r['nik']}'>Hapus</a></td>\n                              </tr>";
         $no++;
     }
     echo "</tbody>\n              </table>\n        </form>\n        </div>\n        </div>";
 }