-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.php
361 lines (346 loc) · 14.6 KB
/
dashboard.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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<?php
session_start();
include 'config.php'; // File untuk koneksi ke database
// Memeriksa apakah user sudah login
if (!isset($_SESSION['id_user'])) {
header('Location: index.php'); // Redirect jika user belum login
exit();
}
// Mengambil ID user yang sedang login
$id_user = $_SESSION['id_user'];
// Koneksi ke database
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "e_beasiswa";
// Membuat koneksi
$conn = new mysqli($servername, $username, $password, $dbname);
// Memeriksa koneksi
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Mengambil data administrasi berdasarkan user yang sedang login
$sql = "SELECT id_adm, nama, npm, universitas FROM administrasi WHERE id_user = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param('i', $id_user);
$stmt->execute();
$result = $stmt->get_result();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<title>Beasiswa Disdik - Beasiswa Mahasiswa Berprestasi</title>
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/fontawesome.css">
<link rel="stylesheet" href="assets/css/templatemo-scholar.css">
<link rel="stylesheet" href="assets/css/owl.css">
<link rel="stylesheet" href="assets/css/animate.css">
<link rel="stylesheet" href="https://unpkg.com/swiper@7/swiper-bundle.min.css"/>
<style>
.iframe-container {
width: 100%;
height: 600px;
}
.iframe-container iframe {
width: 100%;
height: 100%;
border: none;
}
.body-table {
display: flex;
justify-content: center;
align-items: center;
}
table {
width: 80%;
border-collapse: collapse;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}
th, td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #4e73df;
color: white;
}
td {
background-color: white;
}
.status {
display: inline-block;
padding: 5px 10px;
border-radius: 15px;
color: white;
}
.status.proses {
background-color: #ffa500;
}
.status.selesai {
background-color: #28a745;
}
.main-nav{
margin-top:10px;
}
</style>
</head>
<body>
<header class="header-area header-sticky">
<div class="container">
<div class="row">
<div class="col-12">
<nav class="main-nav">
<a href="dashboard.php" class="logo">
<h1 style="font-size: 25px;">Bea-Data</h1>
</a>
<ul class="nav">
<li class="scroll-to-section"><a href="dashboard.php" class="active">Home</a></li>
<li class="scroll-to-section"><a href="daftar.php">Administrasi</a></li>
<li class="scroll-to-section"><a href="logout.php">Logout</a></li>
</ul>
<a class='menu-trigger'>
<span>Menu</span>
</a>
</nav>
</div>
</div>
</div>
</header>
<div class="main-banner" id="top">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="owl-carousel owl-banner">
<div class="item item-2">
<div class="header-text">
<span class="category">Beasiswa Disdik</span>
<h2>Beasiswa Mahasiswa Berprestasi dari Keluarga Kurang Mampu</h2>
<p>Ekonomi bukanlah hambatan untuk mendapatkan kualitas pendidikan yang memadai.</p>
</div>
</div>
<div class="item item-3">
<div class="header-text">
<span class="category">Our Time</span>
<h2>Every Year!</h2>
<p>Akan dibuka saat mahasiswa sudah memasuki minggu perkuliahan. Coba Kesempatanmu Di sini!</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="services section" id="top">
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-6">
<div class="service-item">
<div class="icon">
<img src="assets/images/paperwork.png" alt="online degrees">
</div>
<div class="main-content">
<h4>Tahap Administrasi</h4>
<p>Calon penerima beasiswa diminta melengkapi berkas-berkas untuk keperluan administrasi</p>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="service-item">
<div class="icon">
<img src="assets/images/meeting.png" alt="short courses">
</div>
<div class="main-content">
<h4>Tahap Wawancara</h4>
<p>Calon penerima beasiswa yang lolos seleksi administrasi akan melakukan tahap wawancara langsung ke kantor Dinas Pendidikan Kota Bogor</p>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="service-item">
<div class="icon">
<img src="assets/images/evaluation.png" alt="web experts">
</div>
<div class="main-content">
<h4>Tahap Survei</h4>
<p>Staff dari Dinas Pendidikan Kota Bogor maupun staff universitas akan datang ke tempat tinggal calon penerima beasiswa</p>
</div>
</div>
</div>
</div>
</div>
</div>
<section class="section courses" id="top">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<div class="section-heading">
<h6>Collaboration</h6>
<h2>University</h2>
</div>
</div>
</div>
<ul class="event_filter">
<li>
<a class="is_active" href="#!" data-filter="*">Show All</a>
</li>
<li>
<a href="#!" data-filter=".design">Negeri</a>
</li>
<li>
<a href="#!" data-filter=".development">Swasta</a>
</li>
</ul>
<div class="row event_box">
<div class="col-lg-4 col-md-6 align-self-center mb-30 event_outer col-md-6 design">
<div class="events_item">
<div class="thumb">
<a href="#"><img src="assets/images/logo ui.png" alt=""></a>
<span class="category">Negeri</span>
</div>
<div class="down-content">
<span class="author">S1</span>
<h4>Universitas Indonesia</h4>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 align-self-center mb-30 event_outer col-md-6 development">
<div class="events_item">
<div class="thumb">
<a href="#"><img src="assets/images/logo unpak.png" alt=""></a>
<span class="category">Swasta</span>
</div>
<div class="down-content">
<span class="author">S1</span>
<h4>Universitas Pakuan</h4>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 align-self-center mb-30 event_outer col-md-6 design wordpress">
<div class="events_item">
<div class="thumb">
<a href="#"><img src="assets/images/logo ipb.png" alt=""></a>
<span class="category">Negeri</span>
</div>
<div class="down-content">
<span class="author">S1</span>
<h4>Institut Pertanian Bogor</h4>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 align-self-center mb-30 event_outer col-md-6 development">
<div class="events_item">
<div class="thumb">
<a href="#"><img src="assets/images/logo ibn.png" alt=""></a>
<span class="category">Swasta</span>
</div>
<div class="down-content">
<span class="author">S1</span>
<h4>Universitas Ibn Khaldun Bogor</h4>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 align-self-center mb-30 event_outer col-md-6 wordpress development">
<div class="events_item">
<div class="thumb">
<a href="#"><img src="assets/images/logo ibi.png" alt=""></a>
<span class="category">Swasta</span>
</div>
<div class="down-content">
<span class="author">S1</span>
<h4>IBI Kesatuan Bogor</h4>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 align-self-center mb-30 event_outer col-md-6 wordpress design">
<div class="events_item">
<div class="thumb">
<a href="#"><img src="assets/images/logo unj.png" alt=""></a>
<span class="category">Negeri</span>
</div>
<div class="down-content">
<span class="author">S1</span>
<h4>Universitas Negeri Jakarta</h4>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="contact-us section" id="top">
<div class="container">
<div class="row">
<div class="col-lg-6 align-self-center">
<div class="section-heading">
<h6>Surat Pernyataan</h6>
<h2>Silahakan download untuk melakukan pendaftaran beasiswa.</h2>
</div>
</div>
<div class="col-lg-6">
<div class="contact-us-content">
<form id="contact-form" action="" method="post">
<div class="row">
<div class="col-lg-12 iframe-container">
<iframe src="doct/Surat Pernyataan Beadata.pdf"></iframe>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<br>
<h2 style="text-align: center;">Riwayat Administrasi</h2>
<br>
<div class="body-table">
<table>
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<th>Npm</th>
<th>Universitas</th>
<th>Edit</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
echo "<tr>";
echo "<td>" . $row["id_adm"] . "</td>";
echo "<td>" . $row["nama"] . "</td>";
echo "<td>" . $row["npm"] . "</td>";
echo "<td>" . $row["universitas"] . "</td>";
echo "<td><a href='editdaftar.php?id_adm=" . $row["id_adm"] . "'><button type='button' class='btn btn-primary'>Edit</button></a></td>";
echo "<td><button type='button' class='btn btn-warning'>proses</button></td>";
echo "</tr>";
}
} else {
echo "<tr><td colspan='6' style='text-align:center;'>Tidak ada data</td></tr>";
}
$conn->close();
?>
</tbody>
</table>
</div>
<footer>
<div class="container">
<div class="col-lg-12">
<p>Copyright © 2036 Scholar Organization. All rights reserved. Design: <a href="https://templatemo.com" rel="nofollow" target="_blank">TemplateMo</a></p>
</div>
</div>
</footer>
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/isotope.min.js"></script>
<script src="assets/js/owl-carousel.js"></script>
<script src="assets/js/counter.js"></script>
<script src="assets/js/custom.js"></script>
</body>
</html>