-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_latih.php
144 lines (125 loc) · 5.21 KB
/
data_latih.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" type="image/x-icon" href="img/nbc.png"/>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<!-- font awsome -->
<link rel="stylesheet" href="css/fontawesome.css"/>
<link rel="stylesheet" href="css/brands.css"/>
<link rel="stylesheet" href="css/solid.css"/>
<link rel="stylesheet" href="css/gaya.css">
<!-- google font -->
<link href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/datatables.css">
<title>Naive Bayes - Data Latih</title>
</head>
<body>
<nav class="navbar navbar-expand-lg fixed-top navbar-light bg-light static-top">
<div class="container">
<a class="navbar-brand" href="index.php">
<img src="img/nbc.png" alt="" width=50 height=50>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="ml-auto navbar-nav">
<li class="nav-item">
<a class="nav-link" href="index.php">Naive Bayes</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="data_latih.php">Data Latih <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="tambah_data.php">Tambah Data</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container" style='margin-top:90px; margin-bottom: 90px'>
<div class="row">
<div class="mt-5 col-12">
<h2 class="tebal">List Data Latih</h2><br>
<p class="desc">Adapun daftar pegawai yang telah dievaluasi pada tahun sebelumnya dapat dilihat pada tabel
berikut: </p><br>
<table id="dataLatih" class="pt-3 mb-3 display">
<thead>
<tr>
<th>No</th>
<th>Nama Pegawai</th>
<th>Masa Pegawai</th>
<th>Usia</th>
<th>Nilai Pelatihan</th>
<th>Nilai Kinerja</th>
<th>Hasil Evaluasi</th>
<th>AKSI</th>
</tr>
</thead>
<tbody>
<?php
include_once("function.php");
$data = getDataLatih();
$hasil = json_decode($data, true);
$no = 1;
foreach ($hasil as $hasil) {
?>
<tr>
<td><?php echo $no; ?></td>
<td><?php echo $hasil['nama_pegawai']; ?></td>
<td><?php echo $hasil['masa_kerja']; ?></td>
<td><?php echo $hasil['usia']; ?></td>
<td><?php echo $hasil['nilai_pelatihan'] ?></td>
<td><?php echo $hasil['nilai_kinerja']; ?></td>
<td><?php
if ($hasil['hasil_evaluasi'] === "PROMOSI") {
echo "<span class='badge badge-success' style='padding:10px'>PROMOSI</span>";
} elseif ($hasil['hasil_evaluasi'] === "MUTASI") {
echo "<span class='badge badge-warning' style='padding:10px'>MUTASI</span>";
} else {
echo "<span class='badge badge-danger' style='padding:10px'>PHK</span>";
}
?></td>
<td>
<a href="/proses/delete_data.php?nama=<?php echo $hasil['nama_pegawai']; ?>&usia=<?php echo $hasil['usia']; ?>&mk=<?php echo $hasil['masa_kerja']; ?>">
<button type="button" class="btn btn-danger">Hapus</button>
</a>
</td>
</tr>
<?php
$no++;
}
?>
</tbody>
</table>
</div>
</div>
</div>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="js/jquery.js"></script>
<script src="jspopper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/datatables.js"></script>
<!-- validasi -->
<script>
$(document).ready(function () {
$('.toggle').click(function () {
$('ul').toggleClass('active');
});
});
</script>
<script>
$(document).ready(function () {
$('#dataLatih').dataTable({
"pageLength": 50
});
});
</script>
</body>
</html>