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: banner.php
<?php include_once '../db/koneksi.php'; if (isset($_GET['hapus'])) { $id = mysqli_real_escape_string($koneksi, $_GET['id']); // 1. Ambil informasi data dari database $query = mysqli_query($koneksi, "SELECT gambar_banner FROM tb_banner WHERE id_banner='$id'"); $data = mysqli_fetch_assoc($query); if ($data) { $file_path = "../upload/banner/" . $data['gambar_banner']; // 2. Cek apakah file benar-benar ada di folder sebelum dihapus if (file_exists($file_path) && !empty($data['gambar_banner'])) { unlink($file_path); // Hapus file fisik dari folder } // 3. Hapus record dari database mysqli_query($koneksi, "DELETE FROM tb_banner WHERE id_banner='$id'"); echo "<script>alert('Banner dan file gambar berhasil dihapus!'); window.location='banner';</script>"; } else { echo "<script>alert('Data tidak ditemukan!'); window.location='banner';</script>"; } } // Proses Tambah if (isset($_POST['simpan'])) { $nama_file = $_FILES['gambar']['name']; $tmp_file = $_FILES['gambar']['tmp_name']; // Memberikan nama unik agar tidak tertimpa $nama_baru = time() . '_' . $nama_file; $target_dir = "../upload/banner/"; // Upload file if (move_uploaded_file($tmp_file, $target_dir . $nama_baru)) { mysqli_query($koneksi, "INSERT INTO tb_banner (gambar_banner, judul_banner, aktif) VALUES ('$nama_baru', '$_POST[judul]', 'Y')"); echo "<script>alert('Banner berhasil diupload!'); window.location='banner';</script>"; } else { echo "<script>alert('Gagal upload gambar!');</script>"; } } ?> <div class="container-xxl flex-grow-1 container-p-y"> <h4 class="fw-bold py-3 mb-4">Manajemen Banner</h4> <div class="card mb-4"> <div class="card-body"> <form method="POST" enctype="multipart/form-data"> <div class="mb-3"> <label>Judul Banner</label> <input type="text" name="judul" class="form-control" required> </div> <div class="mb-3"> <label>Pilih Gambar</label> <input type="file" name="gambar" class="form-control" required> </div> <button type="submit" name="simpan" class="btn btn-primary">Simpan Banner</button> </form> </div> </div> <div class="card"> <div class="table-responsive text-nowrap"> <table class="table"> <thead> <tr> <th>Gambar</th> <th>Judul</th> <th>Aksi</th> </tr> </thead> <tbody> <?php $tampil = mysqli_query($koneksi, "SELECT * FROM tb_banner ORDER BY id_banner DESC"); while($d = mysqli_fetch_array($tampil)){ ?> <tr> <td><img src="../upload/banner/<?= $d['gambar_banner'] ?>" width="150" style="border-radius:5px;"></td> <td><?= $d['judul_banner'] ?></td> <td> <a href="banner.php?hapus=true&id=<?= $d['id_banner'] ?>" class="btn btn-danger btn-sm" onclick="return confirm('Yakin ingin menghapus banner ini?')">Hapus</a> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div>
SIMPAN PERUBAHAN