-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnilai_rapot.php
More file actions
106 lines (101 loc) · 3.77 KB
/
nilai_rapot.php
File metadata and controls
106 lines (101 loc) · 3.77 KB
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
<?php
include('structure/check_conn.php');
include('database.php');
global $conn;
global $id_siswa;
// SQL query to fetch the nilai_rapot_asli for the current user
$query = "SELECT * FROM wpcguvfn_db.nilai_rapot WHERE id_siswa = $id_siswa";
$result = mysqli_query($conn, $query);
$dataRapot = [];
// Check if the query was successful
if ($result) {
// Fetch the data
$data = mysqli_fetch_assoc($result);
$dataRapot = $data;
} else {
echo "Error: " . mysqli_error($conn);
}
//notif dari input nilai rapot
if (isset($_GET['isi_nilai_berhasil'])) {
echo '<div id="message" class="message success floating-message">Nilai telah dimasukkan</div>';
echo '<script>
setTimeout(function() {
document.getElementById("message").style.display = "none";
}, 3000) </script>';
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="css/classless.css">
<link rel="stylesheet" href="css/tabbox.css">
<link rel="stylesheet" href="css/themes.css">
<title>EduBridge - Lihat Nilai Rapot</title>
</head>
<body>
<?php include "structure/navbar.php" ?>
<main>
<h1>Perhitungan Nilai Rapot</h1>
<div class="row">
<div class="col">
<br>
<p>Nilai yang ditampilkan di tabel adalah hasil perhitungan rata-rata nilai rapot asli yang telah dimasukkan. Adapun skemanya seperti ini:</p>
<ul>
<li>IPA: Matematika + Fisika + Kimia + Biologi</li>
<li>IPS: Matematika + Ekonomi + Geografi + Sosiologi</li>
<li>Bahasa: Bahasa Indonesia + Bahasa Inggris</li>
<li>Praktek: PJOK + Prakarya</li>
<li>Politik: Sejarah + PPKN</li>
<li>Seni: Seni Budaya</li>
</ul>
</div>
<div class="col-4">
<?php if (!empty($dataRapot)): ?>
<table class="styled-table">
<thead>
<tr>
<th>Mata Pelajaran</th>
<th>Nilai</th>
</tr>
</thead>
<tbody>
<tr>
<td>IPA</td>
<td><?php echo htmlspecialchars($dataRapot['ipa']); ?></td>
</tr>
<tr>
<td>IPS</td>
<td><?php echo htmlspecialchars($dataRapot['ips']); ?></td>
</tr>
<tr>
<td>Bahasa</td>
<td><?php echo htmlspecialchars($dataRapot['bahasa']); ?></td>
</tr>
<tr>
<td>Praktek</td>
<td><?php echo htmlspecialchars($dataRapot['praktek']); ?></td>
</tr>
<tr>
<td>Politik</td>
<td><?php echo htmlspecialchars($dataRapot['politik']); ?></td>
</tr>
<tr>
<td>Seni</td>
<td><?php echo htmlspecialchars($dataRapot['seni']); ?></td>
</tr>
</tbody>
</table>
<?php else: ?>
<p>Kamu <b>belum mengisi</b> data rapot. Silahkan isi terlebih dahulu.</p>
<?php endif; ?>
</div>
</div>
<p>Untuk melanjutkan ke tahapan Tes RIASEC, klik tombol dibawah</p>
<button onclick="window.location.href='tes_riasec_info.php';">Kerjakan Tes RIASEC</button>
</main>
<footer><?php include "structure/footer.php"?></footer>
</body>
</html>