-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtampil_tpa.php
executable file
·73 lines (72 loc) · 3.08 KB
/
tampil_tpa.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
<?php
session_start();
error_reporting(0);
if(empty($_SESSION['id'])){
header('location:login.php?error_login=1');
}
?>
<?php include 'header.php';?>
<?php include 'menu.php';?>
<div class="content-wrapper">
<div class="container">
<div class="row">
<div class="col-md-12">
<h4 class="page-head-line">Penilaian Karyawan</h4>
</div>
</div>
<div class="row">
<div class="col-md-12">
<?php if (!empty($_GET['error_msg'])): ?>
<div class="alert alert-danger">
<?= $_GET['error_msg']; ?>
</div>
<?php endif ?>
</div>
</div>
<div class="row">
<div><a href="input_tpa.php" class="btn btn-info">Tambah Data</a></div>
<br>
<div class="table-responsive">
<table id="example1" class="table table-striped table-bordered">
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<?php foreach ($db->select('kriteria','kriteria')->get() as $kr ): ?>
<th><?= $kr['kriteria']?></th>
<?php endforeach ?>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $no=1; foreach($db->select('karyawan.id_calon_kr,karyawan.nama,hasil_tpa.*','karyawan,hasil_tpa')->where('karyawan.id_calon_kr=hasil_tpa.id_calon_kr')->get() as $data): ?>
<tr>
<td><?= $no;?></td>
<td><?= $data['nama']?></td>
<?php foreach ($db->select('kriteria','kriteria')->get() as $k): ?>
<td><?= $db->getnamesubkriteria($data[$k['kriteria']])?> (Nilai = <?= $db->getnilaisubkriteria($data[$k['kriteria']])?>)</td>
<?php endforeach ?>
<td>
<a class="btn btn-warning" href="edit_tpa.php?id=<?php echo $data[0]?>">Edit</a>
<a class="btn btn-danger" onclick="return confirm('Yakin Hapus?')" href="delete_tpa.php?id=<?php echo $data[0]?>">Hapus</a>
</td>
</tr>
<?php $no++; endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- CONTENT-WRAPPER SECTION END-->
<?php include 'footer.php'; ?>
<script type="text/javascript">
$(function(){
$("#tpa").addClass('menu-top-active');
});
</script>
<script type="text/javascript">
$(function() {
$('#example1').dataTable();
});
</script>