forked from ipang-dwi/spk-ahp-pemilihan-lokasi-usaha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit-alternatif.php
149 lines (129 loc) · 6.55 KB
/
edit-alternatif.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DSS Candra - AHP Based >> Edit Data Alternatif</title>
<!-- Core CSS - Include with every page -->
<link href="sb2/css/bootstrap.min.css" rel="stylesheet">
<link href="sb2/font-awesome/css/font-awesome.css" rel="stylesheet">
<!-- Page-Level Plugin CSS - Blank -->
<!-- SB Admin CSS - Include with every page -->
<link href="sb2/css/sb-admin.css" rel="stylesheet">
</head>
<body>
<div id="wrapper">
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">DSS Candra - AHP Based</a>
</div>
<!-- /.navbar-header -->
</nav>
<!-- /.navbar-static-top -->
<nav class="navbar-default navbar-static-side" role="navigation">
<div class="sidebar-collapse">
<ul class="nav" id="side-menu">
<li class="active">
<a href="index.php"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
</li>
<li>
<a href="kriteria.php"><i class="fa fa-table fa-fw"></i> Data Kriteria</a>
</li>
<li>
<a href="alternatif.php"><i class="fa fa-edit fa-fw"></i> Data Alternatif</a>
</li>
<li>
<a href="analisa.php"><i class="fa fa-files-o fa-fw"></i> Hasil Analisa</a>
</li>
</ul>
<!-- /#side-menu -->
</div>
<!-- /.sidebar-collapse -->
</nav>
<!-- /.navbar-static-side -->
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">Edit Data Alternatif</h3>
</div>
<!-- /.col-lg-12 -->
<div class="col-lg-8">
<div class="panel panel-primary">
<div class="panel-heading">
<b>Panel Edit Data Alternatif</b>
</div>
<?php
include('config.php');
$result = $mysqli->query("select * from alternatif where id_alternatif = ".$_GET['id']."");
if(!$result){
echo $mysqli->connect_errno." - ".$mysqli->connect_error;
exit();
}
while($row = $result->fetch_assoc()){
?>
<div class="panel-body">
<form role="form" method="post" action="edit.php?id=<?php echo $_GET['id'];?>">
<div class="box-body">
<div class="form-group">
<label for="exampleInputEmail1">Alternatif Lokasi</label>
<input type="text" class="form-control" name="alternatif" id="alternatif" value="<?php echo $row["alternatif"];?>" placeholder="Alternatif Lokasi">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Jarak Dengan Pemukiman</label>
<input type="text" class="form-control" name="k1" id="k1" value="<?php echo $row["k1"];?>" placeholder="Nilai Bobot">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Jarak Dengan Persimpangan</label>
<input type="text" class="form-control" name="k2" id="k2" value="<?php echo $row["k2"];?>" placeholder="Nilai Bobot">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Jarak Dengan SPBU</label>
<input type="text" class="form-control" name="k3" id="k3" value="<?php echo $row["k3"];?>" placeholder="Nilai Bobot">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Harga Sewa Tempat</label>
<input type="text" class="form-control" name="k4" id="k4" value="<?php echo $row["k4"];?>" placeholder="Nilai Bobot">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Jarak Dengan Kompetitor</label>
<input type="text" class="form-control" name="k5" id="k5" value="<?php echo $row["k5"];?>" placeholder="Nilai Bobot">
</div>
</div><!-- /.box-body -->
<div class="box-footer">
<button type="reset" class="btn btn-info">Reset</button>
<a href="alternatif.php" type="cancel" class="btn btn-warning">Batal</a>
<button type="submit" class="btn btn-primary">Proses Edit</button>
</div>
</form>
<?php
}
?>
</div>
<div class="panel-footer">
<i>by c@ndr@</i>
</div>
</div>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Core Scripts - Include with every page -->
<script src="sb2/js/jquery-1.10.2.js"></script>
<script src="sb2/js/bootstrap.min.js"></script>
<script src="sb2/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<!-- Page-Level Plugin Scripts - Blank -->
<!-- SB Admin Scripts - Include with every page -->
<script src="sb2/js/sb-admin.js"></script>
<!-- Page-Level Demo Scripts - Blank - Use for reference -->
</body>
</html>