-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
232 lines (208 loc) · 6.92 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
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE HTML>
<?php
include "koneksi.php";
?>
<html>
<head>
<title>Data Pokok Pendidikan Muhammadiyah</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!--[if lte IE 8]><script src="assets/js/ie/html5shiv.js"></script><![endif]-->
<link rel="stylesheet" type="text/css" href="admin/bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="admin/dist/css/AdminLTE.css"/>
<link rel="stylesheet" href="assets/css/main.css"/>
<!--[if lte IE 8]><link rel="stylesheet" href="assets/css/ie8.css" /><![endif]-->
<script src="assets/js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#artikel" ).load( "fetch_pages.php"); //load initial records
//executes code below when user click on pagination links
$("#artikel").on( "click", ".paginations a", function (e){
e.preventDefault();
$(".loading-div").show(); //show loading element
var page = $(this).attr("data-page"); //get page number from link
$("#artikel").load("fetch_pages.php",{"page":page}, function(){ //get content from PHP page
$(".loading-div").hide(); //once done, hide loading element
});
});
});
</script>
</head>
<body class="landing">
<!--<a href="admin">LOGIN</a>-->
<section id="header">
<?php include "navbar.php" ?>
</section>
<section id="content" class="container main">
<div class="row content">
<!-- <div class="col-md-12">
<div class="box box-info" style="border : none; padding-top: 5px;">
<marquee>
Dengan semangat baru dan kebersamaan yang
melibatkan seluruh
stakeholder pendataan, kita tuntaskan pencapaian target Dapodik Dasar dan Menengah tahun 2016
mencapai 100%. Salam SATU DATA DAPODIK DASAR DAN MENENGAH!
</marquee>
</div>
</div> -->
<!-- <div class="col-md-12">
<div class="menu row">
<div class="col-md-2 list"><div><a href="data-sekolah.php">Sekolah</a></div></div>
<div class="col-md-2 list"><div><a href="data-guru.php">Guru</a></div></div>
<div class="col-md-2 list"><div><a href="data-kepsek.php">Kepala Sekolah</a></div></div>
<div class="col-md-2 list"><div><a href="data-aset.php">Aset</a></div></div>
<div class="col-md-2 list"><div><a href="data-siswa.php">Siswa</a></div></div>
<div class="col-md-2 list"><div><a href="data-pegawai">Pegawai</a></div></div>
</div>
</div> -->
<div class="col-md-8">
<div class="box box-info">
<div class="box-header">
<h4 style="margin :5px; color: #fff">Prestasi</h4>
</div>
<div class="box-body">
<div class="loading-div"><img src="ajax-loader.gif" ></div>
<div class="artikel" id="artikel">
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="box box-info">
<div class="box-header">
<h4 style="color: #fff; margin: 5px;">Siswa Terbanyak</h4>
</div>
<div class="box-body">
<div id="Data2">
<table class="table table-hover table-striped">
<thead>
<tr>
<th class="text-center">Tahun Ajaran</th>
<th>Nama Sekolah</th>
<th class="text-center">Total Siswa</th>
</tr>
</thead>
<tbody>
<?php
$query = mysqli_query($conn, "SELECT siswa.tahun_ajaran, profil.nama_sekolah, SUM(jumlah_putra)+SUM(jumlah_putri) AS total_siswa FROM siswa JOIN profil ON siswa.npsn = profil.npsn GROUP BY profil.npsn ORDER BY total_siswa DESC LIMIT 10");
while($data = mysqli_fetch_array($query, MYSQLI_BOTH)){
echo "
<tr style='font-size : 12px'>
<td>$data[tahun_ajaran]</td>
<td>$data[nama_sekolah]</td>
<td>$data[total_siswa]</td>
</tr>
";
} ?>
</tbody>
</table>
</div>
</div>
</div>
<div class="box box-info">
<div class="box-header">
<h4 style="color: #fff; margin: 5px;">Guru Terbanyak</h4>
</div>
<div class="box-body">
<div id="Data2">
<table class="table table-hover table-striped">
<thead>
<tr>
<th class="text-center">Tahun Ajaran</th>
<th>Nama Sekolah</th>
<th class="text-center">Total Guru</th>
</tr>
</thead>
<tbody>
<?php
$queries = mysqli_query($conn, "SELECT data_guru.tahun_ajaran, profil.nama_sekolah, COUNT(id) AS total_guru FROM data_guru JOIN profil ON data_guru.npsn = profil.npsn GROUP BY profil.npsn ORDER BY total_guru DESC LIMIT 10");
while($dataguru = mysqli_fetch_array($queries, MYSQLI_BOTH)){
echo "
<tr style='font-size : 12px'>
<td>$dataguru[tahun_ajaran]</td>
<td>$dataguru[nama_sekolah]</td>
<td>$dataguru[total_guru]</td>
</tr>
";
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Scripts -->
<script src="admin/bootstrap/js/bootstrap.js"></script>
<script src="assets/js/jquery.dropotron.min.js"></script> <!-- THIS -->
<script src="assets/js/jquery.scrollgress.min.js"></script> <!-- THIS -->
<script src="assets/js/skel.min.js"></script>
<script src="assets/js/util.js"></script> <!-- THIS -->
<!--[if lte IE 8]><script src="assets/js/ie/respond.min.js"></script><![endif]-->
<script src="assets/js/main.js"></script>
<style>
.contents{
margin: 20px;
padding: 20px;
list-style: none;
background: #F9F9F9;
border: 1px solid #ddd;
border-radius: 5px;
}
.contents li{
margin-bottom: 10px;
}
.loading-div{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.56);
z-index: 999;
display:none;
}
.loading-div img {
margin-top: 20%;
margin-left: 50%;
}
.box-header .box-title{
color: #fff;
}
/* Pagination style */
.paginations{margin-top:30px;padding:0;}
.paginations li{
display: inline;
padding: 6px 10px 6px 10px;
border: 1px solid #ddd;
margin-right: -1px;
font: 15px/20px Arial, Helvetica, sans-serif;
background: #FFFFFF;
box-shadow: inset 1px 1px 5px #F4F4F4;
}
.paginations li a{
text-decoration:none;
color: rgb(89, 141, 235);
}
.paginations li.first {
border-radius: 5px 0px 0px 5px;
}
.paginations li.last {
border-radius: 0px 5px 5px 0px;
}
.paginations li:hover{
background: #CFF;
}
.paginations li.active{
background: #F0F0F0;
color: #333;
}
.box.box-info {
/* border-top-color: #00c0ef; */
border: none !important;
}
</style>
</body>
</html>