-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaporan-pegawai.php
67 lines (63 loc) · 2.07 KB
/
laporan-pegawai.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 pt-3 pb-5 backGambar">
<div class="row mt-3">
<div class="col-xl-12 table-responsive">
<a href="cetak-laporan-pegawai.php" class="btn btn-sm btn-success text-white mb-3" target="_blank"> <i class="fas fa-print"></i> Cetak Rekapitulasi Pegawai </a>
<table class="table table-bordered table-hover" id="laporanPegawai">
<thead>
<tr class="text-center">
<th>No.</th>
<th>Nama Pegawai</th>
<th>Photo</th>
<th>Jenis Kelamin</th>
<th>Alamat</th>
<th>Telp</th>
<th>Jabatan</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
$sql = "SELECT * FROM tbl_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 = "male.png";
} else if ($photo == "" && $jenis_Kelamin == "Perempuan") {
$photo = "female.png";
}
?>
<tr>
<td align="center" width="5%"><?= $no++; ?>.</td>
<td><?= $data['nama_pegawai']; ?></td>
<td align="center"><img src="photo/<?= $photo; ?>" alt="photo" width="40" height="40"></td>
<td><?= $data['jenis_kelamin']; ?></td>
<td><?= $data['alamat']; ?></td>
<td><?= $data['telp']; ?></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() {
$('#laporanPegawai').dataTable();
$('.form-control-chosen').chosen({
allow_single_deselect: true,
});
});
</script>