forked from faizakmal/Sistem-Pakar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdaftarpenyakit.php
134 lines (128 loc) · 5.14 KB
/
daftarpenyakit.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
<?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="index.php"><button type="button" class="btn btn-primary btn-block">BERANDA</button></a></p>
<p><a href="diagnosa.php"><button type="button" class="btn btn-primary btn-block">DIAGNOSA PENYAKIT</button></a></p>
<p><a href="daftarpenyakit.php"><button type="button" class="btn btn-primary btn-block active">DAFTAR PENYAKIT</button></a></p>
<p><a href="about.php"><button type="button" class="btn btn-primary btn-block">ABOUT</button></a></p>
<br><br><br><br><br><br><br><br><br><br>
<p><button type="button" class="btn btn-primary btn-block" id="myBtn">LOGIN</button></p>
</div>
<div class="col-sm-8 text-left">
<h2 class="text-center">DAFTAR PENYAKIT</h2>
<form id="form1" name="form1" method="post" action="daftarpenyakit.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>
<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 Tanaman</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=\"detailpenyakit.php?id=".$data[0]."\"><i class='glyphicon glyphicon-search'></i></a></td>
</tr>
";
}
}
?>
</table><br><br><br><br><br>
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header" style="padding:35px 50px;">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4><span class="glyphicon glyphicon-lock"></span> Login</h4>
</div>
<div class="modal-body" style="padding:40px 50px;">
<form role="form" method="post" action="ceklogin.php">
<div class="form-group" method="post">
<label for="username"><span class="glyphicon glyphicon-user"></span> Username</label>
<input type="text" class="form-control" name="username" id="password" placeholder="Enter username">
</div>
<div class="form-group" method="post">
<label for="password"><span class="glyphicon glyphicon-eye-open"></span> Password</label>
<input type="password" class="form-control" name="password" id="password" placeholder="Enter password">
</div>
<button type="submit" id="submit" nama="submit" class="btn btn-primary btn-block" method="post"><span class="glyphicon glyphicon-off"></span> Login</button>
</form>
</div>
</div>
</div>
</div>
<footer class="container-fluid text-center">
<p>S1-Sistem Informasi 2013</p>
</footer>
<script>
$(document).ready(function(){
$("#myBtn").click(function(){
$("#myModal").modal();
});
});
</script>
</body>
</html>