-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrule-edit.php
More file actions
78 lines (72 loc) · 2.58 KB
/
rule-edit.php
File metadata and controls
78 lines (72 loc) · 2.58 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
69
70
71
72
73
74
75
76
77
78
<?php
session_start();
if (!isset($_SESSION['username'])) {
header("Location: login.php");
echo '
<script>
alert("Password Salah :(");
window.location.href="register.php";
</script>
';
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<?php
include("navbaradmin.php")
?>
<?php include("body.php"); ?>
<main role="main" class="col-md-1 ml-sm-auto col-lg-12 px-4">
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 border-bottom">
<h1 class="h2">Edit Rules</h1>
</div>
<div class="table-responsive">
<table class="table table-striped table-sm" style="text-align: center;">
<thead>
<tr>
<th>Id</th>
<th colspan="2">Rules [ if G0 then S0 ]</th>
<th colspan="2">Action</th>
</tr>
</thead>
<tbody>
<form action="rule-daftar-proses.php" method="POST">
<tr>
<td><input type="text" class="form-control col-sm-2 container text-center" name="id" value=""></td>
<td><input type="text" class="form-control col-sm-8 container text-center" name="rules" value=""></td>
<td><input type="text" class="form-control col-sm-4 container text-center" name="rules1" value=""></td>
<td></td>
<td><input type="submit" name="daftar" class='btn btn-sm btn-success' value="Tambah "></td>
<td></td>
</tr>
</form>
<?php
include "koneksi.php";
$qry = "select * from rules";
$data = mysqli_query($kon, $qry);
while ($d = mysqli_fetch_array($data)) {
?>
<form action="rule-edit-proses.php" method="GET">
<tr>
<td><input type="hidden" name="id" value="<?= $d['id'] ?>"><?= $d['id'] ?></td>
<td><input type="text" class="form-control col-sm-8 container text-center" name="rules" value="<?= $d['rules'] ?>"></td>
<td><input type="text" class="form-control col-sm-4 container text-center" name="rules1" value="<?= $d['rules1'] ?>"></td>
<td><input type="submit" class='btn btn-sm btn-success' value=" Edit "></td>
<td></td>
<td><a class='btn btn-sm btn-danger' href='rule-hapus.php?id=<?= $d['id'] ?>'>Hapus</a></td>
</tr>
</form>
<?php
}
?>
</tbody>
</table>
</main>
</div>
</div>