-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathedit_kriteria.php
executable file
·61 lines (60 loc) · 2.71 KB
/
edit_kriteria.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
<?php
session_start();
error_reporting(0);
if(empty($_SESSION['id'])){
header('location:login.php?error_login=1');
}
?>
<?php include 'header.php';?>
<?php include 'menu.php';?>
<div class="content-wrapper">
<div class="container">
<div class="row">
<div class="col-md-12">
<br/>
<div class="panel panel-default">
<div class="panel-heading">
Form Kriteria
</div>
<div class="panel-body">
<form method="post" action="update_kriteria.php" enctype="multipart/form-data">
<?php if (!empty($_GET['error_msg'])): ?>
<div class="alert alert-danger">
<?= $_GET['error_msg']; ?>
</div>
<?php endif ?>
<?php foreach ($db->select('*','kriteria')->where('id_kriteria='.$_GET['id'])->get() as $data): ?>
<input type="hidden" name="id" value="<?= $data[0]?>">
<div class="form-group">
<label for="nama">Nama Kriteria</label>
<input type="text" class="form-control" id="kriteria" name="kriteria" value="<?= $data['kriteria']?>">
</div>
<div class="form-group">
<label>Bobot</label>
<input type="number" name="bobot" class="form-control bobot" value="<?= $data['bobot']?>" pattern="^[0-9\.\-\/]+$">
</div>
<div class="form-group">
<label>Type</label>
<select class="form-control" name="type">
<option value="Cost" <?php if($data['type']=='Cost'){ echo 'selected'; }?>>Cost</option>
<option value="Benefit" <?php if($data['type']=='Benefit'){ echo 'selected'; }?>>Benefit</option>
</select>
</div>
<?php endforeach ?>
<div class="form-group">
<button class="btn btn-primary">Simpan</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include 'footer.php';?>
<script type="text/javascript">
$(function(){
$("#ds").addClass('menu-top-active');
});
</script>