forked from faizakmal/Sistem-Pakar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhamadanpenyakit.php
114 lines (106 loc) · 4.27 KB
/
hamadanpenyakit.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
<?php
include('koneksi.php');
if(isset($_SESSION['login_user'])){
header("location: about.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Sistem Pakar</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div>
</div>
</nav>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-2 sidenav">
<p><a href="homeadmin.php"><button type="button" class="btn btn-primary btn-block">BERANDA</button></a></p>
<p><a href="hamadanpenyakit.php"><button type="button" class="btn btn-primary btn-block active">HAMA dan PENYAKIT</button></a></p>
<p><a href="gejala.php"><button type="button" class="btn btn-primary btn-block">GEJALA</button></a></p>
<p><a href="basispengetahuan.php"><button type="button" class="btn btn-primary btn-block">BASIS PENGETAHUAN</button></a></p>
<br><br><br><br><br><br><br><br><br><br>
<p><a href="logout.php"><button type="button" class="btn btn-primary btn-block" id="myBtn">LOGOUT</button></a></p>
</div>
<div class="col-sm-8 text-left">
<h2 class="text-center">DAFTAR HAMA DAN PENYAKIT</h2>
<form id="form1" name="form1" method="post" action="hamadanpenyakit.php">
<label for="sel1">Jenis Tanaman</label>
<select class="form-control" name="tanaman" onChange='this.form.submit();'>
<option>Tanaman</option>
<option>Bawang</option>
<option>Cabai</option>
</select>
</form>
<br>
<a href="ainputpenyakit.php"><button type="button" class="btn btn-default">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></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 Penyakit</th>
<th>Nama Penyakit</th>
<th>Jenis Penyakit</th>
<th>Detail</th>
</tr>
</thead>
<?php
if(isset($_POST['tanaman']))
if($_POST['tanaman']!="jenistanaman"){
$queri="Select * From penyakit where jenistanaman = \"".$_POST['tanaman']."\"";
$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=\"adetailpenyakit.php?id=".$data[0]."\"><i class='glyphicon glyphicon-search'></i></a>"." || <a href=\"aeditpenyakit.php?id=".$data[0]."\"><i class='glyphicon glyphicon-pencil'></i></a>"." || <a href=\"adeletepenyakit.php?id=".$data[0]."\" onclick='return checkDelete()'><i class='glyphicon glyphicon-trash'></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>
<footer class="container-fluid text-center">
<p>S1-Sistem Informasi 2013</p>
</footer>
</body>
</html>