-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathperiode.php
53 lines (50 loc) · 1.77 KB
/
periode.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
<div class="page-header">
<h1>Periode</h1>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<form class="form-inline">
<input type="hidden" name="m" value="periode" />
<div class="form-group">
<input class="form-control" type="text" placeholder="Pencarian. . ." name="q" value="<?=$_GET['q']?>" />
</div>
<div class="form-group">
<button class="btn btn-success"><span class="glyphicon glyphicon-refresh"></span> Refresh</a>
</div>
<div class="form-group">
<a class="btn btn-primary" href="?m=periode_tambah"><span class="glyphicon glyphicon-plus"></span> Tambah</a>
</div>
</form>
</div>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>No</th>
<th>Nama Periode</th>
<?php foreach($JENIS as $key => $val):?>
<th><?=$val?></th>
<?php endforeach?>
<th>Aksi</th>
</tr>
</thead>
<?php
$q = esc_field($_GET['q']);
$rows = $db->get_results("SELECT * FROM tb_periode WHERE nama_periode LIKE '%$q%' ORDER BY kode_periode");
$no=0;
$analisa = get_data();
//echo '<pre>'. print_r($analisa, 1) . '</pre>';
foreach($rows as $row):?>
<tr>
<td><?=++$no ?></td>
<td><?=$row->nama_periode?></td>
<?php foreach($analisa[$PERIODE[$row->kode_periode]] as $k => $v):?>
<td><?=$v?></td>
<?php endforeach?>
<td>
<a class="btn btn-xs btn-warning" href="?m=periode_ubah&ID=<?=$row->kode_periode?>"><span class="glyphicon glyphicon-edit"></span></a>
<a class="btn btn-xs btn-danger" href="aksi.php?act=periode_hapus&ID=<?=$row->kode_periode?>" onclick="return confirm('Hapus data?')"><span class="glyphicon glyphicon-trash"></span></a>
</td>
</tr>
<?php endforeach;?>
</table>
</div>