-
Notifications
You must be signed in to change notification settings - Fork 1
/
vdatasiswa.php
executable file
·121 lines (110 loc) · 4.71 KB
/
vdatasiswa.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
<!DOCTYPE html>
<html lang="en">
<?php
include('koneksi.php');
?>
<head>
<title>SPK</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous">
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous">
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light mx-auto">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mx-auto snip1135">
<li class="nav-item"><a class="nav-link" href="index.php">Home</a></li>
<li class="nav-item dropdown">
<!-- <a class="nav-link" href="idatasiswa.php"></a> -->
<a class="nav-link" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
Input Data
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="idatasiswa.php">Data Siswa</a>
<a class="dropdown-item" href="idatanilai.php">Data Nilai</a>
<a class="dropdown-item" href="idatabobot.php">Data Bobot</a>
</div>
</li>
<li class="nav-item dropdown">
<!-- <a class="nav-link" href="idatasiswa.php"></a> -->
<a class="nav-link" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
View Data
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="vdatasiswa.php">Data Siswa</a>
<a class="dropdown-item" href="vdatanilai.php">Data Nilai</a>
<a class="dropdown-item" href="vdatabobot.php">Data Bobot</a>
</div>
</li>
<li class="nav-item"><a class="nav-link" href="matrikskeputusan.php">Hitung SAW</a></li>
</div>
</nav>
<div class="container">
<div class="card m-5">
<div class="card-header text-center">
<h3>View Data Siswa </h3>
</div>
<div class="card-body">
<div class="panel-body">
<table width="100%" class="table table-bordered table-hover" id="dataTables-example">
<thead>
<tr>
<th>Nomor</th>
<th>NIS</th>
<th>Nama</th>
<th>Tanggal Lahir</th>
<th>Asal Sekolah</th>
<th>No Telp</th>
<th>Aksi</th>
</tr>
</thead>
<?php
$queri="Select * From tb_siswa";
$hasil=mysqli_query ($konek_db,$queri);
$id = 0;
while ($data = mysqli_fetch_array ($hasil)){
$id++;
echo "
<tr>
<td>".$id."</td>
<td>".$data[0]."</td>
<td>".$data[1]."</td>
<td>".$data[2]."</td>
<td>".$data[3]."</td>
<td>".$data[4]."</td>
<td><a href=\"edatasiswa.php?id=".$data[0]."\">Edit Data</a> "." <a href=\"delete.php?id=".$data[0]."\" onclick='return checkDelete()'>Hapus Data</a> </td>
</tr>
";
}
?>
</table>
</div>
</div>
<script>
$(document).ready(function () {
$('#dataTables-example').DataTable({
responsive: true
});
});
function checkDelete() {
return confirm('Yakin menghapus data ini?');
}
</script>
</body>
</html>