-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaporan-user.php
67 lines (61 loc) · 2.05 KB
/
laporan-user.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
$judul = "Laporan";
include "koneksi.php";
include "header.php";
include "sidebar.php";
include "topbar.php";
?>
<div class="container-fluid py-5 backGambar">
<div class="row">
<div class="col-md-8">
<a href="cetak-laporan-user.php" class="btn btn-sm btn-success text-white" target="_blank"><i class="fas fa-print"></i> Cetak Rekapitulasi User </a>
<hr>
<table class="table table-bordered table-hover" id="laporanUser">
<thead>
<tr>
<th width="5%">No.</th>
<th>Nama</th>
<th>Photo</th>
<th>Username</th>
<th>Jabatan</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
$sql = "SELECT a.nama_pegawai, a.jabatan, a.photo, a.jenis_kelamin, b.id_login, b.username FROM tbl_pegawai a INNER JOIN tbl_login b ON a.id_pegawai = b.id_pegawai";
$query = mysqli_query($koneksi, $sql);
while ($data = mysqli_fetch_array($query)) {
$photo = $data['photo'];
$jenis_kelamin = $data['jenis_kelamin'];
if ($photo == "" && $jenis_kelamin == "Laki-laki") {
$photo = "photo/male.png";
} else if ($photo == "" && $jenis_kelamin == "Perempuan") {
$photo = "photo/female.png";
} else {
$photo = "photo/" . $photo;
}?>
<tr>
<td align="center" width="3%"><?= $no++; ?>.</td>
<td><?= $data['nama_pegawai']; ?></td>
<td align="center"><img src="<?= $photo; ?>" alt="photo" width="40" height="40"></td>
<td><?= $data['username']; ?></td>
<td><?= $data['jabatan']; ?></td>
</tr>
<?php
} ?>
</tbody>
</table>
</div>
</div>
</div>
<?php include "sticky-footer.php"; ?>
<?php include "footer.php"; ?>
<script>
$(document).ready(function() {
$('#laporanUser').dataTable();
$('.form-control-chosen').chosen({
allow_single_deselect: true,
});
});
</script>