Menampilkan Hasil Esp32 Ke Database Mysql Arduino
Menampilkan Hasil Esp32 Ke Database Mysql Arduino
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Daftar Siswa - Sistem Absensi Sekolah</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/6.4.0/css/all.min.css">
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
color: #333;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.header {
background-color: #2c3e50;
color: white;
padding: 20px 0;
text-align: center;
border-radius: 8px 8px 0 0;
margin-bottom: 20px;
display: flex;
justify-content: center;
align-items: center;
}
.logo {
width: 80px;
height: 80px;
margin-right: 20px;
background-color: white;
border-radius: 50%;
padding: 5px;
}
.school-info {
text-align: left;
}
.school-name {
font-size: 24px;
font-weight: bold;
margin: 0;
}
.school-address {
font-size: 14px;
margin: 5px 0 0 0;
opacity: 0.8;
}
.card {
background-color: white;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 20px;
margin-bottom: 20px;
}
.card-title {
color: #2c3e50;
border-bottom: 2px solid #3498db;
padding-bottom: 10px;
margin-top: 0;
display: flex;
justify-content: space-between;
align-items: center;
}
.menu {
display: flex;
justify-content: center;
margin-bottom: 20px;
}
.menu-button {
background-color: #3498db;
color: white;
border: none;
border-radius: 4px;
padding: 12px 20px;
font-size: 16px;
cursor: pointer;
margin: 0 10px;
display: flex;
align-items: center;
transition: background-color 0.3s ease;
}
.menu-button:hover {
background-color: #2980b9;
}
.menu-button i {
margin-right: 8px;
}
.alert {
padding: 15px;
border-radius: 4px;
margin-bottom: 20px;
}
.alert-success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.alert-error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th, td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #f2f2f2;
font-weight: bold;
color: #2c3e50;
}
tr:hover {
background-color: #f5f5f5;
}
.action-buttons {
display: flex;
gap: 10px;
}
.btn-edit {
background-color: #3498db;
color: white;
border: none;
border-radius: 4px;
padding: 8px 12px;
cursor: pointer;
font-size: 14px;
}
.btn-delete {
background-color: #e74c3c;
color: white;
border: none;
border-radius: 4px;
padding: 8px 12px;
cursor: pointer;
font-size: 14px;
}
.btn-edit:hover {
background-color: #2980b9;
}
.btn-delete:hover {
background-color: #c0392b;
}
.footer {
text-align: center;
padding: 20px;
color: #777;
font-size: 12px;
}
.no-data {
text-align: center;
padding: 30px;
color: #777;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<img src="https://via.placeholder.com/80" alt="Logo Sekolah"
class="logo">
<div class="school-info">
<h1 class="school-name">SMK NEGERI 1 CONTOH</h1>
<p class="school-address">Jl. Pendidikan No. 123, Kota Contoh,
12345</p>
</div>
</div>
<div class="card">
<h2 class="card-title">Daftar Siswa</h2>
<div class="footer">
© <?php echo date('Y'); ?> Sistem Absensi Sekolah - Dibuat dengan
❤️
</div>
</div>
<script>
function confirmDelete(nis, nama) {
if (confirm(`Apakah Anda yakin ingin menghapus data siswa ${nama} ($
{nis})?`)) {
window.location.href = `hapus_siswa.php?nis=${nis}`;
}