forked from rrifafauzikomara/SPK-AHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathranking.php
52 lines (47 loc) · 1.31 KB
/
ranking.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
<?php
include_once('includes/header.inc.php');
include_once('includes/alternatif.inc.php');
include_once('includes/kriteria.inc.php');
include_once('includes/ranking.inc.php');
$altObj = new Alternatif($db);
$kriObj = new Kriteria($db);
$ranObj = new Ranking($db);
$stmt = $ranObj->readKhusus();
$stmty = $ranObj->readKhusus();
$count = $ranObj->countAll();
$stmtx1y = $ranObj->readBob();
$stmtx2y = $ranObj->readBob();
?>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<br/>
<h3>Hasil Perankingan</h3>
<hr>
<br>
<?php for ($i=2017; $i<=2018; $i++): ?>
<h4>Tahun <?=$i?></h4>
<table width="100%" class="table table-striped table-bordered">
<thead>
<tr>
<th>NIK</th>
<th>Nama</th>
<th>Hasil Akhir</th>
<th class="success">Ranking</th>
</tr>
</thead>
<tbody>
<?php $altObj->periode = $i; $rank = 1; $alt1c = $altObj->readByRank(); while ($row = $alt1c->fetch(PDO::FETCH_ASSOC)): ?>
<tr>
<td><?=$row["nik"]?></td>
<td><?=$row["nama"]?></td>
<td><?=number_format($row["hasil_akhir"], 4, '.', ',')?></td>
<td class="success"><?=$rank++?></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
<br>
<?php endfor; ?>
</div>
</div>
<?php include_once('includes/footer.inc.php'); ?>