-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbobot_hasil.php
158 lines (134 loc) · 2.8 KB
/
bobot_hasil.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
150
151
152
153
154
155
156
157
158
<head>
<link rel="stylesheet" type="text/css" href="semantic/dist/semantic.min.css">
</head>
<?php
include('navbar.php');
?>
<section class="content container mt-5">
<h3 class="ui header">Matriks Perbandingan Berpasangan</h3>
<table class="ui celled blue table">
<thead>
<tr>
<th>Kriteria</th>
<?php
for ($i=0; $i <= ($n-1); $i++) {
echo "<th>".getAlternatifNama($i)."</th>";
}
?>
</tr>
</thead>
<tbody>
<?php
for ($x=0; $x <= ($n-1); $x++) {
echo "<tr>";
echo "<td>".getAlternatifNama($x)."</td>";
for ($y=0; $y <= ($n-1); $y++) {
echo "<td>".round($matrik[$x][$y],5)."</td>";
}
echo "</tr>";
}
?>
</tbody>
<tfoot>
<tr>
<th>Jumlah</th>
<?php
for ($i=0; $i <= ($n-1); $i++) {
echo "<th>".round($jmlmpb[$i],5)."</th>";
}
?>
</tr>
</tfoot>
</table>
<br>
<h3 class="ui header">Matriks Nilai Kriteria</h3>
<table class="ui celled red table">
<thead>
<tr>
<th>Kriteria</th>
<?php
for ($i=0; $i <= ($n-1); $i++) {
echo "<th>".getAlternatifNama($i)."</th>";
}
?>
<th>Jumlah</th>
<th>Priority Vector</th>
</tr>
</thead>
<tbody>
<?php
for ($x=0; $x <= ($n-1); $x++) {
echo "<tr>";
echo "<td>".getAlternatifNama($x)."</td>";
for ($y=0; $y <= ($n-1); $y++) {
echo "<td>".round($matrikb[$x][$y],5)."</td>";
}
echo "<td>".round($jmlmnk[$x],5)."</td>";
echo "<td>".round($pv[$x],5)."</td>";
echo "</tr>";
}
?>
</tbody>
<tfoot>
<tr>
<th colspan="<?php echo ($n+2)?>">Principe Eigen Vector (λ maks)</th>
<th><?php echo (round($eigenvektor,5))?></th>
</tr>
<tr>
<th colspan="<?php echo ($n+2)?>">Consistency Index</th>
<th><?php echo (round($consIndex,5))?></th>
</tr>
<tr>
<th colspan="<?php echo ($n+2)?>">Consistency Ratio</th>
<th><?php echo (round(($consRatio * 100),2))?> %</th>
</tr>
</tfoot>
</table>
<?php
if ($consRatio > 0.1) {
?>
<div class="ui icon red message">
<i class="close icon"></i>
<i class="warning circle icon"></i>
<div class="content">
<div class="header">
Nilai Consistency Ratio melebihi 10% !!!
</div>
<p>Mohon input kembali tabel perbandingan...</p>
</div>
</div>
<br>
<a href='javascript:history.back()'>
<button class="ui left labeled icon button">
<i class="left arrow icon"></i>
Kembali
</button>
</a>
<?php
} else {
if ($jenis == getJumlahKriteria()) {
?>
<br>
<form action="hasil.php">
<button class="ui right labeled icon button " style="float: right;">
<i class="right arrow icon"></i>
Lanjut
</button>
</form>
<br><br><br><br>
<?php
} else {
?>
<br>
<a href="<?php echo "bobot.php?c=".($jenis + 1)?>">
<button class="ui right labeled icon button" style="float: right;">
<i class="right arrow icon"></i>
Lanjut
</button>
</a>
<br><br><br><br>
<?php
}
}
echo "</section>";
?>