-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata_siswa.php
More file actions
68 lines (63 loc) · 2.54 KB
/
Copy pathdata_siswa.php
File metadata and controls
68 lines (63 loc) · 2.54 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css">
<title>Data Siswa</title>
</head>
<body>
<div class="container" style="margin-top: 80px">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
DATA SISWA
</div>
<div class="card-body">
<a href="<?php echo base_url() ?>index.php/siswa/tambah" class="btn btn-md btn-success" style="margin-bottom: 10px">TAMBAH DATA</a>
<table class="table table-bordered" id="myTable">
<thead>
<tr>
<th scope="col">NO.</th>
<th scope="col">NISN</th>
<th scope="col">NAMA LENGKAP</th>
<th scope="col">ALAMAT</th>
<th scope="col">AKSI</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
foreach($data_siswa as $siswa){
?>
<tr>
<td><?php echo $no++ ?></td>
<td><?php echo $siswa->nisn ?></td>
<td><?php echo $siswa->nama_lengkap ?></td>
<td><?php echo $siswa->alamat ?></td>
<td class="text-center">
<a href="<?php echo base_url() ?>index.php/siswa/edit/<?php echo $siswa->id_siswa ?>" class="btn btn-sm btn-primary">EDIT</a>
<a href="<?php echo base_url() ?>index.php/siswa/hapus/<?php echo $siswa->id_siswa ?>" class="btn btn-sm btn-danger">HAPUS</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<script src="//cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
<script>
$(document).ready( function () {
$('#myTable').DataTable();
} );
</script>
</body>
</html>