-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdaftarkerusakan.php
171 lines (159 loc) · 6.75 KB
/
daftarkerusakan.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?php
include('koneksi.php');
if(isset($_SESSION['login_user'])){
header("location: about.php");
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<script src="https://code.jquery.com/jquery-3.6.3.min.js"></script>
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<meta name="generator" content="Hugo 0.84.0">
<title>Dashboard Template · Bootstrap v5.0</title>
<link rel="canonical" href="https://getbootstrap.com/docs/5.0/examples/dashboard/">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<style>
body {
font-family: 'Inter', sans-serif !important;
}
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<!-- Custom styles for this template -->
<link href="dashboard.css" rel="stylesheet">
</head>
<body>
<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
<a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#"><b>Kumaphone Admin</b></a>
<button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<h5 class="text-white text-center w-100">Selamat siang</h5>
<div class="navbar-nav">
<div class="nav-item text-nowrap">
<a class="nav-link px-3" href="index.html"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-door-open" viewBox="0 0 16 16">
<path d="M8.5 10c-.276 0-.5-.448-.5-1s.224-1 .5-1 .5.448.5 1-.224 1-.5 1z"/>
<path d="M10.828.122A.5.5 0 0 1 11 .5V1h.5A1.5 1.5 0 0 1 13 2.5V15h1.5a.5.5 0 0 1 0 1h-13a.5.5 0 0 1 0-1H3V1.5a.5.5 0 0 1 .43-.495l7-1a.5.5 0 0 1 .398.117zM11.5 2H11v13h1V2.5a.5.5 0 0 0-.5-.5zM4 1.934V15h6V1.077l-6 .857z"/>
</svg> Kembali ke halaman utama</a>
</div>
</div>
</header>
<div class="container-fluid">
<div class="row">
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
<div class="position-sticky pt-3">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link" aria-current="page" href="homeadmin.php">
<span data-feather="home"></span>
Beranda
</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="daftarkerusakan.php"">
<span data-feather="smartphone"></span>
Kerusakan
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="gejala.php">
<span data-feather="list"></span>
Ciri Kerusakan
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="basispengetahuan.php">
<span data-feather="database"></span>
Basis Pengetahuan
</a>
</li>
</ul>
</div>
</nav>
<div class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">Kerusakan</h1>
<div class="btn-toolbar mb-2 mb-md-0">
</div>
</div>
<br/>
<form id="form1" name="form1" method="post" action="daftarkerusakan.php">
<label for="sel1">Jenis Smartphone</label>
<br/>
<select class="form-control" name="hp" onChange='this.form.submit();'>
<option>Pilih</option>
<option>Android</option>
</select>
</form>
<br>
<a href="inputkerusakan.php"><button type="button" class="btn btn-default">
<span class="bi bi-plus" aria-hidden="true">Tambah data</span>
</button></a>
<br><br>
<div class="box-body table-responsive">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>NO</th>
<th>ID Kerusakan</th>
<th>Nama Kerusakan</th>
<th>Jenis Smartphone</th>
<th>Detail</th>
</tr>
</thead>
<?php
if(isset($_POST['hp']))
if($_POST['hp']!="jenishp"){
$queri="Select * From kerusakan where jenishp = \"".$_POST['hp']."\"";
$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><a href=\"detailkerusakan.php?id=".$data[0]."\"><i class='bi bi-search'></i></a>"." <a href=\"editkerusakan.php?id=".$data[0]."\"><i class='bi bi-pencil'></i></a>"." <a href=\"deletekerusakan.php?id=".$data[0]."\" onclick='return checkDelete()'><i class='bi bi-trash3'></i></a>"."</td>
</tr>
";
}
}
?>
</table><br><br><br><br><br>
</div>
</div>
</div>
</div>
<script language="JavaScript" type="text/javascript">
function checkDelete(){
return confirm('Yakin menghapus data ini?');
}
</script>
</body>
<script src="bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/feather.min.js" integrity="sha384-uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.min.js" integrity="sha384-zNy6FEbO50N+Cg5wap8IKA4M/ZnLJgzc6w2NqACZaK0u0FXfOWRRJOnQtpZun8ha" crossorigin="anonymous"></script><script src="dashboard.js"></script>
<script language="JavaScript" type="text/javascript">
function checkDelete(){
return confirm('Yakin menghapus semua history?");
}
</script>
</html>