-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.php
117 lines (110 loc) · 2.99 KB
/
index.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
<?php
include_once 'includes/header.inc.php';
include_once 'includes/nilai.inc.php';
$pro3 = new Nilai($db);
$stmt3 = $pro3->readAll();
include_once 'includes/alternatif.inc.php';
$pro1 = new Alternatif($db);
$stmt1 = $pro1->readAll();
$stmt4 = $pro1->readByFilter();
include_once 'includes/kriteria.inc.php';
$pro2 = new Kriteria($db);
$stmt2 = $pro2->readAll();
include_once 'includes/bobot.inc.php';
$pro5 = new Bobot($db);
$stmt5 = $pro5->readAll();
?>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="jumbotron">
<h1>Selamat datang!</h1>
<p>Pemilihan Dosen Terbaik Politeknik Pos Indonesia</p>
</div>
<div id="container2" style="min-width: 100%; height: 400px; margin: 0 auto"></div>
<br/>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Nilai Preferensi</h3>
</div>
<div class="panel-body">
<ol>
<?php while ($row3 = $stmt3->fetch(PDO::FETCH_ASSOC)) : ?>
<li><?php echo $row3['ket_nilai'] ?> (<?php echo $row3['jum_nilai'] ?>)</li>
<?php endwhile; ?>
</ol>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Kriteria & Bobot</h3>
</div>
<div class="panel-body">
<ol>
<?php while ($row2 = $stmt2->fetch(PDO::FETCH_ASSOC)) : ?>
<li><?php echo $row2['nama_kriteria'] ?></li>
<?php endwhile; ?>
</ol>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Skor Alternatif & Hasil</h3>
</div>
<div class="panel-body">
<ol>
<?php while ($row1 = $stmt1->fetch(PDO::FETCH_ASSOC)) :?>
<li><?php echo $row1['nama'] ?></li>
<?php endwhile; ?>
</ol>
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<footer class="text-center">Copyright © 2018 PT. Pos Indonesia</footer>
</div>
<script src="assets/js/jquery-1.11.3.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/highcharts.js"></script>
<script src="assets/js/exporting.js"></script>
<script>
var chart1; // globally available
$(document).ready(function() {
chart1 = new Highcharts.Chart({
chart: {
renderTo: 'container2',
type: 'column'
},
title: {
text: 'Grafik Usulan'
},
xAxis: {
categories: ['Alternatif']
},
yAxis: {
title: {
text: 'Jumlah Nilai'
}
},
series: [
<?php while ($row4 = $stmt4->fetch(PDO::FETCH_ASSOC)) : ?>
//data yang diambil dari database dimasukan ke variable nama dan data
{
name: '<?php echo $row4['nama'] ?>',
data: [<?php echo $row4['hasil_akhir'] ?>]
},
<?php endwhile; ?>
]
});
});
</script>
</body>
</html>