-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotifikasi.php
70 lines (63 loc) · 2.09 KB
/
notifikasi.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
<?php include 'template/navbar.php' ?>
<?php include 'template/subnavbar.php' ?>
<?php
include 'sistem/core.php';
include 'sistem/db/MysqliDb.php';
$root = new Utility();
session_start();
$root->checkLogin('admin');
$db = new MysqliDb();
?>
<div class="main">
<div class="main-inner">
<div class="container">
<div class="row">
<!-- /span6 -->
<div class="span12">
<a href="tambah_broadcast.php" class="btn btn-primary" title="Tambah">Kirim Broadcast SMS</a>
<p></p>
<table id="tabelku" class="table table-bordered table-striped">
<thead>
<tr>
<th>No</th>
<th>Pelanggan</th>
<th>Isi Notifikasi</th>
<th>Jenis Notifikasi</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
$db->join('pelanggan p', 'p.id_pelanggan=n.id_pelanggan', 'LEFT');
// $db->where('m.id_pelanggan', 'p.id_pelanggan');
$notifikasi = $db->get('notifikasi n', null, 'p.nama, n.isi_notifikasi, n.jenis_notifikasi, n.id_notifikasi');
$no = 1;
// print_r($notifikasi);
foreach ($notifikasi as $notif) { ?>
<tr>
<td><?= $no; ?></td>
<td><?= $notif['nama']; ?></td>
<td><?= $notif['isi_notifikasi']; ?></td>
<td><?= $notif['jenis_notifikasi'] == 'K' ? 'Perkiraan Kembali' : 'Ucapan'; ?></td>
<td>
<a onclick="return confirm('apakah yakin ingin menghapus ?');" href="hapus_notifikasi.php?id=<?= $notif['id_notifikasi'] ?>" class="btn btn-danger btn-small" title="Hapus">Hapus</a>
</td>
</tr>
<?php $no++; }
?>
</tbody>
</table>
</div>
</div>
<!-- /row -->
</div>
<!-- /container -->
</div>
<!-- /main-inner -->
</div>
<?php include('template/footer.php'); ?>
<script>
$(document).ready(function() {
$("#tabelku").dataTable();
});
</script>