PATH: //home/hwyuvbry/pelanggan.waroenkhoki123.web.id/komando86
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 .htaccess
↓
X
📄 admin_togel.php
↓
X
📄 admin_togel.php#$
↓
X
📄 ajax_riwayat.php
↓
X
📄 anggota.php
↓
X
📁 assets/
X
📄 banner.php
↓
X
📄 bonus.php
↓
X
📄 bukti_jp.php
↓
X
📄 check_data_changes.php
↓
X
📄 config.php
↓
X
📄 dasbor.php
↓
X
📄 dasbor.php#
↓
X
📄 deposit.php
↓
X
📄 downline.php
↓
X
📄 downline.php#
↓
X
📄 error_log
↓
X
📄 footer.php
↓
X
📄 game-list.php
↓
X
📄 game-lists.php
↓
X
📄 ikon_mengambang.php
↓
X
📄 index.php
↓
X
📄 input_manual_result.php
↓
X
📄 keluar.php
↓
X
📄 kyc.php
↓
X
📄 masuk.php
↓
X
📄 masuk_step_1.php
↓
X
📄 navbar.php
↓
X
📄 pemberitahuan.php
↓
X
📄 pengaturan.php
↓
X
📄 profil.php
↓
X
📄 promosi.php
↓
X
📄 proses-claim.php
↓
X
📄 provider.php
↓
X
📄 qris.php
↓
X
📄 qris.php#
↓
X
📄 refferal.php
↓
X
📄 refferal.php#
↓
X
📄 rekening.php
↓
X
📄 saldo.php
↓
X
📄 sidebar.php
↓
X
📄 staff.php
↓
X
📄 tambah_anggota.php
↓
X
📄 tambah_bonus.php
↓
X
📄 tambah_bukti_jp.php
↓
X
📄 tambah_ikon_mengambang.php
↓
X
📄 tambah_promosi.php
↓
X
📄 tambah_rekening.php
↓
X
📄 tambah_staff.php
↓
X
📄 ubah_anggota.php
↓
X
📄 ubah_anggota.php#
↓
X
📄 ubah_bonus.php
↓
X
📄 ubah_bukti_jp.php
↓
X
📄 ubah_deposit.php
↓
X
📄 ubah_ikon_mengambang.php
↓
X
📄 ubah_kyc.php
↓
X
📄 ubah_promosi.php
↓
X
📄 ubah_rekening.php
↓
X
📄 ubah_saldo.php
↓
X
📄 ubah_staff.php
↓
X
📄 ubah_uuid.php
↓
X
📄 ubah_withdraw.php
↓
X
📄 update_claim.php
↓
X
📄 verifikasi.php
↓
X
📄 withdraw.php
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: qris.php
<?php include_once '../db/koneksi.php'; if (!isset($_SESSION['kode_admin'])) { echo ' <script> alert("Terjadi kesalahan, harap masuk kembali!"); window.location.replace("'.$alamat_admin.'keluar.php"); </script> '; exit; } // Mengambil data QRIS saat ini (ID: 1 sebagai data utama) $query_qris = mysqli_query($koneksi, "SELECT * FROM tb_qris WHERE id = 1"); $data_qris = mysqli_fetch_assoc($query_qris); // Jika belum ada data sama sekali di database, buat baris default baru if (!$data_qris) { mysqli_query($koneksi, "INSERT INTO tb_qris (id, nama_layanan, image_qr, status) VALUES (1, 'QRIS DEPOSIT', 'no-image.png', 1)"); $query_qris = mysqli_query($koneksi, "SELECT * FROM tb_qris WHERE id = 1"); $data_qris = mysqli_fetch_assoc($query_qris); } // Proses penanganan Form Upload Gambar saat tombol simpan ditekan if (isset($_POST['upload_qris'])) { $nama_layanan = mysqli_real_escape_string($koneksi, $_POST['nama_layanan']); $status = intval($_POST['status']); // Konfigurasi File Gambar $file_name = $_FILES['qr_image']['name']; $file_tmp = $_FILES['qr_image']['tmp_name']; $file_size = $_FILES['qr_image']['size']; $file_err = $_FILES['qr_image']['error']; if ($file_err === 0) { $file_ext = strtolower(pathinfo($file_name, PATHINFO_EXTENSION)); $ext_allow = ['jpg', 'jpeg', 'png', 'webp']; // Validasi Ekstensi Gambar if (in_array($file_ext, $ext_allow)) { // Batasi ukuran file maksimal 3MB if ($file_size <= 3145728) { // Berikan nama acak unik pada file baru agar tidak bentrok $new_file_name = "qris_" . time() . "_" . uniqid() . "." . $file_ext; $target_dir = "../asset/images/qris/"; // Buat folder otomatis jika belum tersedia di server if (!is_dir($target_dir)) { mkdir($target_dir, 0755, true); } $target_file = $target_dir . $new_file_name; if (move_uploaded_file($file_tmp, $target_file)) { // Hapus file QRIS lama dari folder penyimpanan agar menghemat space hosting if (!empty($data_qris['image_qr']) && $data_qris['image_qr'] != 'no-image.png') { $old_file = $target_dir . $data_qris['image_qr']; if (file_exists($old_file)) { unlink($old_file); } } // Update database dengan nama gambar yang baru $update = mysqli_query($koneksi, "UPDATE tb_qris SET nama_layanan = '$nama_layanan', image_qr = '$new_file_name', status = '$status' WHERE id = 1"); } else { $error_msg = "Gagal memindahkan file ke folder server."; } } else { $error_msg = "Ukuran gambar terlalu besar! Maksimal batas ukuran adalah 3MB."; } } else { $error_msg = "Format file tidak didukung! Harap gunakan format JPG, JPEG, PNG, atau WEBP."; } } else { // Jika user tidak memilih file gambar baru, cukup update text nama dan status saja $update = mysqli_query($koneksi, "UPDATE tb_qris SET nama_layanan = '$nama_layanan', status = '$status' WHERE id = 1"); } // Tampilkan notifikasi hasil eksekusi proses if (isset($update) && $update) { echo '<script>alert("Data QRIS berhasil diperbarui!"); window.location.href="qris.php";</script>'; } else { $msg = isset($error_msg) ? $error_msg : "Gagal memperbarui database."; echo '<script>alert("Gagal: '.$msg.'"); window.location.href="qris.php";</script>'; } } ?> <div class="container-xxl flex-grow-1 container-p-y"> <div class="row gy-4 mb-4"> <div class="col-md-12"> <div class="fw-bold fs-4 text-center text-md-start mb-2">Pengaturan Gambar QRIS Deposit</div> </div> <div class="col-md-7"> <div class="card p-4"> <form action="" method="POST" enctype="multipart/form-data"> <div class="mb-3"> <label class="form-label fw-bold">Nama Layanan / Provider QRIS</label> <input type="text" name="nama_layanan" class="form-control" value="<?php echo htmlspecialchars($data_qris['nama_layanan']); ?>" required placeholder="Contoh: QRIS ALL PAYMENT"> </div> <div class="mb-3"> <label class="form-label fw-bold">Pilih File Gambar Barcode QRIS Baru</label> <input type="file" name="qr_image" id="qr_input_file" class="form-control" accept="image/*"> <small class="text-muted">Format file yang diizinkan: .png, .jpg, .jpeg, .webp (Maks. 3MB)</small> </div> <div class="mb-4"> <label class="form-label fw-bold">Status QRIS</label> <select name="status" class="form-select"> <option value="1" <?php echo ($data_qris['status'] == 1) ? 'selected' : ''; ?>>Aktif (Muncul di Form Deposit)</option> <option value="0" <?php echo ($data_qris['status'] == 0) ? 'selected' : ''; ?>>Maintenance / Sembunyikan</option> </select> </div> <button type="submit" name="upload_qris" class="btn btn-primary d-flex align-items-center justify-content-center waves-effect waves-light w-100"> <span class="tf-icons mdi mdi-content-save-move me-2"></span> Simpan & Perbarui Gambar QRIS </button> </form> </div> </div> <div class="col-md-5"> <div class="card p-4 text-center"> <div class="fw-bold mb-3 text-secondary text-uppercase">Tampilan QR Code Saat Ini</div> <div class="p-2 border rounded bg-light mx-auto style-preview-box" style="width: 260px; height: 260px; display: flex; align-items: center; justify-content: center; overflow: hidden;"> <?php $gambar_sekarang = "../asset/images/qris/" . $data_qris['image_qr']; if (!empty($data_qris['image_qr']) && file_exists($gambar_sekarang)) { $src_img = $gambar_sekarang; } else { $src_img = "https://via.placeholder.com/250x250/e0e0e0/666666?text=Belum+Ada+QRIS"; } ?> <img id="qr_preview_display" src="<?php echo $src_img; ?>?v=<?php echo time(); ?>" alt="QRIS Code" style="max-width: 100%; max-height: 100%; object-fit: contain;"> </div> <div class="mt-2 text-muted small"> Terakhir diupdate: <br><strong><?php echo date('d M Y - H:i', strtotime($data_qris['updated_at'])); ?> WIB</strong> </div> </div> </div> </div> </div> <script> document.addEventListener("DOMContentLoaded", function () { const qrInputFile = document.getElementById("qr_input_file"); const qrPreviewDisplay = document.getElementById("qr_preview_display"); if (qrInputFile && qrPreviewDisplay) { qrInputFile.addEventListener("change", function () { const file = this.files[0]; if (file) { const reader = new FileReader(); reader.onload = function (e) { qrPreviewDisplay.setAttribute("src", e.target.result); } reader.readAsDataURL(file); } }); } }); </script>
SIMPAN PERUBAHAN